Module

Control.Monad.Indexed.Qualified

Package
purescript-indexed-monad
Repository
garyb/purescript-indexed-monad

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 Source

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

#apply Source

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

#pure Source

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

#bind Source

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

#discard Source

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