From 5eee6a1ffa6e1705a1517631ba599fdb4455b416 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Mon, 1 Jun 2015 08:51:10 +0100 Subject: Move seqExpr, seqIdInfo etc to CoreUtils Refactoring only : it just brings some scattered "seq" code together --- compiler/basicTypes/IdInfo.hs | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) (limited to 'compiler/basicTypes/IdInfo.hs') diff --git a/compiler/basicTypes/IdInfo.hs b/compiler/basicTypes/IdInfo.hs index eb897896a9..e9fccbec23 100644 --- a/compiler/basicTypes/IdInfo.hs +++ b/compiler/basicTypes/IdInfo.hs @@ -15,7 +15,6 @@ module IdInfo ( -- * The IdInfo type IdInfo, -- Abstract vanillaIdInfo, noCafIdInfo, - seqIdInfo, megaSeqIdInfo, -- ** The OneShotInfo type OneShotInfo(..), @@ -56,7 +55,7 @@ module IdInfo ( SpecInfo(..), emptySpecInfo, isEmptySpecInfo, specInfoFreeVars, - specInfoRules, seqSpecInfo, setSpecInfoHead, + specInfoRules, setSpecInfoHead, specInfo, setSpecInfo, -- ** The CAFInfo type @@ -194,35 +193,6 @@ data IdInfo -- n <=> all calls have at least n arguments } --- | Just evaluate the 'IdInfo' to WHNF -seqIdInfo :: IdInfo -> () -seqIdInfo (IdInfo {}) = () - --- | Evaluate all the fields of the 'IdInfo' that are generally demanded by the --- compiler -megaSeqIdInfo :: IdInfo -> () -megaSeqIdInfo info - = seqSpecInfo (specInfo info) `seq` - --- Omitting this improves runtimes a little, presumably because --- some unfoldings are not calculated at all --- seqUnfolding (unfoldingInfo info) `seq` - - seqDemandInfo (demandInfo info) `seq` - seqStrictnessInfo (strictnessInfo info) `seq` - seqCaf (cafInfo info) `seq` - seqOneShot (oneShotInfo info) `seq` - seqOccInfo (occInfo info) - -seqOneShot :: OneShotInfo -> () -seqOneShot l = l `seq` () - -seqStrictnessInfo :: StrictSig -> () -seqStrictnessInfo ty = seqStrictSig ty - -seqDemandInfo :: Demand -> () -seqDemandInfo dmd = seqDemand dmd - -- Setters setSpecInfo :: IdInfo -> SpecInfo -> IdInfo @@ -400,9 +370,6 @@ setSpecInfoHead :: Name -> SpecInfo -> SpecInfo setSpecInfoHead fn (SpecInfo rules fvs) = SpecInfo (map (setRuleIdName fn) rules) fvs -seqSpecInfo :: SpecInfo -> () -seqSpecInfo (SpecInfo rules fvs) = seqRules rules `seq` seqVarSet fvs - {- ************************************************************************ * * @@ -434,9 +401,6 @@ mayHaveCafRefs :: CafInfo -> Bool mayHaveCafRefs MayHaveCafRefs = True mayHaveCafRefs _ = False -seqCaf :: CafInfo -> () -seqCaf c = c `seq` () - instance Outputable CafInfo where ppr = ppCafInfo -- cgit v1.2.1