projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ffa647b
)
[project @ 2001-11-06 11:03:00 by simonmar]
author
simonmar
<unknown>
Tue, 6 Nov 2001 11:03:00 +0000
(11:03 +0000)
committer
simonmar
<unknown>
Tue, 6 Nov 2001 11:03:00 +0000
(11:03 +0000)
Add a comment explaining the discount subtraction in mkSizeIs.
ghc/compiler/coreSyn/CoreUnfold.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/coreSyn/CoreUnfold.lhs
b/ghc/compiler/coreSyn/CoreUnfold.lhs
index
2f5a643
..
457f9cf
100644
(file)
--- a/
ghc/compiler/coreSyn/CoreUnfold.lhs
+++ b/
ghc/compiler/coreSyn/CoreUnfold.lhs
@@
-353,6
+353,11
@@
data ExprSize = TooBig
FastInt -- Size to subtract if result is scrutinised
-- by a case expression
+-- subtract the discount before deciding whether to bale out. eg. we
+-- want to inline a large constructor application into a selector:
+-- tup = (a_1, ..., a_99)
+-- x = case tup of ...
+--
mkSizeIs max n xs d | (n -# d) ># max = TooBig
| otherwise = SizeIs n xs d