X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fspecialise%2FSpecConstr.lhs;h=eb516869b0378790c1ddd981e03e998b17174705;hb=9e4a57507258b242de787bd4263887ba90760139;hp=603c2a684ee281f72066c16a96509ab7bff8f4de;hpb=42b63073fb5e71fcd539ab80289cf6cf2a5b9641;p=ghc-hetmet.git diff --git a/ghc/compiler/specialise/SpecConstr.lhs b/ghc/compiler/specialise/SpecConstr.lhs index 603c2a6..eb51686 100644 --- a/ghc/compiler/specialise/SpecConstr.lhs +++ b/ghc/compiler/specialise/SpecConstr.lhs @@ -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,11 @@ 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') -scExpr env (Case scrut b alts) +scExpr env (Case scrut b ty alts) = sc_scrut scrut `thenUs` \ (scrut_usg, scrut') -> mapAndUnzipUs sc_alt alts `thenUs` \ (alts_usgs, alts') -> returnUs (combineUsages alts_usgs `combineUsage` scrut_usg, - Case scrut' b alts') + Case scrut' b ty alts') where sc_scrut e@(Var v) = returnUs (varUsage env v CaseScrut, e) sc_scrut e = scExpr env e @@ -442,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