simonpj     2004/12/21 04:23:05 PST

  Modified files:
    ghc/compiler/coreSyn Subst.lhs 
    ghc/compiler/specialise Rules.lhs 
    ghc/compiler/typecheck Inst.lhs TcEnv.lhs TcExpr.lhs 
                           TcHsType.lhs TcPat.lhs TcRnTypes.lhs 
                           TcSplice.lhs TcType.lhs TcUnify.lhs 
    ghc/compiler/types   FunDeps.lhs InstEnv.lhs Type.lhs 
                         Unify.lhs 
  Log:
        ---------------------------------
       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
  thing.
  
  Hence
    * 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.
  
  Revision  Changes    Path
  1.46      +5 -5      fptools/ghc/compiler/coreSyn/Subst.lhs
  1.44      +2 -2      fptools/ghc/compiler/specialise/Rules.lhs
  1.143     +2 -2      fptools/ghc/compiler/typecheck/Inst.lhs
  1.134     +20 -17    fptools/ghc/compiler/typecheck/TcEnv.lhs
  1.176     +4 -21     fptools/ghc/compiler/typecheck/TcExpr.lhs
  1.17      +2 -2      fptools/ghc/compiler/typecheck/TcHsType.lhs
  1.103     +51 -8     fptools/ghc/compiler/typecheck/TcPat.lhs
  1.47      +10 -3     fptools/ghc/compiler/typecheck/TcRnTypes.lhs
  1.47      +2 -2      fptools/ghc/compiler/typecheck/TcSplice.lhs
  1.114     +2 -2      fptools/ghc/compiler/typecheck/TcType.lhs
  1.59      +3 -0      fptools/ghc/compiler/typecheck/TcUnify.lhs
  1.26      +4 -4      fptools/ghc/compiler/types/FunDeps.lhs
  1.36      +4 -4      fptools/ghc/compiler/types/InstEnv.lhs
  1.129     +13 -10    fptools/ghc/compiler/types/Type.lhs
  1.18      +23 -23    fptools/ghc/compiler/types/Unify.lhs
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to