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

Safe HaskellNone



newtype ProbT t m a Source


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


(Ring t, Monad m) => MonadWriter (Product t) (ProbT t m) 
(Unit m, Ring t) => Unit (ProbT t m) 
(Monad m, Invertible 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) 
Applicative m => Monoid (ProbT t m a) 
Applicative m => Semigroup (ProbT t m a) 

type Prob t a = ProbT t Id a Source

i'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 [(t, a)]) (m' [(t', a')]) Source

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

sample :: (Eq a, Monoid t) => a -> Prob t a -> (t, t) Source