packages feed

grfn-1.0.0.1: grfn.cabal

cabal-version:       3.6
name:                grfn
version:             1.0.0.1
homepage:            https://github.com/threeeyedgod/grfn#readme
license:             BSD-3-Clause
license-file:        LICENSE
author:              Venkatesh Narayanan
maintainer:          venkatesh.narayanan@live.in
copyright:           2024 ThreeEyedGod
synopsis:            Uniformly-random pre-factored numbers (Kalai)
description:
    @__grfn__@ is a focused library -- an implementation of Adam Kalai's algorithm 
    to get uniform pre-factored numbers. 
    See [README](https://github.com/threeeyedgod/grfn#grfn) for more details.        
category:            Algorithm, Random, Numbers
build-type:          Simple
stability:           experimental
extra-source-files:  README.md
extra-doc-files:
                     CHANGELOG.md
tested-with:         GHC == 9.8.2
                     GHC == 9.6.5

source-repository head
  type:     git
  location: https://github.com/threeeyedgod/grfn

library
  hs-source-dirs:      src
  exposed-modules:     FactoredRandomNumbers
  build-depends:      
                       base >= 4.18.2 && <= 4.20.0.1
                      ,protolude ^>= 0.3.4
                      ,text >= 2.0.2 && <= 2.1.1
                      ,random >=1.2.1.2 && < 1.3 
                      ,arithmoi >= 0.13.0 && < 0.14
                      ,monad-loops >= 0.4.3 && < 3.3 
                      ,parallel-io >= 0.3.5 && < 0.4 
                      ,async >=2.2.5 && < 2.3 
                      ,parallel >=3.2.2 && < 3.3
                      ,unamb ^>= 0.2.7
  default-language:    Haskell2010
  ghc-options:         -Wall
                       -Wcompat
                       -Widentities
                       -Wincomplete-record-updates
                       -Wincomplete-uni-patterns
                       -Wmissing-export-lists
                       -Wmissing-home-modules
                       -Wpartial-fields
                       -Wredundant-constraints
                       -fwrite-ide-info
                       -hiedir=.hie
                       -threaded
                       -Wunused-packages

executable grfn-exe
  hs-source-dirs:      app
  main-is:             Main.hs
  build-depends:       base
                     , grfn
                     , time >= 1.12.2 && < 1.13

  default-language:    Haskell2010
  ghc-options:         -Wall
                       -Wcompat
                       -Widentities
                       -Wincomplete-record-updates
                       -Wincomplete-uni-patterns
                       -Wmissing-export-lists
                       -Wmissing-home-modules
                       -Wpartial-fields
                       -Wredundant-constraints
                       -threaded
                       -rtsopts
                       -with-rtsopts=-N4

test-suite grfn-test
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs
  build-depends:       base
                     , grfn
                     , QuickCheck >= 2.14.3
                     , primes
                     , text >= 2.0.2 && <= 2.1.1
                     , hspec >= 2.11.7
                     , hspec-core >= 2.11.7

  default-language:    Haskell2010
  ghc-options:         
                       -- -Wall
                       -Wcompat
                       -Widentities
                       -Wincomplete-record-updates
                       -Wincomplete-uni-patterns
                       -Wmissing-export-lists
                       -Wmissing-home-modules
                       -Wpartial-fields
                       -Wredundant-constraints
                       -Wno-x-partial
                       -threaded
                       -rtsopts
                       -with-rtsopts=-N

benchmark grfn-benchmark
  type:                exitcode-stdio-1.0
  hs-source-dirs:      bench
  main-is:             BenchFactoredRandomNumbers.hs
  build-depends:       base
                     , tasty-bench
                     , grfn
                     , tasty >= 1.5
  default-language:    Haskell2010
  ghc-options:
                       -fproc-alignment=64 
                       -rtsopts
                       -threaded
                       -with-rtsopts=-N4