
5 Jul
2006
5 Jul
'06
5:41 p.m.
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