haskus-utils-0.6.0.0: Haskus utility modules

Safe HaskellSafe
LanguageHaskell2010

Haskus.Utils.Monad

Description

Utils for Monads

Documentation

class MonadIO m => MonadInIO m where Source #

Minimal complete definition

liftWith, liftWith2

Methods

liftWith :: (forall c. (a -> IO c) -> IO c) -> (a -> m b) -> m b Source #

Lift with*-like functions into IO (alloca, etc.)

liftWith2 :: (forall c. (a -> b -> IO c) -> IO c) -> (a -> b -> m e) -> m e Source #

Lift with*-like functions into IO (alloca, etc.)

Instances

MonadInIO IO Source # 

Methods

liftWith :: (forall c. (a -> IO c) -> IO c) -> (a -> IO b) -> IO b Source #

liftWith2 :: (forall c. (a -> b -> IO c) -> IO c) -> (a -> b -> IO e) -> IO e Source #

MonadInIO m => MonadInIO (StateT s m) Source # 

Methods

liftWith :: (forall c. (a -> IO c) -> IO c) -> (a -> StateT s m b) -> StateT s m b Source #

liftWith2 :: (forall c. (a -> b -> IO c) -> IO c) -> (a -> b -> StateT s m e) -> StateT s m e Source #