[Haskell-cafe] MPTCs and rigid variables
dmhouse at gmail.com
Tue Mar 6 09:34:32 EST 2007
On 06/03/07, Simon Peyton-Jones <simonpj at microsoft.com> wrote:
> 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 at gmail.com
More information about the Haskell-Cafe