From 26bb616517de72d5419b9bd4a12629fe3ba61e95 Mon Sep 17 00:00:00 2001 From: simonm Date: Mon, 12 Jan 1998 14:39:44 +0000 Subject: [PATCH] [project @ 1998-01-12 14:39:24 by simonm] change a few datatypes to newtypes. --- ghc/compiler/absCSyn/Costs.lhs | 2 +- ghc/compiler/deSugar/Check.lhs | 2 +- ghc/compiler/simplStg/UpdAnal.lhs | 4 ++-- ghc/compiler/stranal/SaLib.lhs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ghc/compiler/absCSyn/Costs.lhs b/ghc/compiler/absCSyn/Costs.lhs index c1cb316..44514ea 100644 --- a/ghc/compiler/absCSyn/Costs.lhs +++ b/ghc/compiler/absCSyn/Costs.lhs @@ -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 diff --git a/ghc/compiler/deSugar/Check.lhs b/ghc/compiler/deSugar/Check.lhs index fba9b3a..c4901cb 100644 --- a/ghc/compiler/deSugar/Check.lhs +++ b/ghc/compiler/deSugar/Check.lhs @@ -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])]) diff --git a/ghc/compiler/simplStg/UpdAnal.lhs b/ghc/compiler/simplStg/UpdAnal.lhs index 2e20a1a..32394b8 100644 --- a/ghc/compiler/simplStg/UpdAnal.lhs +++ b/ghc/compiler/simplStg/UpdAnal.lhs @@ -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 diff --git a/ghc/compiler/stranal/SaLib.lhs b/ghc/compiler/stranal/SaLib.lhs index 0a4269a..563ecc6 100644 --- a/ghc/compiler/stranal/SaLib.lhs +++ b/ghc/compiler/stranal/SaLib.lhs @@ -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 -- 1.7.10.4