X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FbasicTypes%2FNewDemand.lhs;h=e97a7db03b14fbb2249e596b616e9ffd8fcea98c;hp=668a35e9c20a639669fa5fff02acb5ad4a6fcf6a;hb=6561069ad5d0b11de223686be59372a3b1e6aed7;hpb=a77cfb5c39b816d5bf56075ed4d9085c0b658f9e diff --git a/compiler/basicTypes/NewDemand.lhs b/compiler/basicTypes/NewDemand.lhs index 668a35e..e97a7db 100644 --- a/compiler/basicTypes/NewDemand.lhs +++ b/compiler/basicTypes/NewDemand.lhs @@ -19,7 +19,7 @@ module NewDemand( StrictSig(..), mkStrictSig, topSig, botSig, cprSig, isTopSig, - splitStrictSig, + splitStrictSig, increaseStrictSigArity, pprIfaceStrictSig, appIsBottom, isBottomingSig, seqStrictSig, ) where @@ -307,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