> I can't seem to find any examples of how to actually implement liftIO for a 
> monad. Any ideas/pointers?
> 

Searching the haskell wiki for MonadIO gives several examples.

http://haskell.org/haskellwiki/New_monads/MonadExit

> instance MonadIO m => MonadIO (ExitT e m) where
>   liftIO = lift . liftIO

Where you can see you are just delegating the work of the transformer to the
underlying monad.  Eventually it hits the bottom of the stack and sees:

> instance MonadIO IO where
>   liftIO = id


_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to