On Wed, Jan 4, 2012 at 7:58 PM, Yves Parès <limestr...@gmail.com> wrote:
> f :: forall a. a -> a
> f x = x :: forall a. a
>
> Which is obviously wrong: when you have entered f, x has been instatiated to
> a specific type 'a', and then you want it to x to be of any type? That
> doesn't make sense.

I did not expect the type variables to be scoped.

I expected the type of 'x' to be universally quantified, and thus can be unified
with 'forall a. a' with no problem.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to