Re: Pattern match errors in do?
"Neil Mitchell" <[email protected]> Wed, 5 Jul 2006 22:41:47 +0100
| Newsgroups | gmane.comp.lang.haskell.hat |
|---|---|
| Message-ID | <[email protected]> |
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