[project @ 2004-12-24 11:02:39 by simonpj]
authorsimonpj <unknown>
Fri, 24 Dec 2004 11:03:06 +0000 (11:03 +0000)
committersimonpj <unknown>
Fri, 24 Dec 2004 11:03:06 +0000 (11:03 +0000)
commit0ee11df0098509d06cf6fc03d1a18429985b6081
tree87fadb63d0d1a05f381ca65a32532add6f65e901
parentfdba7999ba01b4e2b4ee704e6784192e4d92b8cf
[project @ 2004-12-24 11:02:39 by simonpj]
Further wibbles to the scoped-tyvar story.

This commit tidies up the ATyVar in TcTyThing, making it
ATyVar Name Type
instead of the previous misleading
ATyVar TyVar Type

But the main thing is that we must take care with definitions
like this:

type T a = forall b. b -> (a,b)

f :: forall c. T c
f = ...

Here, we want only 'c' to scope over the RHS of f.  The renamer ensures
that... but we must also take care that we freshly instantiate the
expanded type signature (forall c b. b -> (c,b)) before checking f's RHS,
so that we don't get false sharing between uses of T.
ghc/compiler/typecheck/TcBinds.lhs
ghc/compiler/typecheck/TcClassDcl.lhs
ghc/compiler/typecheck/TcEnv.lhs
ghc/compiler/typecheck/TcExpr.lhs
ghc/compiler/typecheck/TcHsType.lhs
ghc/compiler/typecheck/TcInstDcls.lhs
ghc/compiler/typecheck/TcPat.lhs
ghc/compiler/typecheck/TcRnTypes.lhs