[Haskell-cafe] better error expression in IO function

Andrew Coppin andrewcoppin at btinternet.com
Thu Jul 12 14:05:09 EDT 2007


Brandon S. Allbery KF8NH wrote:
>
> On Jul 11, 2007, at 15:57 , brad clawsie wrote:
>
>> i know the Either type can be used in such a case(?), but i've had some
>> problem locating a satisfactory example (if this is indeed
>> appropriate)
>
> You might want to look at MonadError (Control.Monad.Error), more 
> specifically ErrorT layered on top of IO.
>

I think *I* might want to spend some time reading about that...

(Throwing and catching exceptions is just fiddly.)



More information about the Haskell-Cafe mailing list