[Haskell-cafe] Haskell IO and exceptions

Mark Carroll markc at chiark.greenend.org.uk
Thu Dec 2 09:35:32 EST 2004

All this talk of IO and exceptions reminds me of a small issue I've been
having. I like Control.Monad.Error but often my stuff is threaded through
the IO monad so, AFAICT from the functional dependency stuff, that means
my errors have to be IOErrors. Is that right? And, then, I want control
over what's actually reported to the user, but if I make a userError than
the consequent message (where the details are presumably
platform-dependent) is wrapped up in extra text that I didn't want
appearing. Can I use Control.Monad.Error for IO monad stuff such that I
can control what string will appear when my error handler tries to "show"
my exception?

Admittedly, I'm still learning my way around this bit of the standard
libraries, so I may have missed something obvious.

-- Mark

More information about the Haskell-Cafe mailing list