projects
/
matthijs
/
master-project
/
cλash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Cast propagation transform.
[matthijs/master-project/cλash.git]
/
CoreTools.hs
diff --git
a/CoreTools.hs
b/CoreTools.hs
index 85c398ab7c2777bb920c749033f28caa2594d6c4..3c26793c8c804ce7f9dd7262851565398638195d 100644
(file)
--- a/
CoreTools.hs
+++ b/
CoreTools.hs
@@
-95,6
+95,13
@@
tfvec_len ty =
where
(tycon, args) = Type.splitTyConApp ty
[len, el_ty] = args
where
(tycon, args) = Type.splitTyConApp ty
[len, el_ty] = args
+
+-- | Get the element type of a TFVec type
+tfvec_elem :: Type.Type -> Type.Type
+tfvec_elem ty = el_ty
+ where
+ (tycon, args) = Type.splitTyConApp ty
+ [len, el_ty] = args
-- Is this a wild binder?
is_wild :: CoreSyn.CoreBndr -> Bool
-- Is this a wild binder?
is_wild :: CoreSyn.CoreBndr -> Bool