TickBox representation change
[ghc-hetmet.git] / compiler / iface / IfaceSyn.lhs
index a842608..bcff5f0 100644 (file)
@@ -1,14 +1,7 @@
 %
+% (c) The University of Glasgow 2006
 % (c) The GRASP/AQUA Project, Glasgow University, 1993-1998
 %
-%************************************************************************
-%*                                                                     *
-\section[HsCore]{Core-syntax unfoldings in Haskell interface files}
-%*                                                                     *
-%************************************************************************
-
-We could either use this, or parameterise @GenCoreExpr@ on @Types@ and
-@TyVars@ as well.  Currently trying the former... MEGA SIGH.
 
 \begin{code}
 module IfaceSyn (
@@ -24,7 +17,7 @@ module IfaceSyn (
 
        -- Equality
        GenIfaceEq(..), IfaceEq, (&&&), bool, eqListBy, eqMaybeBy,
-       eqIfDecl, eqIfInst, eqIfRule, checkBootDecl,
+       eqIfDecl, eqIfInst, eqIfFamInst, eqIfRule, checkBootDecl,
        
        -- Pretty printing
        pprIfaceExpr, pprIfaceDeclHead 
@@ -35,25 +28,23 @@ module IfaceSyn (
 import CoreSyn
 import IfaceType
 
-import NewDemand       ( StrictSig, pprIfaceStrictSig )
-import Class           ( FunDep, DefMeth, pprFundeps )
-import OccName
-import UniqFM           ( UniqFM, emptyUFM, addToUFM, lookupUFM )
-import Unique           ( mkBuiltinUnique )
+import NewDemand
+import Class
+import UniqFM
+import Unique
 import NameSet 
-import Name            ( Name, NamedThing(..), isExternalName,
-                          mkInternalName )
-import CostCentre      ( CostCentre, pprCostCentreCore )
-import Literal         ( Literal )
-import ForeignCall     ( ForeignCall )
-import SrcLoc           ( noSrcLoc )
+import Name
+import CostCentre
+import Literal
+import ForeignCall
+import SrcLoc
 import BasicTypes
 import Outputable
 import FastString
-import Maybes          ( catMaybes )
+import Module
 
-import Data.List        ( nub )
-import Data.Maybe       ( isJust )
+import Data.List
+import Data.Maybe
 
 infixl 3 &&&
 infix  4 `eqIfExt`, `eqIfIdInfo`, `eqIfType`
@@ -493,6 +484,7 @@ instance Outputable IfaceNote where
     ppr IfaceInlineMe     = ptext SLIT("__inline_me")
     ppr (IfaceCoreNote s) = ptext SLIT("__core_note") <+> pprHsString (mkFastString s)
 
+
 instance Outputable IfaceConAlt where
     ppr IfaceDefault     = text "DEFAULT"
     ppr (IfaceLitAlt l)   = ppr l
@@ -659,6 +651,9 @@ eqWith = eq_ifTvBndrs emptyEqEnv
 eqIfInst d1 d2 = bool (ifDFun d1 == ifDFun d2 && ifOFlag d1 == ifOFlag d2)
 -- All other changes are handled via the version info on the dfun
 
+eqIfFamInst d1 d2 = bool (ifFamInstTyCon d1 == ifFamInstTyCon d2)
+-- All other changes are handled via the version info on the tycon
+
 eqIfRule (IfaceRule n1 a1 bs1 f1 es1 rhs1 o1)
         (IfaceRule n2 a2 bs2 f2 es2 rhs2 o2)
        = bool (n1==n2 && a1==a2 && o1 == o2) &&&