patch applied (ghc): Fix Trac #3017: ensure that we quantify over enough type variables when equalities are involved

Simon Peyton Jones simonpj at microsoft.com
Wed Feb 11 12:57:07 EST 2009


Wed Feb 11 09:47:33 PST 2009  simonpj at microsoft.com
  * Fix Trac #3017: ensure that we quantify over enough type variables when equalities are involved
  Ignore-this: 92838c0a556240a8fb7744e3f29aa0f9
  
  The function FunDeps.grow was not doing the right thing when type equality
  constraints were involved.  That wasn't really its fault: its input was
  being filtered by fdPredsOfInsts.
  
  To fix this I did a bit of refactoring, so that the (revolting) fdPredsOfInsts
  is now less important (maybe we can get rid of it in due course).  The 'grow'
  function moves from FunDeps to
  	 Inst.growInstsTyVars
  	 TcMTType.growThetaTyVars
  	 TcMType.growTyVars
  
  The main comments are with the first of these, in
  Note [Growing the tau-tvs using constraints] in Inst.
  
  Push to the branch if conflict free.
  
  

    M ./compiler/basicTypes/VarSet.lhs -1 +8
    M ./compiler/typecheck/Inst.lhs -5 +45
    M ./compiler/typecheck/TcMType.lhs -1 +24
    M ./compiler/typecheck/TcSimplify.lhs -3 +3
    M ./compiler/typecheck/TcTyClsDecls.lhs -2 +1
    M ./compiler/types/FunDeps.lhs -39 +1

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20090211174733-1287e-12b4270a4a140df3a964318628621b04cdc16e44.gz



More information about the Cvs-ghc mailing list