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
#pure Source
pure :: forall x a m. IxApplicative m => a -> m x x a