[Hat] Pattern match errors in do?

Neil Mitchell ndmitchell at gmail.com
Wed Jul 5 17:41:47 EDT 2006


Hi,

> A pattern match failure in a "do" will call "fail" (not "error" as other
> pattern match failures do). This is the "fail" of the IO monad, which
> calls "ioError".

I believe according to Haskell 98, fail in the IO monad calls error -
its only recent extension to GHC/Hugs which have resulted in ioError
and exceptions. Perhaps for the purposes of hat stuff, error should be
called instead? At least until a proper exception story can be
developed.

Thanks

Neil


More information about the Hat mailing list