[Haskell-cafe] Solved but strange error in type inference

AUGER Cédric sedrikov at gmail.com
Wed Jan 4 14:57:00 CET 2012

So is there anyway to "force" the scoping of variables, so that

f :: a -> a
f x = x :: a

becomes valid?

Do we need to do it the Ocaml way, that is not declaring the first
line, activate XScopedVariables and do:

f :: a -> a = \x -> x :: a
f (x :: a) = x :: a
some other thing

I don't see the point in universally quantifying over types which are
already present in the environment; it would make better sense for me
if only not yet declared types were used. 

More information about the Haskell-Cafe mailing list