cvs commit: fptools/ghc/compiler/basicTypes VarSet.lhs fptools/ghc/compiler/coreSyn CoreLint.lhs fptools/ghc/compiler/deSugar Desugar.lhs DsArrows.lhs fptools/ghc/compiler/specialise Specialise.lhs fptools/ghc/compiler/typecheck TcBinds.lhs ...

Simon Peyton Jones simonpj at glass.cse.ogi.edu
Wed Dec 17 03:29:43 EST 2003


simonpj     2003/12/17 03:29:42 PST

  Modified files:
    ghc/compiler/basicTypes VarSet.lhs 
    ghc/compiler/coreSyn CoreLint.lhs 
    ghc/compiler/deSugar Desugar.lhs DsArrows.lhs 
    ghc/compiler/simplCore OccurAnal.lhs 
    ghc/compiler/specialise Specialise.lhs 
    ghc/compiler/typecheck TcBinds.lhs TcSimplify.lhs 
  Log:
    -----------------------------------------------------
    Fix a subtle loop in the context-reduction machinery
    ----------------------------------------------------
  
  This bug was provoked by a recent change: when trying to prove
  a constraint C, TcSimplify.reduce now adds C to the database before
  trying to prove C, thus building recursive dictionaries.
  
  Two bugs
  a) If we add C's superclasses (which we were) we can now build a
     bogusly-recursive dictionary (see Note [SUPERCLASS-LOOP]).
     Solution: in reduce, add C only (via addIrred NoSCs) and then
     later use addWanted to add its definition plus SCs.
  
  b) Since we can have recursive definitions, the superclass-loop
     handling machinery (findAllDeps) must carry its visited-set
     with it (which it was not doing before)
  
  The main file is TcSimplify; but I modified a bunch of others to
  take advantage of new function extendVarSetList
  
  Revision  Changes    Path
  1.14      +3 -1      fptools/ghc/compiler/basicTypes/VarSet.lhs
  1.75      +1 -1      fptools/ghc/compiler/coreSyn/CoreLint.lhs
  1.68      +1 -1      fptools/ghc/compiler/deSugar/Desugar.lhs
  1.10      +2 -2      fptools/ghc/compiler/deSugar/DsArrows.lhs
  1.70      +1 -1      fptools/ghc/compiler/simplCore/OccurAnal.lhs
  1.87      +1 -1      fptools/ghc/compiler/specialise/Specialise.lhs
  1.122     +2 -2      fptools/ghc/compiler/typecheck/TcBinds.lhs
  1.127     +51 -45    fptools/ghc/compiler/typecheck/TcSimplify.lhs


More information about the Cvs-ghc mailing list