| I don't agree with your argument that
| because pattern match failure in function definitions is not catched by the
| type-checker justifies dropping that extra safety for pattern matching in
| the do-notation.

You've missed my point, the nub of which was that we should get
our compilers to check for exhaustive pattern matches, and to
report errors (or warnings, as Ralf prefers) for non-exhaustive
matches.  This would catch strictly more errors than changes in
the typing rules for do notation.  Haskell doesn't require the
former at the moment, and Hugs doesn't test for it.  Clearly, we
should fix that.  The treatment of do notation should be handled
as a separate issue.

| As Koen said, some of the proposed type weakenings (unoverloading
| list-comprehensions, junking MonadZero) are partly motived by the fact that
| the type checker gives bad error messages.  Well, I rather have bad error
| messages from the type checker than good error messages at run-time!

Yes, and adding a check for non-exhaustive pattern matches also gives
you error messages at compile-time rather than run-time; and it can
detect more of them.  What does your proposal offer that mine lacks?

| Strong typing is what distinguishes Haskell from the muck, let's be
| proud of it.

Be proud of it, but recognize its limitations, and also the other options
that can sometimes do a better job.

All the best,
Mark


Reply via email to