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
Make top level inlining handle non-representable results gracefully.
[matthijs/master-project/cλash.git]
/
cλash
/
CLasH
/
Normalize.hs
diff --git
a/cλash/CLasH/Normalize.hs
b/cλash/CLasH/Normalize.hs
index 8e6926aa7c4d4ac59b3f159e690a1bee58ffb634..620482f703547f65f3dff7eb888742f70e67421d 100644
(file)
--- a/
cλash/CLasH/Normalize.hs
+++ b/
cλash/CLasH/Normalize.hs
@@
-358,10
+358,10
@@
needsInline f = do
case norm_maybe of
-- Noth normalizeable
Nothing -> return Nothing
case norm_maybe of
-- Noth normalizeable
Nothing -> return Nothing
- Just norm -> case splitNormalized norm of
+ Just norm -> case splitNormalized
NonRep
norm of
-- The function has just a single binding, so that's simple
-- enough to inline.
-- The function has just a single binding, so that's simple
-- enough to inline.
- (args, [bind], res) -> return $ Just norm
+ (args, [bind],
Var
res) -> return $ Just norm
-- More complicated function, don't inline
_ -> return Nothing
-- More complicated function, don't inline
_ -> return Nothing