packages feed

QuickCheck-2.9: QuickCheck.cabal

Name: QuickCheck
Version: 2.9
Cabal-Version: >= 1.8
Build-type: Simple
License: BSD3
License-file: LICENSE
Extra-source-files: README changelog
Copyright: 2000-2016 Koen Claessen, 2006-2008 Björn Bringert, 2009-2016 Nick Smallbone
Author: Koen Claessen <koen@chalmers.se>
Maintainer: QuickCheck developers <quickcheck@projects.haskell.org>
Bug-reports: mailto:quickcheck@projects.haskell.org
Tested-with: GHC >= 7
Homepage: https://github.com/nick8325/quickcheck
Category:       Testing
Synopsis:       Automatic testing of Haskell programs
Description:
  QuickCheck is a library for random testing of program properties.
  .
  The programmer provides a specification of the program, in
  the form of properties which functions should satisfy, and
  QuickCheck then tests that the properties hold in a large number
  of randomly generated cases.
  .
  Specifications are expressed in
  Haskell, using combinators defined in the QuickCheck library.
  QuickCheck provides combinators to define properties, observe
  the distribution of test data, and define test
  data generators.
  .
  You can find a (slightly out-of-date but useful) manual at
  <http://www.cse.chalmers.se/~rjmh/QuickCheck/manual.html>.

source-repository head
  type:     git
  location: https://github.com/nick8325/quickcheck

source-repository this
  type:     git
  location: https://github.com/nick8325/quickcheck
  tag:      2.9

flag templateHaskell
  Description: Build Test.QuickCheck.All, which uses Template Haskell.
  Default: True

library
  Build-depends: base >=4.3 && <5, random, containers

  -- Modules that are always built.
  Exposed-Modules:
    Test.QuickCheck,
    Test.QuickCheck.Arbitrary,
    Test.QuickCheck.Gen,
    Test.QuickCheck.Gen.Unsafe,
    Test.QuickCheck.Monadic,
    Test.QuickCheck.Modifiers,
    Test.QuickCheck.Property,
    Test.QuickCheck.Test,
    Test.QuickCheck.Text,
    Test.QuickCheck.Poly,
    Test.QuickCheck.State,
    Test.QuickCheck.Random,
    Test.QuickCheck.Exception

  -- GHC-specific modules.
  if impl(ghc)
    Exposed-Modules: Test.QuickCheck.Function
    Build-depends: transformers >= 0.2
  else
    cpp-options: -DNO_TRANSFORMERS

  if impl(ghc) && flag(templateHaskell)
    -- && !impl(haste)
    Build-depends: template-haskell >= 2.4
    Other-Extensions: TemplateHaskell
    Exposed-Modules: Test.QuickCheck.All
  else
    cpp-options: -DNO_TEMPLATE_HASKELL

  -- The new generics appeared in GHC 7.2...
  if impl(ghc < 7.2)
    cpp-options: -DNO_GENERICS
  -- ...but in 7.2-7.4 it lives in the ghc-prim package.
  if impl(ghc >= 7.2) && impl(ghc < 7.6)
    Build-depends: ghc-prim

  -- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.
  if impl (ghc < 7.4)
    cpp-options: -DNO_SAFE_HASKELL

  -- Use tf-random on newer GHCs.
  if impl(ghc)
    -- && !impl(haste)
    Build-depends: tf-random >= 0.4
  else
    cpp-options: -DNO_TF_RANDOM

  if impl(ghc)
    if impl(ghc < 7.10)
      -- `Numeric.Natural` is available in base only since GHC 7.10 / base 4.8
      build-depends: nats>=1
  else
      cpp-options: -DNO_NATURALS

  if impl(ghc)
    -- 'Data.List.NonEmpty' is available in base only since GHC 8.0 / base 4.9
    if impl(ghc < 8.0)
      build-depends: semigroups >=0.9
  else
      cpp-options: -DNO_NONEMPTY

  -- Switch off most optional features on non-GHC systems.
  if !impl(ghc)
    -- If your Haskell compiler can cope without some of these, please
    -- send a message to the QuickCheck mailing list!
    cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL
    if !impl(hugs) && !impl(uhc)
      cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES

  -- LANGUAGE pragmas don't have any effect in Hugs.
  if impl(hugs)
    Extensions: CPP

  if impl(uhc)
    -- Cabal under UHC needs pointing out all the dependencies of the
    -- random package.
    Build-depends: old-time, old-locale
    -- Plus some bits of the standard library are missing.
    cpp-options: -DNO_FIXED -DNO_EXCEPTIONS

Test-Suite test-quickcheck
    type: exitcode-stdio-1.0
    hs-source-dirs:
        examples
    main-is: Heap.hs
    build-depends:
      base,
      containers,
      QuickCheck == 2.9,
      template-haskell >= 2.4,
      test-framework >= 0.4 && < 0.9
    if flag(templateHaskell)
        -- && !impl(haste)
        Buildable: True
    else
        Buildable: False

Test-Suite test-quickcheck-gcoarbitrary
    type: exitcode-stdio-1.0
    hs-source-dirs: tests
    main-is: GCoArbitraryExample.hs
    build-depends: base, QuickCheck == 2.9
    if impl(ghc < 7.2)
        buildable: False
    if impl(ghc >= 7.2) && impl(ghc < 7.6)
        build-depends: ghc-prim

Test-Suite test-quickcheck-generators
    type: exitcode-stdio-1.0
    hs-source-dirs: tests
    main-is: Generators.hs
    build-depends: base, QuickCheck == 2.9
    if !flag(templateHaskell)
       -- || impl(haste)
        Buildable: False

Test-Suite test-quickcheck-gshrink
    type: exitcode-stdio-1.0
    hs-source-dirs: tests
    main-is: GShrinkExample.hs
    build-depends: base, QuickCheck == 2.9
    if impl(ghc < 7.2)
        buildable: False
    if impl(ghc >= 7.2) && impl(ghc < 7.6)
        build-depends: ghc-prim