X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2FsimplCore%2FSimplify.lhs;h=5d40071e56e45d4bbeb8a224f0b0d175a244d626;hb=ab676aa34302b346cc05181100b46d8490023971;hp=ac1f7900461a0919299311581a61d8073150ee94;hpb=9670d6643e55adeb15f998a0efd5799d499ea2a4;p=ghc-hetmet.git diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs index ac1f790..5d40071 100644 --- a/compiler/simplCore/Simplify.lhs +++ b/compiler/simplCore/Simplify.lhs @@ -892,10 +892,10 @@ simplNote env (SCC cc) e cont -- See notes with SimplMonad.inlineMode simplNote env InlineMe e cont - | contIsRhsOrArg cont -- Totally boring continuation; see notes above + | Just (inside, outside) <- splitInlineCont cont -- Boring boring continuation; see notes above = do { -- Don't inline inside an INLINE expression - e' <- simplExpr (setMode inlineMode env) e - ; rebuild env (mkInlineMe e') cont } + e' <- simplExprC (setMode inlineMode env) e inside + ; rebuild env (mkInlineMe e') outside } | otherwise -- Dissolve the InlineMe note if there's -- an interesting context of any kind to combine with @@ -952,6 +952,8 @@ completeCall env var cont -- the wrapper didn't occur for things that have specialisations till a -- later phase, so but now we just try RULES first -- + -- Note [Self-recursive rules] + -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- You might think that we shouldn't apply rules for a loop breaker: -- doing so might give rise to an infinite loop, because a RULE is -- rather like an extra equation for the function: