> I don't see the point in universally quantifying over types which are
already present in the environment

I think it reduces the indeterminacy you come across when you read your
program ("where does this type variable come from, btw?")

> So is there anyway to "force" the scoping of variables, so that
> f :: a -> a
> f x = x :: a
> becomes valid?

You mean either than compiling with ScopedTypeVariables and adding the
explicit forall a. on f? I don't think.

2012/1/4 Brandon Allbery <allber...@gmail.com>
On Wed, Jan 4, 2012 at 08:41, Yves Parès <limestr...@gmail.com> wrote:

> Would you try:
>
> f :: a -> a
> f x = undefined :: a
>
> And tell me if it works? IMO it doesn't.

>  It won't

Apparently, Yucheng says it does.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to