haskus-system-0.6.0.0: Haskus system programming framework

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 Sys Source # 

Methods

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

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

MonadInIO m => MonadInIO (ConfigM m) Source # 

Methods

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

liftWith2 :: (forall c. (a -> b -> IO c) -> IO c) -> (a -> b -> ConfigM m e) -> ConfigM m 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 #