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:
ed6bb40
)
Print the binds we're about to translate.
author
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Fri, 30 Jan 2009 08:56:27 +0000
(09:56 +0100)
committer
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Fri, 30 Jan 2009 08:56:27 +0000
(09:56 +0100)
Translator.hs
patch
|
blob
|
history
diff --git
a/Translator.hs
b/Translator.hs
index ef46be9f90f6d2e153e04a3459b654cc57d58070..a15c9b394ce65f75ee7b7be55d8fc4d7b9399c51 100644
(file)
--- a/
Translator.hs
+++ b/
Translator.hs
@@
-43,8
+43,9
@@
main =
--load LoadAllTargets
--core <- GHC.compileToCoreSimplified "Adders.hs"
core <- GHC.compileToCoreSimplified "Adders.hs"
--load LoadAllTargets
--core <- GHC.compileToCoreSimplified "Adders.hs"
core <- GHC.compileToCoreSimplified "Adders.hs"
- liftIO $ printBinds (cm_binds core)
+
--
liftIO $ printBinds (cm_binds core)
let binds = Maybe.mapMaybe (findBind (cm_binds core)) ["full_adder", "half_adder"]
let binds = Maybe.mapMaybe (findBind (cm_binds core)) ["full_adder", "half_adder"]
+ liftIO $ printBinds binds
-- Turn bind into VHDL
let vhdl = State.evalState (mkVHDL binds) (VHDLSession 0 builtin_funcs)
liftIO $ putStr $ concat $ map (render . ForSyDe.Backend.Ppr.ppr) vhdl
-- Turn bind into VHDL
let vhdl = State.evalState (mkVHDL binds) (VHDLSession 0 builtin_funcs)
liftIO $ putStr $ concat $ map (render . ForSyDe.Backend.Ppr.ppr) vhdl
@@
-78,7
+79,7
@@
printBind (Rec binds) = do
printBind' (b, expr) = do
putStr $ getOccString b
printBind' (b, expr) = do
putStr $ getOccString b
-
--
putStr $ showSDoc $ ppr expr
+ putStr $ showSDoc $ ppr expr
putStr "\n"
findBind :: [CoreBind] -> String -> Maybe CoreBind
putStr "\n"
findBind :: [CoreBind] -> String -> Maybe CoreBind