
23 Jun
2004
23 Jun
'04
5:46 a.m.
f (i:is) = even i : f is f e = e
This still makes perfect sense to me... you see the let binding: let e@[] = e has no additional information about the type of [] so it must be fully polymorphic. if the function binding we know typeOf e == typeOf (i:is) and that i is a member of the class Integral (from the application of even) As we always take the most precise available type we end up with forall a. Integral a => [a] as the type for 'e'... Now Bool is not a member of Integral so it is a type error! Keean.