Hi,
Sounds bad. Consider:
gray :: Color
grey = newColor #ccc
This fairly common style of bug now becomes perfectly valid Haskell,
and if you always refer to grey, you may never even have a clue that
the bug is present.
I think the compiler should certainly give a warning that no
Hi
1. Allow empty case, i.e. case some_variable of { } (GHC ticket [1]).
This adds consistency, it always causes a pattern-match error, and it is a
sensible way to look at all the cases of types with no constructors (recall
EmptyDataDecls will probably be in Haskell' [4]) -- especially for
I'm with Neil on this. Suggestion 1 is great, whereas suggestion 2
just makes it easier to make mistakes, and that's not what we want.
On Fri, Aug 15, 2008 at 6:34 PM, Isaac Dupree [EMAIL PROTECTED] wrote:
There are two separate parts I propose, the second one I'm less sure of, but
they're
Neil Mitchell wrote:
Sounds bad. Consider:
gray :: Color
grey = newColor #ccc
My rationale for typoes not being a problem (both your
example, and the one Malcolm Wallace posted to the empty
case ticket) is that GHC will give you a warning anyway
(and that warning should be on by default).