definitive-base-1.0: The base modules of the Definitive framework.

Safe HaskellNone

Data.Probability

Documentation

newtype ProbT t m a Source

Constructors

ProbT (WriterT (Product t) (ListT m) a) 

Instances

(Ring t, Monad m) => MonadWriter (Product t) (ProbT t m) 
(Unit m, Ring t) => Unit (ProbT t m) 
(Monad m, Ring t, Fractional t) => MonadList (ProbT t m) 
(Ring t, MonadFix m) => MonadFix (ProbT t m) 
(Ring t, Monad m) => Monad (ProbT t m) 
(Ring t, Monad m) => Applicative (ProbT t m) 
Functor m => Functor (ProbT t m) 

type Prob t a = ProbT t Id aSource

_ProbT :: Iso (ProbT t m a) (ProbT t' m' a') (WriterT (Product t) (ListT m) a) (WriterT (Product t') (ListT m') a')Source

probT :: (Functor m, Functor m') => Iso (ProbT t m a) (ProbT t' m' a') (m [(Product t, a)]) (m' [(Product t', a')])Source

prob :: Iso (Prob t a) (Prob t' a') [(Product t, a)] [(Product t', a')]Source