Rough matches for family instances
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>
Tue, 10 Oct 2006 04:46:56 +0000 (04:46 +0000)
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>
Tue, 10 Oct 2006 04:46:56 +0000 (04:46 +0000)
commit2a8cdc3aee5997374273e27365f92c161aca8453
tree6505bdaf46ee6d7dcafe398f08257000e11002cc
parent94abbcb6d1d3d28d0b2de965e1357ac7b8f8c40a
Rough matches for family instances
- Class and type family instances just got a lot more similar.
- FamInst, like Instance, now has a rough match signature.  The idea is the
  same: if the rough match doesn't match, there is no need to pull in the while
  tycon describing the instance (from a lazily read iface).
- IfaceFamInst changes in a similar way and the list of all IFaceFamInsts is
  now written into the binary iface (as for class instances), as deriving it
  from the tycon (as before) would render the whole rough matching useless.
- As a result of this, the plumbing of class instances and type instances
  through the various environments, ModIface, ModGuts, and ModDetails is now
  almost the same.  (The remaining difference are mostly because the dfun of a
  class instance is an Id, but type instance refer to a TyCon, not an Id.)

*** WARNING: The interface file format changed! ***
***      Rebuild from scratch. ***
17 files changed:
compiler/deSugar/Desugar.lhs
compiler/iface/BinIface.hs
compiler/iface/IfaceSyn.lhs
compiler/iface/IfaceType.lhs
compiler/iface/LoadIface.lhs
compiler/iface/MkIface.lhs
compiler/iface/TcIface.lhs
compiler/iface/TcIface.lhs-boot
compiler/main/HscMain.lhs
compiler/main/HscTypes.lhs
compiler/main/TidyPgm.lhs
compiler/typecheck/FamInst.lhs
compiler/typecheck/TcInstDcls.lhs
compiler/typecheck/TcRnDriver.lhs
compiler/typecheck/TcRnMonad.lhs
compiler/typecheck/TcRnTypes.lhs
compiler/types/FamInstEnv.lhs