| I want to make a different plea: keep the language design consistent!
| Yes, the difference between f, g, h is a wart, but let's have one wart
| repeated, rather than two different warts.

I am not convinced. This argument could be reverted to support
alternative 2. Haskell uses patterns in many different places,
monad expressions among other things. Why should we introduce
concepts (irrefutable, unfailable) only for monad expressions?
Why is
        head (a : as)   =  a
legal, but not
        do { ... (a : as) <- e ... }
So, to keep the language design consistent, let's adopt 2. The
expression `head []' fails (which means `error "..."' in the Id monad)
and the computation `(a : as) <- e' fails, as well (which means `mfail'
in an arbitrary monad).

A comment on names: I propose to use `fail' for the class method
and to rename IO's fail to `raise' which IMHO is more consistent
(the Report says: the `fail' function _raises_ an exception ...).

Cheers, Ralf




Reply via email to