
8 Apr
2013
8 Apr
'13
5:07 p.m.
* Conal Elliott
What you're suggesting is called "non-linear patterns", and it's a perfectly sensible, well-defined feature in a language with pattern-matching.
One issue with it in Haskell is that it'd lead to inconsistent semantics: myEq x x = True is not the same as myEq x y = case y of x -> True IINM, in Erlang they have non-linear patterns, and no name shadowing, to be consistent. Roman