Safe Haskell | None |
---|---|
Language | Haskell2010 |
A replacement of the standard Prelude for supermonads. Should provide
all of the functions also provided in the original prelude without
the functions related specifically to Monad
s. The functions related
to Monad
s are replaced with their supermonad counterparts.
A replacement for the functions in Control.Monad can be found in Control.Super.Monad.Functions.
- module Control.Super.Monad
- mapM_ :: (Return n, ReturnCts n, Bind m n n, BindCts m n n) => (a -> m b) -> [a] -> n ()
- sequence_ :: (Return n, ReturnCts n, Bind m n n, BindCts m n n) => [m b] -> n ()
- (=<<) :: (Bind m n p, BindCts m n p) => (a -> n b) -> m a -> p b
- mapM :: (Return n, ReturnCts n, Bind m n n, BindCts m n n) => (a -> m b) -> [a] -> n [b]
- sequence :: (Return n, ReturnCts n, Bind m n n, BindCts m n n) => [m b] -> n [b]
- ifThenElse :: Bool -> a -> a -> a
- module Control.Super.Monad.PreludeWithoutMonad
Supermonads
module Control.Super.Monad
Replacement functions
mapM_ :: (Return n, ReturnCts n, Bind m n n, BindCts m n n) => (a -> m b) -> [a] -> n () Source #
mapM
ignoring the result.
sequence_ :: (Return n, ReturnCts n, Bind m n n, BindCts m n n) => [m b] -> n () Source #
sequence
ignoring the result.
(=<<) :: (Bind m n p, BindCts m n p) => (a -> n b) -> m a -> p b infixr 1 Source #
Same as >>=
, but with the arguments interchanged.
Traversable replacement functions
mapM :: (Return n, ReturnCts n, Bind m n n, BindCts m n n) => (a -> m b) -> [a] -> n [b] Source #
Map the given function on each element of the list and collect the results.
sequence :: (Return n, ReturnCts n, Bind m n n, BindCts m n n) => [m b] -> n [b] Source #
Execute all computations in the list in order and returns the list of results.
Fix rebindable syntax
ifThenElse :: Bool -> a -> a -> a Source #
Standard implementation of if-then-else. Necessary because we are
going to use RebindableSyntax
together with this prelude.