• simonpj's avatar
    [project @ 2004-12-21 12:22:22 by simonpj] · 79a8b87c
    simonpj authored
         Improve handling of lexically scoped type variables
    If we have
    	f :: T a -> a
    	f (x :: T b) = ...
    then the lexically scoped variable 'b' should refer to the rigid
    type variable 'a', without any intervening wobbliness.  Previously
    the in-scope type variables were always mutable TyVars, which were
    instantatiated to point to the type they were bound to; but since
    the advent of GADTs the intervening mutable type variable is a bad
      * In the type environment, ATyVar now carries a type
      * The call to refineTyVars in tc_pat on SigPatIn
        finds the types by matching
      * Then tcExtendTyVarEnv3 extends the type envt appropriately
    Rater a lot of huff and puff, but it's quite natural for ATyVar
    to contain a type.
    Various other small nomenclature changes along the way.