
29 May
2009
29 May
'09
10:36 a.m.
On Fri, May 29, 2009 at 12:29 PM, Paul Keir
f''' = ([]::[()]) == ([]::[()])
(Very pretty.)
So why doesn't ghc have 'default' instances?
It does. I believe Num defaults to Integer and then to Double. Generally, though, defaults are convenient in exploratory usage but confusing in compiled code. In compiled code, you don't want arbitrary choices of defaults to affect performance and correctness. I've had programs run much slower than expected because the types defaulted to Integer rather than Int. --Max