projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve trace message
[ghc-hetmet.git]
/
compiler
/
coreSyn
/
CoreSyn.lhs
diff --git
a/compiler/coreSyn/CoreSyn.lhs
b/compiler/coreSyn/CoreSyn.lhs
index
79e25a2
..
1b3a9d7
100644
(file)
--- a/
compiler/coreSyn/CoreSyn.lhs
+++ b/
compiler/coreSyn/CoreSyn.lhs
@@
-25,7
+25,7
@@
module CoreSyn (
mkConApp, mkTyBind,
varToCoreExpr, varsToCoreExprs,
mkConApp, mkTyBind,
varToCoreExpr, varsToCoreExprs,
- isTyVar, isIdVar, cmpAltCon, cmpAlt, ltAlt,
+ isTyVar, isId, cmpAltCon, cmpAlt, ltAlt,
-- ** Simple 'Expr' access functions and predicates
bindersOf, bindersOfBinds, rhssOfBind, rhssOfAlts,
-- ** Simple 'Expr' access functions and predicates
bindersOf, bindersOfBinds, rhssOfBind, rhssOfAlts,
@@
-704,7
+704,7
@@
mkTyBind tv ty = NonRec tv (Type ty)
-- | Convert a binder into either a 'Var' or 'Type' 'Expr' appropriately
varToCoreExpr :: CoreBndr -> Expr b
-- | Convert a binder into either a 'Var' or 'Type' 'Expr' appropriately
varToCoreExpr :: CoreBndr -> Expr b
-varToCoreExpr v | isIdVar v = Var v
+varToCoreExpr v | isId v = Var v
| otherwise = Type (mkTyVarTy v)
varsToCoreExprs :: [CoreBndr] -> [Expr b]
| otherwise = Type (mkTyVarTy v)
varsToCoreExprs :: [CoreBndr] -> [Expr b]
@@
-777,8
+777,8
@@
collectTyBinders expr
collectValBinders expr
= go [] expr
where
collectValBinders expr
= go [] expr
where
- go ids (Lam b e) | isIdVar b = go (b:ids) e
- go ids body = (reverse ids, body)
+ go ids (Lam b e) | isId b = go (b:ids) e
+ go ids body = (reverse ids, body)
\end{code}
\begin{code}
\end{code}
\begin{code}
@@
-816,7
+816,7
@@
at runtime. Similarly isRuntimeArg.
\begin{code}
-- | Will this variable exist at runtime?
isRuntimeVar :: Var -> Bool
\begin{code}
-- | Will this variable exist at runtime?
isRuntimeVar :: Var -> Bool
-isRuntimeVar = isIdVar
+isRuntimeVar = isId
-- | Will this argument expression exist at runtime?
isRuntimeArg :: CoreExpr -> Bool
-- | Will this argument expression exist at runtime?
isRuntimeArg :: CoreExpr -> Bool
@@
-834,7
+834,7
@@
isTypeArg _ = False
-- | The number of binders that bind values rather than types
valBndrCount :: [CoreBndr] -> Int
-- | The number of binders that bind values rather than types
valBndrCount :: [CoreBndr] -> Int
-valBndrCount = count isIdVar
+valBndrCount = count isId
-- | The number of argument expressions that are values rather than types at their top level
valArgCount :: [Arg b] -> Int
-- | The number of argument expressions that are values rather than types at their top level
valArgCount :: [Arg b] -> Int