[project @ 1998-01-12 14:39:24 by simonm]
authorsimonm <unknown>
Mon, 12 Jan 1998 14:39:44 +0000 (14:39 +0000)
committersimonm <unknown>
Mon, 12 Jan 1998 14:39:44 +0000 (14:39 +0000)
change a few datatypes to newtypes.

ghc/compiler/absCSyn/Costs.lhs
ghc/compiler/deSugar/Check.lhs
ghc/compiler/simplStg/UpdAnal.lhs
ghc/compiler/stranal/SaLib.lhs

index c1cb316..44514ea 100644 (file)
@@ -62,7 +62,7 @@ import PrimOp         ( primOpNeedsWrapper, PrimOp(..) )
 import GlaExts         ( trace )
 
 -- --------------------------------------------------------------------------
-data CostRes = Cost (Int, Int, Int, Int, Int)
+newtype CostRes = Cost (Int, Int, Int, Int, Int)
               deriving (Text)
 
 nullCosts    = Cost (0, 0, 0, 0, 0) :: CostRes
index fba9b3a..c4901cb 100644 (file)
@@ -117,7 +117,7 @@ Pretty Printer are not friends.
  
 \begin{code}
 
-data BoxedString = BS String
+newtype BoxedString = BS String
 
 type WarningPat = InPat BoxedString --Name --String 
 type ExhaustivePat = ([WarningPat], [(BoxedString, [HsLit])])
index 2e20a1a..32394b8 100644 (file)
@@ -1,4 +1,4 @@
-\section{Update Avoidance Analyser}                    -*-haskell-literate-*-
+\section{Update Avoidance Analyser}
 
 (c) Simon Marlow, Andre Santos 1992-1993
 (c) The AQUA Project, Glasgow University, 1995-1996
@@ -100,7 +100,7 @@ lookup_IdEnv env key = case lookupIdEnv env key of
 type Closure = (IdEnvInt, Refs, AbFun)
 
 type AbVal = IdEnvClosure -> Closure
-data AbFun = Fun (Closure -> Closure)
+newtype AbFun = Fun (Closure -> Closure)
 
 -- partain: speeding-up stuff
 
index 0a4269a..563ecc6 100644 (file)
@@ -88,7 +88,7 @@ implicitly bound to @AbsTop@, the completely uninformative,
 pessimistic value---see @absEval@ of a @Var@.
 
 \begin{code}
-data AbsValEnv = AbsValEnv (IdEnv AbsVal)
+newtype AbsValEnv = AbsValEnv (IdEnv AbsVal)
 
 type StrictEnv  = AbsValEnv    -- Environment for strictness analysis
 type AbsenceEnv = AbsValEnv    -- Environment for absence analysis