
6 Mar
2007
6 Mar
'07
9:34 a.m.
On 06/03/07, Simon Peyton-Jones
4. The "rigid type variable" thing isn't just an implementation question. What *would* you like the error message to say when you write f :: ([a], Int) -> Int f (x:xs, y) = x+y Here we unify 'a' with Int, which is wrong. What would a nicer error message say?
"Inferred type was monomorphic but a polymorphic type was given", or something. Hugs says "Inferred type not as polymorphic as expected", which is the right kind of area. -- -David House, dmhouse@gmail.com