effect-handlers-0.1.0.8: A library for writing extensible algebraic effects and handlers. Similar to extensible-effects but with deep handlers.

Safe HaskellNone
LanguageHaskell2010

Control.Effects.IO

Synopsis

Documentation

data LiftIO a Source #

The functor representing the effect. You shouldn't need to create this manually, just use liftIO.

Constructors

LiftIO (IO r) (r -> a) 

Instances

Functor LiftIO Source # 

Methods

fmap :: (a -> b) -> LiftIO a -> LiftIO b #

(<$) :: a -> LiftIO b -> LiftIO a #

liftIO :: Member LiftIO r => IO a -> Eff r a Source #

Lift an existing IO action into the effect monad.

ioHandler :: Handler LiftIO '[] a (IO a) Source #

Handle by converting back to IO. Note that it is required that the effect stack is otherwise empty - this handler would not typecheck otherwise.