• Simon Peyton Jones's avatar
    More refactoring of FamInst/FamInstEnv; finally fixes Trac #7524 · a98e51ec
    Simon Peyton Jones authored
    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.
Coercion.lhs 44.5 KB