packages feed

monad-bayes-1.3.0.5: monad-bayes.cabal

cabal-version:   2.2
name:            monad-bayes
version:         1.3.0.5
license:         MIT
license-file:    LICENSE.md
copyright:       2015-2020 Adam Scibior
maintainer:      dominic.steinitz@tweag.io
author:          Adam Scibior <adscib@gmail.com>
stability:       experimental
tested-with:     GHC ==9.0 || ==9.2 || ==9.4 || ==9.6 || ==9.8 || ==9.10
homepage:        http://github.com/tweag/monad-bayes#readme
bug-reports:     https://github.com/tweag/monad-bayes/issues
synopsis:        A library for probabilistic programming.
description:
  A library for probabilistic programming using probability monads. The
  emphasis is on composition of inference algorithms implemented in
  terms of monad transformers.
  Please refer to the [documentation](https://monad-bayes.netlify.app/)
  for a quick-start user guide and a reference overview of how it all
  works" and the included [README](#readme).

category:        Statistics
build-type:      Simple
extra-doc-files:
  CHANGELOG.md
  README.md

data-files:      test/fixtures/*.txt

source-repository head
  type:     git
  location: https://github.com/tweag/monad-bayes.git

flag dev
  description: Turn on development settings.
  default:     False
  manual:      True

common deps
  build-depends:
    , base             >=4.15     && <4.22
    , brick            ^>=2.10
    , containers       >=0.6      && <0.8
    , foldl            ^>=1.4
    , free             ^>=5.2
    , histogram-fill   ^>=0.9
    , ieee754          ^>=0.8.0
    , integration      ^>=0.2
    , lens             >=5.2      && <5.4
    , linear           >=1.22     && <1.24
    , log-domain       >=0.12     && <0.14
    , math-functions   >=0.2.1    && <0.4
    , matrix           ^>=0.3
    , monad-coroutine  ^>=0.9.0
    , monad-extras     ^>=0.6
    , mtl              >=2.2.2    && <2.4
    , mwc-random       >=0.13.6   && <0.16
    , pipes            ^>=4.3
    , pretty-simple    ^>=4.1
    , primitive        >=0.8      && <0.10
    , random           ^>=1.2
    , safe             ^>=0.3.17
    , scientific       ^>=0.3
    , statistics       >=0.14.0   && <0.17
    , text             >=1.2      && <2.2
    , transformers     >=0.5.6    && <0.7
    , vector           >=0.12.0   && <0.14
    , vty              >=6.4      && <6.6
    , vty-unix         ^>=0.2.0.0

common test-deps
  build-depends:
    , abstract-par          ^>=0.3
    , criterion             >=1.5  && <1.7
    , directory             ^>=1.3
    , hspec                 >=2.10 && <2.12
    , monad-bayes
    , optparse-applicative  >=0.17 && <0.19
    , process               ^>=1.6
    , QuickCheck            >=2.14 && <2.16
    , time                  >=1.9  && <1.13
    , typed-process         ^>=0.2

  autogen-modules: Paths_monad_bayes
  other-modules:   Paths_monad_bayes

library
  import:             deps
  exposed-modules:
    Control.Monad.Bayes.Class
    Control.Monad.Bayes.Density.Free
    Control.Monad.Bayes.Density.State
    Control.Monad.Bayes.Enumerator
    Control.Monad.Bayes.Inference.Lazy.MH
    Control.Monad.Bayes.Inference.Lazy.WIS
    Control.Monad.Bayes.Inference.MCMC
    Control.Monad.Bayes.Inference.PMMH
    Control.Monad.Bayes.Inference.RMSMC
    Control.Monad.Bayes.Inference.SMC
    Control.Monad.Bayes.Inference.SMC2
    Control.Monad.Bayes.Inference.TUI
    Control.Monad.Bayes.Integrator
    Control.Monad.Bayes.Population
    Control.Monad.Bayes.Sampler.Lazy
    Control.Monad.Bayes.Sampler.Strict
    Control.Monad.Bayes.Sequential.Coroutine
    Control.Monad.Bayes.Traced
    Control.Monad.Bayes.Traced.Basic
    Control.Monad.Bayes.Traced.Dynamic
    Control.Monad.Bayes.Traced.Static
    Control.Monad.Bayes.Weighted
    Math.Integrators.StormerVerlet

  hs-source-dirs:     src
  other-modules:      Control.Monad.Bayes.Traced.Common
  default-language:   Haskell2010
  default-extensions:
    BlockArguments
    FlexibleContexts
    ImportQualifiedPost
    LambdaCase
    OverloadedStrings
    TupleSections

  if flag(dev)
    ghc-options:
      -Wall -Werror -Wno-missing-local-signatures -Wno-trustworthy-safe
      -Wno-missing-import-lists -Wno-implicit-prelude -Wno-name-shadowing
      -Wno-monomorphism-restriction -Wredundant-constraints

  else
    ghc-options: -Wall

executable example
  import:             deps, test-deps
  main-is:            Single.hs
  hs-source-dirs:     benchmark models
  other-modules:
    Dice
    Helper
    HMM
    LDA
    LogReg

  default-language:   Haskell2010

  if flag(dev)
    ghc-options:
      -Wall -Werror -Wcompat -Wincomplete-record-updates
      -Wincomplete-uni-patterns -Wnoncanonical-monad-instances

  else
    ghc-options: -Wall

  default-extensions:
    BlockArguments
    FlexibleContexts
    ImportQualifiedPost
    LambdaCase
    OverloadedStrings
    TupleSections

test-suite monad-bayes-test
  import:             deps, test-deps
  type:               exitcode-stdio-1.0
  main-is:            Spec.hs
  hs-source-dirs:     test models
  other-modules:
    BetaBin
    ConjugatePriors
    Helper
    HMM
    LDA
    LogReg
    NonlinearSSM
    NonlinearSSM.Algorithms
    Sprinkler
    TestAdvanced
    TestBenchmarks
    TestDistribution
    TestEnumerator
    TestInference
    TestIntegrator
    TestPipes
    TestPopulation
    TestSampler
    TestSequential
    TestSSMFixtures
    TestStormerVerlet
    TestWeighted

  default-language:   Haskell2010

  if flag(dev)
    ghc-options:
      -Wall -Werror -Wno-missing-local-signatures -Wno-unsafe
      -Wno-missing-import-lists -Wno-implicit-prelude

  else
    ghc-options: -Wall

  default-extensions:
    BlockArguments
    FlexibleContexts
    ImportQualifiedPost
    LambdaCase
    OverloadedStrings
    TupleSections

benchmark ssm-bench
  import:           deps, test-deps
  type:             exitcode-stdio-1.0
  main-is:          SSM.hs
  hs-source-dirs:   models benchmark
  other-modules:
    NonlinearSSM
    NonlinearSSM.Algorithms

  default-language: Haskell2010
  build-depends:
    , base
    , monad-bayes
    , pretty-simple
    , random

benchmark speed-bench
  import:             deps, test-deps
  type:               exitcode-stdio-1.0
  main-is:            Speed.hs
  hs-source-dirs:     models benchmark
  other-modules:
    HMM
    LDA
    LogReg

  default-language:   Haskell2010

  if flag(dev)
    ghc-options:
      -Wall -Werror -Wno-missing-local-signatures -Wno-unsafe
      -Wno-missing-import-lists -Wno-implicit-prelude

  else
    ghc-options: -Wall

  default-extensions:
    BlockArguments
    FlexibleContexts
    ImportQualifiedPost
    LambdaCase
    OverloadedStrings
    TupleSections