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:
698083a
)
Add is_let predicate.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 31 Mar 2010 11:55:44 +0000
(13:55 +0200)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 31 Mar 2010 11:55:44 +0000
(13:55 +0200)
cλash/CLasH/Utils/Core/CoreTools.hs
patch
|
blob
|
history
diff --git
a/cλash/CLasH/Utils/Core/CoreTools.hs
b/cλash/CLasH/Utils/Core/CoreTools.hs
index 19c12700aa86d23709589687e779d70b82fc23f2..a4ea1eca740bbd7f6222781b30259a90a31e7e8c 100644
(file)
--- a/
cλash/CLasH/Utils/Core/CoreTools.hs
+++ b/
cλash/CLasH/Utils/Core/CoreTools.hs
@@
-148,6
+148,11
@@
is_lam :: CoreSyn.CoreExpr -> Bool
is_lam (CoreSyn.Lam _ _) = True
is_lam _ = False
+-- Is the given core expression a let expression?
+is_let :: CoreSyn.CoreExpr -> Bool
+is_let (CoreSyn.Let _ _) = True
+is_let _ = False
+
-- Is the given core expression of a function type?
is_fun :: CoreSyn.CoreExpr -> Bool
-- Treat Type arguments differently, because exprType is not defined for them.