projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4c9154f
)
InlinePrag needs an arity only for INLINE, not INLINABLE
author
Simon Marlow
<marlowsd@gmail.com>
Fri, 15 Oct 2010 09:49:25 +0000
(09:49 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Fri, 15 Oct 2010 09:49:25 +0000
(09:49 +0000)
This doesn't fix anything (we think), but it's morally correct.
compiler/typecheck/TcBinds.lhs
patch
|
blob
|
history
diff --git
a/compiler/typecheck/TcBinds.lhs
b/compiler/typecheck/TcBinds.lhs
index
a191b82
..
b1ad0d4
100644
(file)
--- a/
compiler/typecheck/TcBinds.lhs
+++ b/
compiler/typecheck/TcBinds.lhs
@@
-495,7
+495,9
@@
mkPragFun sigs binds = \n -> lookupNameEnv prag_env n `orElse` []
get_sig _ = Nothing
add_arity (L _ n) inl_prag -- Adjust inl_sat field to match visible arity of function
- | Just ar <- lookupNameEnv ar_env n = inl_prag { inl_sat = Just ar }
+ | Just ar <- lookupNameEnv ar_env n,
+ Inline <- inl_inline inl_prag = inl_prag { inl_sat = Just ar }
+ -- add arity only for real INLINE pragmas, not INLINABLE
| otherwise = inl_prag
prag_env :: NameEnv [LSig Name]