Portability | portable |
---|---|
Stability | experimental |
Maintainer | mad.one@gmail.com |
Safe Haskell | Safe-Inferred |
Indexed
s.
Monad
When using RebindableSyntax
with GHC, it's possible to overload
regular do
-notation to use the IxMonad
typeclass. See the
section "Using do
-notation" in the tutorial module
Control.Delimited.Tutorial.
Currently, indexed transformers are not provided. In the future,
this module may be replaced by the indexed
or index-core
libraries which provide more general types while still having
do
-notation, and providing transformers. In light of that, this
module will be expanded as needed.
- class IxApplicative m => IxMonad m where
- data MW m s t a
- lift :: Monad m => m a -> MW m s t a
- runI :: Monad m => MW m s t a -> m a
- (!>>) :: IxMonad m => m s t a -> m t u b -> m s u b
- (!>=>) :: IxMonad m => (a -> m t u b) -> (b -> m s t c) -> a -> m s u c
- (<=<!) :: IxMonad m => (b -> m s t c) -> (a -> m t u b) -> a -> m s u c
- (=<<!) :: IxMonad m => (a -> m s t b) -> m t u a -> m s u b
- liftIxM :: IxMonad m => (a -> b) -> m s t a -> m s t b
- liftIxM2 :: IxMonad m => (a -> b -> c) -> m t u a -> m s t b -> m s u c
Indexed Monad
s
Monad
class IxApplicative m => IxMonad m whereSource
Lifting ordinary Monad
s
Monad
runI :: Monad m => MW m s t a -> m aSource
This demotes a indexed monad into a regular monad. Useful
for when you're using e.g. RebindableSyntax
and want to do IO.
Operators
(!>=>) :: IxMonad m => (a -> m t u b) -> (b -> m s t c) -> a -> m s u cSource
Left-to-right Kleisli composition of indexed
s.
Monad
(<=<!) :: IxMonad m => (b -> m s t c) -> (a -> m t u b) -> a -> m s u cSource
Right-to-left Kleisli composition of indexed
s.
Monad