packages feed

text-1.2.4.1: tests/text-tests.cabal

cabal-version:  >= 1.10
name:           text-tests
version:        1.2.4.1

homepage:       https://github.com/haskell/text
bug-reports:    https://github.com/haskell/text/issues
synopsis:       An efficient packed Unicode text type.
description:
    .
    An efficient packed, immutable Unicode text type (both strict and
    lazy), with a powerful loop fusion optimization framework.
    .
    The 'Text' type represents Unicode character strings, in a time and
    space-efficient manner. This package provides text processing
    capabilities that are optimized for performance critical use, both
    in terms of large data quantities and high speed.
    .
    The 'Text' type provides character-encoding, type-safe case
    conversion via whole-string case conversion functions (see "Data.Text").
    It also provides a range of functions for converting 'Text' values to
    and from 'ByteStrings', using several standard encodings
    (see "Data.Text.Encoding").
    .
    Efficient locale-sensitive support for text IO is also supported
    (see "Data.Text.IO").
    .
    These modules are intended to be imported qualified, to avoid name
    clashes with Prelude functions, e.g.
    .
    > import qualified Data.Text as T
    .
    == ICU Support
    .
    To use an extended and very rich family of functions for working
    with Unicode text (including normalization, regular expressions,
    non-standard encodings, text breaking, and locales), see
    the [text-icu package](https://hackage.haskell.org/package/text-icu)
    based on the well-respected and liberally
    licensed [ICU library](http://site.icu-project.org/).
    .
    == Internal Representation: UTF-16 vs. UTF-8
    .
    Currently the @text@ library uses UTF-16 as its internal representation
    which is [neither a fixed-width nor always the most dense representation](http://utf8everywhere.org/)
    for Unicode text. We're currently investigating the feasibility
    of [changing Text's internal representation to UTF-8](https://github.com/text-utf8)
    and if you need such a 'Text' type right now you might be interested in using the spin-off
    packages <https://hackage.haskell.org/package/text-utf8 text-utf8> and
    <https://hackage.haskell.org/package/text-short text-short>.


license:        BSD2
license-file:   LICENSE
author:         Bryan O'Sullivan <bos@serpentine.com>
maintainer:     Bryan O'Sullivan <bos@serpentine.com>, Herbert Valerio Riedel <hvr@gnu.org>
copyright:      2009-2011 Bryan O'Sullivan, 2008-2009 Tom Harper
category:       Data, Text
build-type:     Simple
tested-with:    GHC==8.10.2, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4,
                GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4,
                GHC==7.6.3, GHC==7.4.2, GHC==7.2.2, GHC==7.0.4
extra-source-files:
    include/*.h

flag bytestring-builder
  description:
    Depend on the [bytestring-builder](https://hackage.haskell.org/package/bytestring-builder)
    package for backwards compatibility.
  default: False
  manual: False

flag integer-simple
  description:
    Use the [simple integer library](http://hackage.haskell.org/package/integer-simple)
    instead of [integer-gmp](http://hackage.haskell.org/package/integer-gmp)
  default: False
  manual: False

test-suite tests
  type:           exitcode-stdio-1.0
  c-sources:      cbits/cbits.c
  include-dirs:   include
  hs-source-dirs: src

  ghc-options:
    -Wall -threaded -rtsopts

  cpp-options:
    -DASSERTS -DTEST_SUITE

  -- modules specific to test-suite
  hs-source-dirs: .
  main-is:        Tests.hs
  other-modules:
    Tests.Properties
    Tests.Properties.Mul
    Tests.QuickCheckUtils
    Tests.Regressions
    Tests.SlowFunctions
    Tests.Utils

  -- This can be merged back to `text` package, when cabal
  -- will support per-component solving. Otherwise we have loops.
  --
  -- Same as in `library` stanza; this is needed by cabal for accurate
  -- file-monitoring as well as to avoid `-Wmissing-home-modules`
  -- warnings We can't use an inter-package library dependency because
  -- of different `ghc-options`/`cpp-options` (as a side-benefitt,
  -- this enables per-component build parallelism in `cabal
  -- new-build`!); We could, however, use cabal-version:2.2's `common`
  -- blocks at some point in the future to reduce the duplication.
  other-modules:
    Data.Text
    Data.Text.Array
    Data.Text.Encoding
    Data.Text.Encoding.Error
    Data.Text.Foreign
    Data.Text.IO
    Data.Text.Internal
    Data.Text.Internal.Builder
    Data.Text.Internal.Builder.Functions
    Data.Text.Internal.Builder.Int.Digits
    Data.Text.Internal.Builder.RealFloat.Functions
    Data.Text.Internal.ByteStringCompat
    Data.Text.Internal.Encoding.Fusion
    Data.Text.Internal.Encoding.Fusion.Common
    Data.Text.Internal.Encoding.Utf16
    Data.Text.Internal.Encoding.Utf32
    Data.Text.Internal.Encoding.Utf8
    Data.Text.Internal.Functions
    Data.Text.Internal.Fusion
    Data.Text.Internal.Fusion.CaseMapping
    Data.Text.Internal.Fusion.Common
    Data.Text.Internal.Fusion.Size
    Data.Text.Internal.Fusion.Types
    Data.Text.Internal.IO
    Data.Text.Internal.Lazy
    Data.Text.Internal.Lazy.Encoding.Fusion
    Data.Text.Internal.Lazy.Fusion
    Data.Text.Internal.Lazy.Search
    Data.Text.Internal.Private
    Data.Text.Internal.Read
    Data.Text.Internal.Search
    Data.Text.Internal.Unsafe
    Data.Text.Internal.Unsafe.Char
    Data.Text.Internal.Unsafe.Shift
    Data.Text.Lazy
    Data.Text.Lazy.Builder
    Data.Text.Lazy.Builder.Int
    Data.Text.Lazy.Builder.RealFloat
    Data.Text.Lazy.Encoding
    Data.Text.Lazy.IO
    Data.Text.Lazy.Internal
    Data.Text.Lazy.Read
    Data.Text.Read
    Data.Text.Unsafe
    Data.Text.Show

  build-depends:
    HUnit >= 1.2,
    QuickCheck >= 2.14.1 && < 2.15,
    array,
    base <5,
    binary,
    deepseq,
    directory,
    ghc-prim,
    quickcheck-unicode >= 1.0.1.0,
    random,
    template-haskell,
    test-framework >= 0.4,
    test-framework-hunit >= 0.2,
    test-framework-quickcheck2 >= 0.2

  if flag(bytestring-builder)
    build-depends: bytestring         >= 0.9    && < 0.10.4,
                   bytestring-builder >= 0.10.4
  else
    build-depends: bytestring         >= 0.10.4

  if impl(ghc >= 8.11)
    build-depends: ghc-bignum

  if impl(ghc < 8.11)
    if flag(integer-simple)
      cpp-options: -DINTEGER_SIMPLE
      build-depends: integer-simple >= 0.1 && < 0.5
    else
      cpp-options: -DINTEGER_GMP
      build-depends: integer-gmp >= 0.2

  default-language: Haskell2010
  default-extensions: NondecreasingIndentation

source-repository head
  type:     git
  location: https://github.com/haskell/text

source-repository head
  type:     mercurial
  location: https://bitbucket.org/bos/text