Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
For any
, FMonad
mmTrail mm
is a Monad
.
Example
Trail mm
can become variantions of Monad
for different FMonad mm
.
mm =
ComposePost
mFor any
Monad m
,Trail (ComposePost m)
is isomorphic tom
.Trail (ComposePost m) a ~ ComposePost m ((,) a) () ~ m (a, ()) ~ m a
mm =
Free
Trail Free
is isomorphic to the list monad[]
.Trail Free a ~ Free ((,) a) () ~ [a]
mm =
FreeT'
mFor any
Monad m
,Trail (FreeT' m)
is isomorphic toListT m
, whereListT
is so-called "ListT done right."Trail (FreeT' m) a ~ FreeT ((,) a) m () ~ ListT m a
See more for examples/ListTVia.hs