monad-bayes-1.3.0.1: A library for probabilistic programming.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Monad.Bayes.Density.State

Description

Slower than Control.Monad.Bayes.Density.Free, so not used by default, but more elementary to understand. Just uses standard monad transformer techniques.

Documentation

newtype DensityT m a Source #

Constructors

DensityT 

Fields

Instances

Instances details
MonadTrans DensityT Source # 
Instance details

Defined in Control.Monad.Bayes.Density.State

Methods

lift :: Monad m => m a -> DensityT m a #

Monad m => Applicative (DensityT m) Source # 
Instance details

Defined in Control.Monad.Bayes.Density.State

Methods

pure :: a -> DensityT m a #

(<*>) :: DensityT m (a -> b) -> DensityT m a -> DensityT m b #

liftA2 :: (a -> b -> c) -> DensityT m a -> DensityT m b -> DensityT m c #

(*>) :: DensityT m a -> DensityT m b -> DensityT m b #

(<*) :: DensityT m a -> DensityT m b -> DensityT m a #

Functor m => Functor (DensityT m) Source # 
Instance details

Defined in Control.Monad.Bayes.Density.State

Methods

fmap :: (a -> b) -> DensityT m a -> DensityT m b #

(<$) :: a -> DensityT m b -> DensityT m a #

Monad m => Monad (DensityT m) Source # 
Instance details

Defined in Control.Monad.Bayes.Density.State

Methods

(>>=) :: DensityT m a -> (a -> DensityT m b) -> DensityT m b #

(>>) :: DensityT m a -> DensityT m b -> DensityT m b #

return :: a -> DensityT m a #

MonadDistribution m => MonadDistribution (DensityT m) Source # 
Instance details

Defined in Control.Monad.Bayes.Density.State

Monad m => MonadState [Double] (DensityT m) Source # 
Instance details

Defined in Control.Monad.Bayes.Density.State

Methods

get :: DensityT m [Double] #

put :: [Double] -> DensityT m () #

state :: ([Double] -> (a, [Double])) -> DensityT m a #

Monad m => MonadWriter [Double] (DensityT m) Source # 
Instance details

Defined in Control.Monad.Bayes.Density.State

Methods

writer :: (a, [Double]) -> DensityT m a #

tell :: [Double] -> DensityT m () #

listen :: DensityT m a -> DensityT m (a, [Double]) #

pass :: DensityT m (a, [Double] -> [Double]) -> DensityT m a #

runDensityT :: Monad m => DensityT m b -> [Double] -> m (b, [Double]) Source #