[project @ 1996-12-19 09:10:02 by simonpj]
[ghc-hetmet.git] / ghc / compiler / stranal / SaLib.lhs
index 52f6650..e3fd7ab 100644 (file)
@@ -1,5 +1,5 @@
 %
-% (c) The GRASP/AQUA Project, Glasgow University, 1993-1995
+% (c) The GRASP/AQUA Project, Glasgow University, 1993-1996
 %
 \section[SaLib]{Basic datatypes, functions for the strictness analyser}
 
@@ -11,24 +11,25 @@ See also: the ``library'' for the ``back end'' (@SaBackLib@).
 module SaLib (
        AbsVal(..),
        AnalysisKind(..),
-       AbsValEnv{-abstract-}, StrictEnv(..), AbsenceEnv(..),
-       StrAnalFlags(..), getStrAnalFlags,
+       AbsValEnv{-abstract-}, SYN_IE(StrictEnv), SYN_IE(AbsenceEnv),
+       SYN_IE(StrAnalFlags), getStrAnalFlags,
        nullAbsValEnv, addOneToAbsValEnv, growAbsValEnvList,
        lookupAbsValEnv,
-       absValFromStrictness,
-
-       -- and to make the interface self-sufficient...
-       CoreExpr, Id, IdEnv(..), UniqFM, Unique,
-       Demand, PlainCoreExpr(..)
+       absValFromStrictness
     ) where
 
-import IdEnv
-import IdInfo
---import FiniteMap     -- debugging only
-import Outputable
-import PlainCore
-import Pretty
-import Util            -- for pragmas only
+IMP_Ubiq(){-uitous-}
+
+import CoreSyn         ( SYN_IE(CoreExpr) )
+import Id              ( nullIdEnv, addOneToIdEnv, growIdEnvList,
+                         lookupIdEnv, SYN_IE(IdEnv),
+                         GenId{-instance Outputable-}
+                       )
+import IdInfo          ( StrictnessInfo(..) )
+import Demand          ( Demand{-instance Outputable-} )
+import Outputable      ( Outputable(..){-instance * []-} )
+import PprType         ( GenType{-instance Outputable-} )
+import Pretty          ( ppStr, ppCat )
 \end{code}
 
 %************************************************************************
@@ -64,7 +65,7 @@ data AbsVal
 
   | AbsFun                 -- An abstract function, with the given:
            [Id]            -- arguments
-           PlainCoreExpr   -- body
+           CoreExpr   -- body
            AbsValEnv       -- and environment
 
   | AbsApproxFun           -- This is used to represent a coarse
@@ -73,7 +74,7 @@ data AbsVal
                            -- argument if the i'th element of the Demand
                            -- list so indicates.
                            -- The list of arguments is always non-empty.
-                           -- In effect, AbsApproxFun [] = AbsTop 
+                           -- In effect, AbsApproxFun [] = AbsTop
 
 instance Outputable AbsVal where
     ppr sty AbsTop = ppStr "AbsTop"
@@ -91,7 +92,7 @@ instance Outputable AbsVal where
 
 An @AbsValEnv@ maps @Ids@ to @AbsVals@.  Any unbound @Ids@ are
 implicitly bound to @AbsTop@, the completely uninformative,
-pessimistic value---see @absEval@ of a @CoVar@.
+pessimistic value---see @absEval@ of a @Var@.
 
 \begin{code}
 data AbsValEnv = AbsValEnv StrAnalFlags (IdEnv AbsVal)
@@ -116,7 +117,7 @@ getStrAnalFlags (AbsValEnv flags _) = flags
 \end{code}
 
 \begin{code}
-absValFromStrictness :: AnalysisKind -> StrictnessInfo -> AbsVal
+absValFromStrictness :: AnalysisKind -> StrictnessInfo bdee -> AbsVal
 
 absValFromStrictness anal NoStrictnessInfo            = AbsTop