Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
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 Applicative
s is allowed.
For instances where m
and n
have 'return'/'pure' defined,
these instances must satisfy
lift (return x) == return x
.
This form of lift
has an extremely general type and is used primarily to
support sample
. Its excessive generality is the main reason it's not
exported from Data.Random. RVarT
is, however, an instance of
MonadTrans
, which in most cases is the preferred way
to do the lifting.
Instances
Lift m m Source # | |
Defined in Data.Random.Lift | |
Monad m => Lift Identity m Source # | This instance is incoherent with the others. However,
by the law |
Defined in Data.Random.Lift | |
(Monad m, MonadTrans t) => Lift m (t m) Source # | |
Defined in Data.Random.Lift | |
MonadTrans t => Lift Identity (t Identity) Source # | This instance is again incoherent with the others, but provides a
more-specific instance to resolve the overlap between the
|
Lift (RVarT Identity) (RVarT m) Source # | |