Module

Control.Monad.Indexed.Qualified

Use this module to rebind do/ado notation via Qualified Do/Ado.

For example, here's how one would rebind do notation.

import Control.Monad.Indexed.Qualified as Ix

f = Ix.do -- remaps do notation to use `ibind` and `idiscard`
  x <- foo
  bar
  I.pure y

For example, here's how one would rebind ado notation.

import Control.Monad.Indexed.Qualified as Ix

g = Ix.ado -- remaps do notation to use `iapply` and `imap`
 x <- foo
 y <- bar
 in x + y

#map

map :: forall f a b x y. IxFunctor f => (a -> b) -> f x y a -> f x y b

#apply

apply :: forall m a b x y z. IxApply m => m x y (a -> b) -> m y z a -> m x z b

#pure

pure :: forall m a x. IxApplicative m => a -> m x x a

#bind

bind :: forall m a b x y z. IxMonad m => m x y a -> (a -> m y z b) -> m x z b

#discard

discard :: forall m a b x y z. IxBind m => IxDiscard a => m x y a -> (a -> m y z b) -> m x z b

Modules