projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the notion of "constructor-like" Ids for rule-matching
[ghc-hetmet.git]
/
compiler
/
iface
/
MkIface.lhs
diff --git
a/compiler/iface/MkIface.lhs
b/compiler/iface/MkIface.lhs
index
22c1756
..
8cfc08f
100644
(file)
--- a/
compiler/iface/MkIface.lhs
+++ b/
compiler/iface/MkIface.lhs
@@
-1440,8
+1440,8
@@
toIfaceLetBndr id = IfLetBndr (occNameFS (getOccName id))
-- See Note [IdInfo on nested let-bindings] in IfaceSyn
id_info = idInfo id
inline_prag = inlinePragInfo id_info
-- See Note [IdInfo on nested let-bindings] in IfaceSyn
id_info = idInfo id
inline_prag = inlinePragInfo id_info
- prag_info | isAlwaysActive inline_prag = NoInfo
- | otherwise = HasInfo [HsInline inline_prag]
+ prag_info | isDefaultInlinePragma inline_prag = NoInfo
+ | otherwise = HasInfo [HsInline inline_prag]
--------------------------
toIfaceIdDetails :: IdDetails -> IfaceIdDetails
--------------------------
toIfaceIdDetails :: IdDetails -> IfaceIdDetails
@@
-1495,11
+1495,13
@@
toIfaceIdInfo id_info
------------ Inline prag --------------
inline_prag = inlinePragInfo id_info
------------ Inline prag --------------
inline_prag = inlinePragInfo id_info
- inline_hsinfo | isAlwaysActive inline_prag = Nothing
- | no_unfolding && not has_worker = Nothing
+ inline_hsinfo | isDefaultInlinePragma inline_prag = Nothing
+ | no_unfolding && not has_worker
+ && isFunLike (inlinePragmaRuleMatchInfo inline_prag)
+ = Nothing
-- If the iface file give no unfolding info, we
-- don't need to say when inlining is OK!
-- If the iface file give no unfolding info, we
-- don't need to say when inlining is OK!
- | otherwise = Just (HsInline inline_prag)
+ | otherwise = Just (HsInline inline_prag)
--------------------------
coreRuleToIfaceRule :: Module -> CoreRule -> IfaceRule
--------------------------
coreRuleToIfaceRule :: Module -> CoreRule -> IfaceRule