#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?).
\section[Demand]{@Demand@: the amount of demand on a value}
\begin{code}
\section[Demand]{@Demand@: the amount of demand on a value}
\begin{code}
+#ifndef OLD_STRICTNESS
+module Demand () where
+#else
+
module Demand(
Demand(..),
module Demand(
Demand(..),
ppStrictnessInfo (StrictnessInfo wrapper_args bot) = hsep [pprDemands wrapper_args bot]
\end{code}
ppStrictnessInfo (StrictnessInfo wrapper_args bot) = hsep [pprDemands wrapper_args bot]
\end{code}
+\begin{code}
+#endif /* OLD_STRICTNESS */
+\end{code}
import qualified Demand ( Demand )
import qualified Demand ( Demand )
import DataCon ( isUnboxedTupleCon )
import NewDemand ( Demand, StrictSig, topDmd, topSig, isBottomingSig )
import Name ( Name, OccName,
import DataCon ( isUnboxedTupleCon )
import NewDemand ( Demand, StrictSig, topDmd, topSig, isBottomingSig )
import Name ( Name, OccName,
-- New demand and strictness info
newStrictnessInfo, setNewStrictnessInfo,
newDemandInfo, setNewDemandInfo, pprNewStrictness,
-- New demand and strictness info
newStrictnessInfo, setNewStrictnessInfo,
newDemandInfo, setNewDemandInfo, pprNewStrictness,
-- Strictness; imported from Demand
StrictnessInfo(..),
mkStrictnessInfo, noStrictnessInfo,
ppStrictnessInfo,isBottomingStrictness,
-- Strictness; imported from Demand
StrictnessInfo(..),
mkStrictnessInfo, noStrictnessInfo,
ppStrictnessInfo,isBottomingStrictness,
-- Worker
WorkerInfo(..), workerExists, wrapperArity, workerId,
-- Worker
WorkerInfo(..), workerExists, wrapperArity, workerId,
import TyCon ( TyCon )
import Class ( Class )
import PrimOp ( PrimOp )
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,
import Var ( Id )
import BasicTypes ( OccInfo(..), isFragileOcc, isDeadOcc, seqOccInfo, isLoopBreaker,
InsideLam, insideLam, notInsideLam,
import DataCon ( DataCon )
import ForeignCall ( ForeignCall )
import FieldLabel ( FieldLabel )
import DataCon ( DataCon )
import ForeignCall ( ForeignCall )
import FieldLabel ( FieldLabel )
-import Demand hiding( Demand, seqDemand )
-import qualified Demand
import NewDemand
import Outputable
import Maybe ( isJust )
import NewDemand
import Outputable
import Maybe ( isJust )
+import Name ( Name )
+import Demand hiding( Demand, seqDemand )
+import qualified Demand
import Util ( listLengthCmp )
import List ( replicate )
#endif
import Util ( listLengthCmp )
import List ( replicate )
#endif
See also: the ``library'' for the ``back end'' (@SaBackLib@).
\begin{code}
See also: the ``library'' for the ``back end'' (@SaBackLib@).
\begin{code}
+#ifndef OLD_STRICTNESS
+module SaLib () where
+#else
+
module SaLib (
AbsVal(..),
AnalysisKind(..),
module SaLib (
AbsVal(..),
AnalysisKind(..),
StrAnal -> AbsBot
AbsAnal -> AbsTop
\end{code}
StrAnal -> AbsBot
AbsAnal -> AbsTop
\end{code}
+
+\begin{code}
+#endif /* OLD_STRICTNESS */
+\end{code}