[project @ 2003-03-24 11:23:20 by simonmar]
authorsimonmar <unknown>
Mon, 24 Mar 2003 11:23:21 +0000 (11:23 +0000)
committersimonmar <unknown>
Mon, 24 Mar 2003 11:23:21 +0000 (11:23 +0000)
#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
ghc/compiler/basicTypes/Id.lhs
ghc/compiler/basicTypes/IdInfo.lhs
ghc/compiler/stranal/SaLib.lhs

index 8e8f24f..a038a23 100644 (file)
@@ -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}
index 949ed23..b810376 100644 (file)
@@ -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,
index be26dfb..9e1a3f0 100644 (file)
@@ -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
index ac9c267..72b3ebb 100644 (file)
@@ -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}