projects
/
matthijs
/
master-project
/
cλash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10653fc
)
Add has_free_vars predicate.
author
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Fri, 26 Jun 2009 09:59:59 +0000
(11:59 +0200)
committer
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Fri, 26 Jun 2009 09:59:59 +0000
(11:59 +0200)
CoreTools.hs
patch
|
blob
|
history
diff --git
a/CoreTools.hs
b/CoreTools.hs
index c797bb7581fa3b615af426e1693f4ff6303235ae..dfb4f5c680ddebede83c4584c59beb4fe82e7b3b 100644
(file)
--- a/
CoreTools.hs
+++ b/
CoreTools.hs
@@
-149,6
+149,10
@@
is_applicable expr = is_fun expr || is_poly expr
has_free_tyvars :: CoreSyn.CoreExpr -> Bool
has_free_tyvars = not . VarSet.isEmptyVarSet . (CoreFVs.exprSomeFreeVars Var.isTyVar)
+-- Does the given CoreExpr have any free local vars?
+has_free_vars :: CoreSyn.CoreExpr -> Bool
+has_free_vars = not . VarSet.isEmptyVarSet . CoreFVs.exprFreeVars
+
-- Turns a Var CoreExpr into the Id inside it. Will of course only work for
-- simple Var CoreExprs, not complexer ones.
exprToVar :: CoreSyn.CoreExpr -> Var.Id