There is the property that once you 'move across the = to the right', the pattern matcher isn't allowed to backtrack and try other patterns any more, which might introduce some funny business. Though, I can't -- at the moment -- come up with a way that it would break anything.
Is there a deep reason (beyond saving a sentence
or two in the language definition) for requiring
all patterns in a function binding to have the
same explicit arity?
For example, in
dropWhile0 :: Num a => [a] -> [a]
dropWhile0 (0:xs) = dropWhile0 xs
dropWhile0 xs = xs
why shouldn't the last line be replaceable by
dropWhile0 = id
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe