From: simonpj Date: Fri, 8 Dec 2000 09:45:19 +0000 (+0000) Subject: [project @ 2000-12-08 09:45:19 by simonpj] X-Git-Tag: Approximately_9120_patches~3168 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=4500c7551ae01c62604eab40d47e7cd4cc150850;p=ghc-hetmet.git [project @ 2000-12-08 09:45:19 by simonpj] Comment --- diff --git a/ghc/compiler/coreSyn/CoreUtils.lhs b/ghc/compiler/coreSyn/CoreUtils.lhs index 0031c6d..3c0b8aa 100644 --- a/ghc/compiler/coreSyn/CoreUtils.lhs +++ b/ghc/compiler/coreSyn/CoreUtils.lhs @@ -163,6 +163,16 @@ bindings like As usual, the inline_me prevents the worker from getting inlined back into the wrapper. We want the split, so that the coerces can cancel at the call site. +However, we can get left with tiresome type applications. Notably, consider + f = /\ a -> let t = e in (t, w) +Then lifting the let out of the big lambda gives + t' = /\a -> e + f = /\ a -> let t = inline_me (t' a) in (t, w) +The inline_me is to stop the simplifier inlining t' right back +into t's RHS. In the next phase we'll substitute for t (since +its rhs is trivial) and *then* we could get rid of the inline_me. +But it hardly seems worth it, so I don't bother. + \begin{code} mkInlineMe (Var v) = Var v mkInlineMe e = Note InlineMe e