random-fu-0.0.3.2: Random number generation

Data.Random.Lift

Synopsis

Documentation

class Lift m n whereSource

A class for "liftable" data structures. Conceptually an extension of MonadTrans to allow deep lifting, but lifting need not be done between monads only. Eg lifting between Applicatives is allowed.

For instances where m and n have 'return'/'pure' defined, these instances must satisfy lift (return x) == return x.

Methods

lift :: m a -> n aSource

Instances

Lift m m 
Monad m => Lift Identity m

This instance is incoherent with the other two. However, by the law lift (return x) == return x, the results must always be the same.

(Monad m, MonadTrans t) => Lift m (t m) 
Lift (RVarT Identity) (RVarT m)