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:
b5fe532
)
Add has_free_tyvars predicate.
author
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Sun, 21 Jun 2009 15:22:40 +0000
(17:22 +0200)
committer
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Sun, 21 Jun 2009 15:23:03 +0000
(17:23 +0200)
CoreTools.hs
patch
|
blob
|
history
diff --git
a/CoreTools.hs
b/CoreTools.hs
index 444a4ba6c2ab7e469e164b030f77b5067c905459..4cafec1b34f8225870b4cb6b32af8ee03505936a 100644
(file)
--- a/
CoreTools.hs
+++ b/
CoreTools.hs
@@
-22,8
+22,10
@@
import qualified DynFlags
import qualified SrcLoc
import qualified CoreSyn
import qualified Var
+import qualified VarSet
import qualified Unique
import qualified CoreUtils
+import qualified CoreFVs
import GhcTools
import HsTools
@@
-117,3
+119,6
@@
is_var :: CoreSyn.CoreExpr -> Bool
is_var (CoreSyn.Var _) = True
is_var _ = False
+-- Does the given CoreExpr have any free type vars?
+has_free_tyvars :: CoreSyn.CoreExpr -> Bool
+has_free_tyvars = not . VarSet.isEmptyVarSet . (CoreFVs.exprSomeFreeVars Var.isTyVar)