X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2FcoreSyn%2FCoreSubst.lhs;h=3578037f301b132357e08f4f7d11ea42b8e102ee;hb=a90dc3907a491bfb478262441534b24fb0eb22f4;hp=0c0ca157a5f4fe8ddaa8baf8c0fcd54ecac0d433;hpb=b8ee6f14ca6e9e49015ee9b404cf8b8191fede05;p=ghc-hetmet.git diff --git a/compiler/coreSyn/CoreSubst.lhs b/compiler/coreSyn/CoreSubst.lhs index 0c0ca15..3578037 100644 --- a/compiler/coreSyn/CoreSubst.lhs +++ b/compiler/coreSyn/CoreSubst.lhs @@ -442,7 +442,7 @@ It also unconditionally zaps the OccInfo. \begin{code} -- | Very similar to 'substBndr', but it always allocates a new 'Unique' for --- each variable in its output and removes all 'IdInfo' +-- each variable in its output. It substitutes the IdInfo though. cloneIdBndr :: Subst -> UniqSupply -> Id -> (Subst, Id) cloneIdBndr subst us old_id = clone_id subst subst (old_id, uniqFromSupply us) @@ -543,8 +543,8 @@ substUnfoldingSC subst unf -- Short-cut version | isEmptySubst subst = unf | otherwise = substUnfolding subst unf -substUnfolding subst (DFunUnfolding con args) - = DFunUnfolding con (map (substExpr (text "dfun-unf") subst) args) +substUnfolding subst (DFunUnfolding ar con args) + = DFunUnfolding ar con (map (substExpr (text "dfun-unf") subst) args) substUnfolding subst unf@(CoreUnfolding { uf_tmpl = tmpl, uf_src = src }) -- Retain an InlineRule! @@ -566,13 +566,13 @@ substUnfoldingSource (Subst in_scope ids _) (InlineWrapper wkr) | Just wkr_expr <- lookupVarEnv ids wkr = case wkr_expr of Var w1 -> InlineWrapper w1 - _other -> WARN( True, text "Interesting! CoreSubst.substWorker1:" <+> ppr wkr - <+> ifPprDebug (equals <+> ppr wkr_expr) ) + _other -> -- WARN( True, text "Interesting! CoreSubst.substWorker1:" <+> ppr wkr + -- <+> ifPprDebug (equals <+> ppr wkr_expr) ) -- Note [Worker inlining] InlineRule -- It's not a wrapper any more, but still inline it! | Just w1 <- lookupInScope in_scope wkr = InlineWrapper w1 - | otherwise = WARN( True, text "Interesting! CoreSubst.substWorker2:" <+> ppr wkr ) + | otherwise = -- WARN( True, text "Interesting! CoreSubst.substWorker2:" <+> ppr wkr ) -- This can legitimately happen. The worker has been inlined and -- dropped as dead code, because we don't treat the UnfoldingSource -- as an "occurrence".