Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
0edeaa12
Commit
0edeaa12
authored
Oct 15, 2010
by
Simon Marlow
Browse files
InlinePrag needs an arity only for INLINE, not INLINABLE
This doesn't fix anything (we think), but it's morally correct.
parent
4c9154fa
Changes
1
Show whitespace changes
Inline
Side-by-side
compiler/typecheck/TcBinds.lhs
View file @
0edeaa12
...
@@ -495,7 +495,9 @@ mkPragFun sigs binds = \n -> lookupNameEnv prag_env n `orElse` []
...
@@ -495,7 +495,9 @@ mkPragFun sigs binds = \n -> lookupNameEnv prag_env n `orElse` []
get_sig _ = Nothing
get_sig _ = Nothing
add_arity (L _ n) inl_prag -- Adjust inl_sat field to match visible arity of function
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
| otherwise = inl_prag
prag_env :: NameEnv [LSig Name]
prag_env :: NameEnv [LSig Name]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment