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
Allow a FlatFunction to be named as well as unnamed.
[matthijs/master-project/cλash.git]
/
Translator.hs
diff --git
a/Translator.hs
b/Translator.hs
index b4301a3f1a0b6c3451c0636025bce2a8a947900d..3b0886086b055d3b34aaa8b8c368d0ce2d70bf39 100644
(file)
--- a/
Translator.hs
+++ b/
Translator.hs
@@
-33,8
+33,10
@@
import qualified ForSyDe.Backend.Ppr
import Text.PrettyPrint.HughesPJ (render)
import TranslatorTypes
import Text.PrettyPrint.HughesPJ (render)
import TranslatorTypes
+import HsValueMap
import Pretty
import Flatten
import Pretty
import Flatten
+import FlattenTypes
import qualified VHDL
main =
import qualified VHDL
main =
@@
-106,7
+108,7
@@
flattenBind hsfunc bind@(NonRec var expr) = do
-- Flatten the function
let flatfunc = flattenFunction hsfunc bind
addFunc hsfunc
-- Flatten the function
let flatfunc = flattenFunction hsfunc bind
addFunc hsfunc
- setFlatFunc hsfunc
flatfunc
+ setFlatFunc hsfunc
(Left flatfunc)
let used_hsfuncs = map appFunc (apps flatfunc)
State.mapM resolvFunc used_hsfuncs
return ()
let used_hsfuncs = map appFunc (apps flatfunc)
State.mapM resolvFunc used_hsfuncs
return ()