GlobalIdDetails(..), notGlobalId, -- Not abstract
IdInfo, -- Abstract
- vanillaIdInfo, noCafIdInfo,
+ vanillaIdInfo, noCafIdInfo, hasCafIdInfo,
seqIdInfo, megaSeqIdInfo,
-- Zapping
-- New demand and strictness info
newStrictnessInfo, setNewStrictnessInfo,
- newDemandInfo, setNewDemandInfo,
+ newDemandInfo, setNewDemandInfo, pprNewStrictness,
-- Strictness; imported from Demand
StrictnessInfo(..),
import DataCon ( DataCon )
import ForeignCall ( ForeignCall )
import FieldLabel ( FieldLabel )
-import Type ( usOnce, usMany )
+import Type ( usOnce )
import Demand hiding( Demand, seqDemand )
import qualified Demand
import NewDemand
import Outputable
-import Util ( seqList, listLengthCmp )
+import Util ( listLengthCmp )
import Maybe ( isJust )
import List ( replicate )
seqNewStrictnessInfo Nothing = ()
seqNewStrictnessInfo (Just ty) = seqStrictSig ty
+pprNewStrictness Nothing = empty
+pprNewStrictness (Just sig) = ftext FSLIT("Str:") <+> ppr sig
+
#ifdef OLD_STRICTNESS
oldStrictnessFromNew :: StrictSig -> Demand.StrictnessInfo
oldStrictnessFromNew sig = mkStrictnessInfo (map oldDemand dmds, isBotRes res_info)
newStrictnessInfo = Nothing
}
-noCafIdInfo = vanillaIdInfo `setCgInfo` CgInfo NoCafRefs
+hasCafIdInfo = vanillaIdInfo `setCgInfo` CgInfo MayHaveCafRefs
+noCafIdInfo = vanillaIdInfo `setCgInfo` CgInfo NoCafRefs
-- Used for built-in type Ids in MkId.
- -- Many built-in things have fixed types, so we shouldn't
- -- run around generalising them
+ -- These must have a valid CgInfo set, so you can't
+ -- use vanillaIdInfo!
\end{code}