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:
d59ed8d
)
Add variant of isRepr that operates in the TranslatorSession.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Fri, 5 Mar 2010 17:12:51 +0000
(18:12 +0100)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Fri, 5 Mar 2010 17:12:51 +0000
(18:12 +0100)
cλash/CLasH/Normalize/NormalizeTools.hs
patch
|
blob
|
history
diff --git
a/cλash/CLasH/Normalize/NormalizeTools.hs
b/cλash/CLasH/Normalize/NormalizeTools.hs
index 187c6f9ba76946990b5f78473dcab71556c9af05..3da2728176ec42b95e8cbf5a267f2d07658038e9 100644
(file)
--- a/
cλash/CLasH/Normalize/NormalizeTools.hs
+++ b/
cλash/CLasH/Normalize/NormalizeTools.hs
@@
-178,9
+178,12
@@
substitute_clone find repl expr = subeverywhere (substitute_clone find repl) exp
-- Is the given expression representable at runtime, based on the type?
isRepr :: (CoreTools.TypedThing t) => t -> TransformMonad Bool
-- Is the given expression representable at runtime, based on the type?
isRepr :: (CoreTools.TypedThing t) => t -> TransformMonad Bool
-isRepr tything = case CoreTools.getType tything of
+isRepr tything = Trans.lift (isRepr' tything)
+
+isRepr' :: (CoreTools.TypedThing t) => t -> TranslatorSession Bool
+isRepr' tything = case CoreTools.getType tything of
Nothing -> return False
Nothing -> return False
- Just ty ->
Trans.lift $
MonadState.lift tsType $ VHDLTools.isReprType ty
+ Just ty -> MonadState.lift tsType $ VHDLTools.isReprType ty
is_local_var :: CoreSyn.CoreExpr -> TranslatorSession Bool
is_local_var (CoreSyn.Var v) = do
is_local_var :: CoreSyn.CoreExpr -> TranslatorSession Bool
is_local_var (CoreSyn.Var v) = do