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 equations are
defined for a definition. It would be impossible to check for user typos!
:)

It does make me beg the question though: why do we want to define
data types without any constructors?

If we do opt for empty data declarations, then both general
pattern matching and case expressions need to be able to cope with it for
consistency.



Regards,
Chris

_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime

Reply via email to