change a few datatypes to newtypes.
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
\begin{code}
-data BoxedString = BS String
+newtype BoxedString = BS String
type WarningPat = InPat BoxedString --Name --String
type ExhaustivePat = ([WarningPat], [(BoxedString, [HsLit])])
-\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
type Closure = (IdEnvInt, Refs, AbFun)
type AbVal = IdEnvClosure -> Closure
-data AbFun = Fun (Closure -> Closure)
+newtype AbFun = Fun (Closure -> Closure)
-- partain: speeding-up stuff
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