[Haskell-cafe] All equations must have the same arity - why?

Bulat Ziganshin bulat.ziganshin at gmail.com
Mon Jan 14 02:38:44 EST 2008


Hello Neil,

Monday, January 14, 2008, 2:12:52 AM, you wrote:

> But sometimes I have to add an extra case, on a certain value:

> f [] = [1]
> f = sort . nub

> Is there a reason this isn't done?

this may be also due an error, and in most cases it actually will be
due an error. then it makes type inference trickier and will led to
very strange error messages instead of simple "different amount of
arguments". so, we will buy power but lose simplicity


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list