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 =
Compose
mFor any
Monad m
,Trail (Compose m)
is isomorphic tom
.Trail (Compose m) a ~ Compose 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