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 y x b a f. IxFunctor f => (a -> b) -> f x y a -> f x y b

#apply Source

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

#pure Source

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

#bind Source

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

#discard Source

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