index-core-1.0.0: Indexed Types

Safe HaskellSafe-Infered

Control.IMonad.Do

Contents

Description

This module rebinds do notation to work with restricted monads in conjunction with the RebindableSyntax extension. This module re-exports Control.IMonad, so it only requires the following minimum file header:

 {-# LANGUAGE RebindableSyntax #-}

 import Control.IMonad.Do
 import Prelude hiding (Monad(..))

The Prelude is reimported since RebindableSyntax also includes the NoImplicitPrelude extension, otherwise the Prelude's Monad bindings would conflict with these bindings.

Synopsis

Modules

Rebindings

return :: IMonad m => a -> m (a := i) iSource

return replaces return from Control.Monad.

(>>=) :: IMonad m => m (a := j) i -> (a -> m (b := k) j) -> m (b := k) iSource

(>>=) replaces (>>=) from Control.Monad.

(>>) :: IMonad m => m (a := j) i -> m (b := k) j -> m (b := k) iSource

(>>) replaces (>>) from Control.Monad.

fail :: String -> m (a := j) iSource

fail replaces fail from Control.Monad