• simonpj's avatar
    [project @ 2004-12-24 11:02:39 by simonpj] · 0ee11df0
    simonpj authored
    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.