[project @ 2000-05-28 23:24:43 by panne]
authorpanne <unknown>
Sun, 28 May 2000 23:24:43 +0000 (23:24 +0000)
committerpanne <unknown>
Sun, 28 May 2000 23:24:43 +0000 (23:24 +0000)
Don't forget litlit alternatives when deciding if an expression should
make its way into an interface file.
*please merge*

ghc/compiler/coreSyn/CoreUnfold.lhs

index 480edbb..02db3cb 100644 (file)
@@ -466,7 +466,8 @@ okToUnfoldInHiFile e = opt_UnfoldCasms || go e
     go (App fun arg)          = go fun && go arg
     go (Lam _ body)           = go body
     go (Let binds body)       = and (map go (body :rhssOfBind binds))
-    go (Case scrut bndr alts) = and (map go (scrut:rhssOfAlts alts))
+    go (Case scrut bndr alts) = and (map go (scrut:rhssOfAlts alts)) &&
+                               not (any isLitLitLit [ lit | (LitAlt lit, _, _) <- alts ])
     go (Note _ body)          = go body
     go (Type _)                      = True