X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcoreSyn%2FCoreSyn.lhs;h=f732a95fba2aa3ca50114c0527a331535607889b;hb=391a3e9c08c470bd1444cba2e5111e253c19ea84;hp=6953a52c963f66c4c2d8cd6836729bd25f5ee160;hpb=c011bcc1724a3bef0c9cb0aa2b6e178412447b58;p=ghc-hetmet.git diff --git a/compiler/coreSyn/CoreSyn.lhs b/compiler/coreSyn/CoreSyn.lhs index 6953a52..f732a95 100644 --- a/compiler/coreSyn/CoreSyn.lhs +++ b/compiler/coreSyn/CoreSyn.lhs @@ -48,7 +48,6 @@ module CoreSyn ( #include "HsVersions.h" -import StaticFlags import CostCentre import Var import Type @@ -138,7 +137,7 @@ Invariant: The remaining cases are in order of increasing Invariant: The list of alternatives is ALWAYS EXHAUSTIVE, meaning that it covers all cases that can occur - An "exhausive" case does not necessarily mention all constructors: + An "exhaustive" case does not necessarily mention all constructors: data Foo = Red | Green | Blue ...case x of @@ -389,7 +388,7 @@ neverUnfold _ = False instance Outputable AltCon where ppr (DataAlt dc) = ppr dc ppr (LitAlt lit) = ppr lit - ppr DEFAULT = ptext SLIT("__DEFAULT") + ppr DEFAULT = ptext (sLit "__DEFAULT") instance Show AltCon where showsPrec p con = showsPrecSDoc p (ppr con) @@ -591,23 +590,18 @@ coreExprCc _ = noCostCentre %* * %************************************************************************ +At one time we optionally carried type arguments through to runtime. @isRuntimeVar v@ returns if (Lam v _) really becomes a lambda at runtime, i.e. if type applications are actual lambdas because types are kept around -at runtime. - -Similarly isRuntimeArg. +at runtime. Similarly isRuntimeArg. \begin{code} isRuntimeVar :: Var -> Bool -isRuntimeVar | opt_RuntimeTypes = \_ -> True - | otherwise = \v -> isId v +isRuntimeVar = isId isRuntimeArg :: CoreExpr -> Bool -isRuntimeArg | opt_RuntimeTypes = \_ -> True - | otherwise = \e -> isValArg e -\end{code} +isRuntimeArg = isValArg -\begin{code} isValArg :: Expr b -> Bool isValArg (Type _) = False isValArg _ = True @@ -667,7 +661,7 @@ seqPairs ((b,e):prs) = seqBndr b `seq` seqExpr e `seq` seqPairs prs seqAlts :: [CoreAlt] -> () seqAlts [] = () -seqAlts ((_,bs,e):alts) = seqBndrs bs `seq` seqExpr e `seq` seqAlts alts +seqAlts ((c,bs,e):alts) = c `seq` seqBndrs bs `seq` seqExpr e `seq` seqAlts alts seqRules :: [CoreRule] -> () seqRules [] = ()