[commit: ghc] master: More refactoring of FamInst/FamInstEnv; finally fixes Trac #7524 (a98e51e)

Simon Peyton Jones simonpj at microsoft.com
Mon Jan 28 22:01:01 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/a98e51ecf51d1a93d48a8a10d35827edfd9d8c28

>---------------------------------------------------------------

commit a98e51ecf51d1a93d48a8a10d35827edfd9d8c28
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Jan 28 08:18:28 2013 +0000

    More refactoring of FamInst/FamInstEnv; finally fixes Trac #7524
    
    Quite a bit of tidying up here; the fix to #7524 is actually
    only a small part.
    
    * Be fully clear that the cab_tvs in a CoAxBranch are not
      fresh.  See Note [CoAxBranch type variables] in CoAxiom.
    
    * Use CoAxBranch to replace the ATDfeault type in Class.
      CoAxBranch is perfect here.  This change allowed me to
      delete quite a bit of boilerplate code, including the
      corresponding IfaceSynType.
    
    * Tidy up the construction of CoAxBranches, and when FamIntBranch is
      freshened.  The latter onw happens only in FamInst.newFamInst.
    
    * Tidy the tyvars of a CoAxBranch when we build them, done in
      FamInst.mkCoAxBranch.  See Note [Tidy axioms when we build them]
      in that module.  This is what fixes #7524.
    
    Much niceer now.

 compiler/iface/BinIface.hs                        |    7 -
 compiler/iface/IfaceSyn.lhs                       |   31 ++---
 compiler/iface/MkIface.lhs                        |   21 +--
 compiler/iface/TcIface.lhs                        |   29 ++---
 compiler/typecheck/FamInst.lhs                    |  142 ++++++++++++++-------
 compiler/typecheck/TcGenGenerics.lhs              |    9 +-
 compiler/typecheck/TcInstDcls.lhs                 |   50 +++-----
 compiler/typecheck/TcRnDriver.lhs                 |    4 +-
 compiler/typecheck/TcTyClsDecls.lhs               |   21 ++--
 compiler/types/Class.lhs                          |   20 +---
 compiler/types/CoAxiom.lhs                        |   31 ++++-
 compiler/types/Coercion.lhs                       |    1 -
 compiler/types/FamInstEnv.lhs                     |  106 +---------------
 compiler/vectorise/Vectorise/Generic/PAMethods.hs |    4 +-
 compiler/vectorise/Vectorise/Generic/PData.hs     |   10 +-
 15 files changed, 204 insertions(+), 282 deletions(-)


Diff suppressed because of size. To see it, use:

    git show a98e51ecf51d1a93d48a8a10d35827edfd9d8c28



More information about the ghc-commits mailing list