summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-01-09 13:51:40 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2018-01-09 16:25:53 +0000
commit30b1fe2f305097955870ada93700eb149a05b4ef (patch)
tree5481a043f2b20279ee7c1fc250ba98803343fd38
parentfb78b0d22635b1d7ae68385c648b8c407f5562c2 (diff)
downloadhaskell-30b1fe2f305097955870ada93700eb149a05b4ef.tar.gz
Remove a bogus warning
The new comment explains why this warning can legitimately fire, so I've removed it entirely. Lint will cath any bad cases.
-rw-r--r--compiler/simplCore/OccurAnal.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/simplCore/OccurAnal.hs b/compiler/simplCore/OccurAnal.hs
index 2be47fb564..bcc84100a1 100644
--- a/compiler/simplCore/OccurAnal.hs
+++ b/compiler/simplCore/OccurAnal.hs
@@ -2169,7 +2169,12 @@ markJoinOneShots mb_join_arity bndrs
Just n -> go n bndrs
where
go 0 bndrs = bndrs
- go _ [] = WARN( True, ppr mb_join_arity <+> ppr bndrs ) []
+ go _ [] = [] -- This can legitimately happen.
+ -- e.g. let j = case ... in j True
+ -- This will become an arity-1 join point after the
+ -- simplifier has eta-expanded it; but it may not have
+ -- enough lambdas /yet/. (Lint checks that JoinIds do
+ -- have enough lambdas.)
go n (b:bs) = b' : go (n-1) bs
where
b' | isId b = setOneShotLambda b