Make INLINE warning more precise
[ghc-hetmet.git] / compiler / basicTypes / NewDemand.lhs
index f69d2a4..e97a7db 100644 (file)
@@ -19,12 +19,10 @@ module NewDemand(
 
        StrictSig(..), mkStrictSig, topSig, botSig, cprSig,
         isTopSig,
-       splitStrictSig,
+       splitStrictSig, increaseStrictSigArity,
        pprIfaceStrictSig, appIsBottom, isBottomingSig, seqStrictSig,
      ) where
 
--- XXX This define is a bit of a hack, and should be done more nicely
-#define FAST_STRING_NOT_NEEDED 1
 #include "HsVersions.h"
 
 import StaticFlags
@@ -309,6 +307,11 @@ mkStrictSig dmd_ty = StrictSig dmd_ty
 splitStrictSig :: StrictSig -> ([Demand], DmdResult)
 splitStrictSig (StrictSig (DmdType _ dmds res)) = (dmds, res)
 
+increaseStrictSigArity :: Int -> StrictSig -> StrictSig
+-- Add extra arguments to a strictness signature
+increaseStrictSigArity arity_increase (StrictSig (DmdType env dmds res))
+  = StrictSig (DmdType env (replicate arity_increase topDmd ++ dmds) res)
+
 isTopSig :: StrictSig -> Bool
 isTopSig (StrictSig ty) = isTopDmdType ty