Commit 5c5c0dcb authored by simonpj@microsoft.com's avatar simonpj@microsoft.com

Fix isDefaultInlinePragma

parent a51fe79e
...@@ -740,6 +740,10 @@ isInlineSpec Inline = True ...@@ -740,6 +740,10 @@ isInlineSpec Inline = True
isInlineSpec Inlinable = True isInlineSpec Inlinable = True
isInlineSpec _ = False isInlineSpec _ = False
isEmptyInlineSpec :: InlineSpec -> Bool
isEmptyInlineSpec EmptyInlineSpec = True
isEmptyInlineSpec _ = False
defaultInlinePragma, alwaysInlinePragma, neverInlinePragma, dfunInlinePragma defaultInlinePragma, alwaysInlinePragma, neverInlinePragma, dfunInlinePragma
:: InlinePragma :: InlinePragma
defaultInlinePragma = InlinePragma { inl_act = AlwaysActive defaultInlinePragma = InlinePragma { inl_act = AlwaysActive
...@@ -764,7 +768,7 @@ isDefaultInlinePragma :: InlinePragma -> Bool ...@@ -764,7 +768,7 @@ isDefaultInlinePragma :: InlinePragma -> Bool
isDefaultInlinePragma (InlinePragma { inl_act = activation isDefaultInlinePragma (InlinePragma { inl_act = activation
, inl_rule = match_info , inl_rule = match_info
, inl_inline = inline }) , inl_inline = inline })
= isInlineSpec inline && isAlwaysActive activation && isFunLike match_info = isEmptyInlineSpec inline && isAlwaysActive activation && isFunLike match_info
isInlinePragma :: InlinePragma -> Bool isInlinePragma :: InlinePragma -> Bool
isInlinePragma prag = isInlineSpec (inl_inline prag) isInlinePragma prag = isInlineSpec (inl_inline prag)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment