From 82387309d1fe1e08aed80abb7220b84346f71343 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 24 Mar 2003 11:23:21 +0000 Subject: [PATCH] [project @ 2003-03-24 11:23:20 by simonmar] #ifdef some more code that belongs to the old strictness analyser. It turns out we were still compiling the Demand and SaLib modules, which aren't required unless OLD_STRICTNESS is on (do we still need OLD_STRICTNESS?). --- ghc/compiler/basicTypes/Demand.lhs | 10 +++++++--- ghc/compiler/basicTypes/Id.lhs | 2 ++ ghc/compiler/basicTypes/IdInfo.lhs | 13 +++++++------ ghc/compiler/stranal/SaLib.lhs | 8 ++++++++ 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/ghc/compiler/basicTypes/Demand.lhs b/ghc/compiler/basicTypes/Demand.lhs index 8e8f24f..a038a23 100644 --- a/ghc/compiler/basicTypes/Demand.lhs +++ b/ghc/compiler/basicTypes/Demand.lhs @@ -4,6 +4,10 @@ \section[Demand]{@Demand@: the amount of demand on a value} \begin{code} +#ifndef OLD_STRICTNESS +module Demand () where +#else + module Demand( Demand(..), @@ -199,6 +203,6 @@ ppStrictnessInfo NoStrictnessInfo = empty ppStrictnessInfo (StrictnessInfo wrapper_args bot) = hsep [pprDemands wrapper_args bot] \end{code} - - - +\begin{code} +#endif /* OLD_STRICTNESS */ +\end{code} diff --git a/ghc/compiler/basicTypes/Id.lhs b/ghc/compiler/basicTypes/Id.lhs index 949ed23..b810376 100644 --- a/ghc/compiler/basicTypes/Id.lhs +++ b/ghc/compiler/basicTypes/Id.lhs @@ -95,7 +95,9 @@ import Type ( Type, typePrimRep, addFreeTyVars, import IdInfo +#ifdef OLD_STRICTNESS import qualified Demand ( Demand ) +#endif import DataCon ( isUnboxedTupleCon ) import NewDemand ( Demand, StrictSig, topDmd, topSig, isBottomingSig ) import Name ( Name, OccName, diff --git a/ghc/compiler/basicTypes/IdInfo.lhs b/ghc/compiler/basicTypes/IdInfo.lhs index be26dfb..9e1a3f0 100644 --- a/ghc/compiler/basicTypes/IdInfo.lhs +++ b/ghc/compiler/basicTypes/IdInfo.lhs @@ -26,12 +26,14 @@ module IdInfo ( -- New demand and strictness info newStrictnessInfo, setNewStrictnessInfo, newDemandInfo, setNewDemandInfo, pprNewStrictness, + setAllStrictnessInfo, +#ifdef OLD_STRICTNESS -- Strictness; imported from Demand StrictnessInfo(..), mkStrictnessInfo, noStrictnessInfo, ppStrictnessInfo,isBottomingStrictness, - setAllStrictnessInfo, +#endif -- Worker WorkerInfo(..), workerExists, wrapperArity, workerId, @@ -78,9 +80,6 @@ import CoreSyn import TyCon ( TyCon ) import Class ( Class ) import PrimOp ( PrimOp ) -#ifdef OLD_STRICTNESS -import Name ( Name ) -#endif import Var ( Id ) import BasicTypes ( OccInfo(..), isFragileOcc, isDeadOcc, seqOccInfo, isLoopBreaker, InsideLam, insideLam, notInsideLam, @@ -91,12 +90,14 @@ import BasicTypes ( OccInfo(..), isFragileOcc, isDeadOcc, seqOccInfo, isLoopBrea import DataCon ( DataCon ) import ForeignCall ( ForeignCall ) import FieldLabel ( FieldLabel ) -import Demand hiding( Demand, seqDemand ) -import qualified Demand import NewDemand import Outputable import Maybe ( isJust ) + #ifdef OLD_STRICTNESS +import Name ( Name ) +import Demand hiding( Demand, seqDemand ) +import qualified Demand import Util ( listLengthCmp ) import List ( replicate ) #endif diff --git a/ghc/compiler/stranal/SaLib.lhs b/ghc/compiler/stranal/SaLib.lhs index ac9c267..72b3ebb 100644 --- a/ghc/compiler/stranal/SaLib.lhs +++ b/ghc/compiler/stranal/SaLib.lhs @@ -6,6 +6,10 @@ See also: the ``library'' for the ``back end'' (@SaBackLib@). \begin{code} +#ifndef OLD_STRICTNESS +module SaLib () where +#else + module SaLib ( AbsVal(..), AnalysisKind(..), @@ -120,3 +124,7 @@ absValFromStrictness anal (StrictnessInfo args_info bot_result) StrAnal -> AbsBot AbsAnal -> AbsTop \end{code} + +\begin{code} +#endif /* OLD_STRICTNESS */ +\end{code} -- 1.7.10.4