mwc-probability.cabal (1919B)
1 name: mwc-probability 2 version: 2.3.1 3 homepage: http://github.com/jtobin/mwc-probability 4 license: MIT 5 license-file: LICENSE 6 author: Jared Tobin, Marco Zocca 7 maintainer: jared@jtobin.ca, zocca.marco gmail 8 category: Math 9 build-type: Simple 10 cabal-version: >= 1.10 11 tested-with: GHC == 8.0.2, GHC == 8.2.2 , GHC == 8.4.2, GHC == 8.6.5, 12 GHC == 8.8.3 13 synopsis: Sampling function-based probability distributions. 14 description: 15 16 A simple probability distribution type, where distributions are characterized 17 by sampling functions. 18 . 19 This implementation is a thin layer over @mwc-random@, which handles RNG 20 state-passing automatically by using a @PrimMonad@ like @IO@ or @ST s@ under 21 the hood. 22 . 23 /Examples/ 24 . 25 Transform a distribution's support while leaving its density structure 26 invariant: 27 . 28 > -- uniform over [0, 1] to uniform over [1, 2] 29 > fmap succ uniform 30 . 31 Sequence distributions together using bind: 32 . 33 > -- a beta-binomial compound distribution 34 > beta 1 10 >>= binomial 10 35 . 36 Use do-notation to build complex joint distributions from composable, 37 local conditionals: 38 . 39 > hierarchicalModel = do 40 > [c, d, e, f] <- replicateM 4 $ uniformR (1, 10) 41 > a <- gamma c d 42 > b <- gamma e f 43 > p <- beta a b 44 > n <- uniformR (5, 10) 45 > binomial n p 46 extra-source-files: README.md 47 CHANGELOG 48 49 Source-repository head 50 Type: git 51 Location: http://github.com/jtobin/mwc-probability.git 52 53 library 54 exposed-modules: System.Random.MWC.Probability 55 default-language: Haskell2010 56 hs-source-dirs: src 57 build-depends: 58 base >= 4.8 && < 6 59 , containers >= 0.6 60 , mwc-random > 0.13 && < 0.16 61 , primitive >= 0.6 && < 1.0 62 , transformers >= 0.5 && < 1.0 63