[Haskell-cafe] Re: Foralls in records

Adde adde at trialcode.com
Wed Mar 14 12:40:13 EDT 2007

Chris Kuklewicz <haskell <at> list.mightyreason.com> writes:

> 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

Ah, so to combine my monad with IO i need to write a monad Transformer 
(TransactionT), then I can make it an instance of MonadIO?
I found examples like the ones you gave but the whole transformer-part got me 
a bit confused. Sorry, should have spent some more time reading before asking.

More information about the Haskell-Cafe mailing list