Remove the (very) old strictness analyser
[ghc-hetmet.git] / compiler / coreSyn / CoreLint.lhs
index 70bf08b..4893885 100644 (file)
@@ -11,7 +11,7 @@ module CoreLint ( lintCoreBindings, lintUnfolding ) where
 
 #include "HsVersions.h"
 
-import NewDemand
+import Demand
 import CoreSyn
 import CoreFVs
 import CoreUtils
@@ -189,8 +189,9 @@ lintSingleBinding top_lvl_flag rec_flag (binder,rhs)
         -- Check whether binder's specialisations contain any out-of-scope variables
        ; mapM_ (checkBndrIdInScope binder) bndr_vars 
 
-       ; when (isLoopBreaker (idOccInfo binder) && isInlinePragma (idInlinePragma binder))
-              (addWarnL (ptext (sLit "INLINE binder is loop breaker:") <+> ppr binder))
+       ; when (isNonRuleLoopBreaker (idOccInfo binder) && isInlinePragma (idInlinePragma 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
       -- already happened)
@@ -203,7 +204,7 @@ lintSingleBinding top_lvl_flag rec_flag (binder,rhs)
        -- the unfolding is a SimplifiableCoreExpr. Give up for now.
    where
     binder_ty                  = idType binder
-    maybeDmdTy                 = idNewStrictness_maybe binder
+    maybeDmdTy                 = idStrictness_maybe binder
     bndr_vars                  = varSetElems (idFreeVars binder)
     lintBinder var | isId var  = lintIdBndr var $ \_ -> (return ())
                   | otherwise = return ()
@@ -1082,7 +1083,7 @@ mkStrictMsg :: Id -> Message
 mkStrictMsg binder
   = vcat [hsep [ptext (sLit "Recursive or top-level binder has strict demand info:"),
                     ppr binder],
-             hsep [ptext (sLit "Binder's demand info:"), ppr (idNewDemandInfo binder)]
+             hsep [ptext (sLit "Binder's demand info:"), ppr (idDemandInfo binder)]
             ]
 
 mkArityMsg :: Id -> Message
@@ -1096,7 +1097,7 @@ mkArityMsg binder
              hsep [ptext (sLit "Binder's strictness signature:"), ppr dmd_ty]
 
          ]
-           where (StrictSig dmd_ty) = idNewStrictness binder
+           where (StrictSig dmd_ty) = idStrictness binder
 
 mkUnboxedTupleMsg :: Id -> Message
 mkUnboxedTupleMsg binder