[Haskell-cafe] Re: Foralls in records
haskell at list.mightyreason.com
Wed Mar 14 10:58:30 EDT 2007
> 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.
> 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
More information about the Haskell-Cafe