Commit c8ef1c4a authored by simonpj@microsoft.com's avatar simonpj@microsoft.com

Make INLINE warning more precise

parent 6a944ae7
...@@ -189,8 +189,9 @@ lintSingleBinding top_lvl_flag rec_flag (binder,rhs) ...@@ -189,8 +189,9 @@ lintSingleBinding top_lvl_flag rec_flag (binder,rhs)
-- Check whether binder's specialisations contain any out-of-scope variables -- Check whether binder's specialisations contain any out-of-scope variables
; mapM_ (checkBndrIdInScope binder) bndr_vars ; mapM_ (checkBndrIdInScope binder) bndr_vars
; when (isLoopBreaker (idOccInfo binder) && isInlinePragma (idInlinePragma binder)) ; when (isNonRuleLoopBreaker (idOccInfo binder) && isInlinePragma (idInlinePragma binder))
(addWarnL (ptext (sLit "INLINE binder is loop breaker:") <+> ppr binder)) (addWarnL (ptext (sLit "INLINE binder is (non-rule) loop breaker:") <+> ppr binder))
-- Only non-rule loop breakers inhibit inlining
-- Check whether arity and demand type are consistent (only if demand analysis -- Check whether arity and demand type are consistent (only if demand analysis
-- already happened) -- already happened)
......
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