name:                generic-random
version:             0.4.0.0
synopsis:            Generic random generators
description:         Please see the README.
homepage:            http://github.com/lysxia/generic-random
license:             MIT
license-file:        LICENSE
stability:           Experimental
author:              Li-yao Xia
maintainer:          lysxia@gmail.com
category:            Generics, Testing
build-type:          Simple
extra-source-files:  README.md CHANGELOG.md
cabal-version:       >=1.10
tested-with:         GHC == 8.0.1

flag test
  Description:
    Enable testing. Disabled by default because the current test suite
    is slow and can fail with non-zero probability.
  Manual:  True
  Default: False

library
  hs-source-dirs:      src
  exposed-modules:
    Generic.Random.Boltzmann
    Generic.Random.Data
    Generic.Random.Generic
    Generic.Random.Internal.Common
    Generic.Random.Internal.Data
    Generic.Random.Internal.Generic
    Generic.Random.Internal.Oracle
    Generic.Random.Internal.Solver
    Generic.Random.Internal.Types
  build-depends:
    base >= 4.9 && < 4.10,
    containers,
    hashable,
    unordered-containers,
    ieee754,
    ad,
    hmatrix,
    vector,
    mtl,
    transformers,
    MonadRandom,
    QuickCheck
  default-language:    Haskell2010
  ghc-options: -Wall -fno-warn-name-shadowing

test-suite test-tree
  type:             exitcode-stdio-1.0
  hs-source-dirs:   test
  main-is:          tree.hs
  default-language: Haskell2010
  other-modules:
    Test.Stats,
    Test.Tree
  if flag(test)
    build-depends:
      base,
      QuickCheck,
      optparse-generic,
      generic-random
  else
    buildable: False

benchmark bench-binarytree
  type:             exitcode-stdio-1.0
  hs-source-dirs:   bench
  main-is:          binaryTree.hs
  default-language: Haskell2010
  ghc-options: -O2
  if flag(test)
    build-depends:
      base,
      criterion,
      deepseq,
      QuickCheck,
      transformers,
      testing-feat,
      generic-random
  else
    buildable: False

source-repository head
  type:     git
  location: https://github.com/lysxia/generic-random