[project @ 2004-12-22 12:06:13 by simonpj]
[ghc-hetmet.git] / ghc / compiler / specialise / SpecConstr.lhs
index c7824ca..eb51686 100644 (file)
@@ -12,7 +12,7 @@ module SpecConstr(
 
 import CoreSyn
 import CoreLint                ( showPass, endPass )
-import CoreUtils       ( exprType, eqExpr, mkPiTypes )
+import CoreUtils       ( exprType, tcEqExpr, mkPiTypes )
 import CoreFVs                 ( exprsFreeVars )
 import CoreTidy                ( pprTidyIdRules )
 import WwLib           ( mkWorkerArgs )
@@ -335,11 +335,9 @@ scExpr env (Note n e) = scExpr env e       `thenUs` \ (usg,e') ->
 scExpr env (Lam b e)  = scExpr (extendBndr env b) e    `thenUs` \ (usg,e') ->
                        returnUs (usg, Lam b e')
 
--- gaw 2004
 scExpr env (Case scrut b ty alts) 
   = sc_scrut scrut             `thenUs` \ (scrut_usg, scrut') ->
     mapAndUnzipUs sc_alt alts  `thenUs` \ (alts_usgs, alts') ->
--- gaw 2004
     returnUs (combineUsages alts_usgs `combineUsage` scrut_usg,
              Case scrut' b ty alts')
   where
@@ -444,7 +442,7 @@ specialise env fn bndrs body (SCU {calls=calls, occs=occs})
                  (nubBy same_call good_calls `zip` [1..])
   where
     n_bndrs  = length bndrs
-    same_call as1 as2 = and (zipWith eqExpr as1 as2)
+    same_call as1 as2 = and (zipWith tcEqExpr as1 as2)
 
 ---------------------
 good_arg :: ConstrEnv -> IdEnv ArgOcc -> (CoreBndr, CoreArg) -> Bool