distribution-1.1.1.0: Finite discrete probability distributions.

Safe HaskellSafe
LanguageHaskell98

Data.Distribution.Monadic

Description

This modules provides a monadic interface to build distributions.

Synopsis

Documentation

data Experiment a #

Monadic description of distributions.

Instances

Monad Experiment # 

Methods

(>>=) :: Experiment a -> (a -> Experiment b) -> Experiment b #

(>>) :: Experiment a -> Experiment b -> Experiment b #

return :: a -> Experiment a #

fail :: String -> Experiment a #

Functor Experiment # 

Methods

fmap :: (a -> b) -> Experiment a -> Experiment b #

(<$) :: a -> Experiment b -> Experiment a #

Applicative Experiment # 

Methods

pure :: a -> Experiment a #

(<*>) :: Experiment (a -> b) -> Experiment a -> Experiment b #

liftA2 :: (a -> b -> c) -> Experiment a -> Experiment b -> Experiment c #

(*>) :: Experiment a -> Experiment b -> Experiment b #

(<*) :: Experiment a -> Experiment b -> Experiment a #

from :: Ord a => Distribution a -> Experiment a #

Converts a concrete distribution into its monadic representation.

run :: Ord a => Experiment a -> Distribution a #

Converts the monadic description of the distribution to a concrete distribution.