aboutsummaryrefslogtreecommitdiffstats
path: root/src/Test/VeriFuzz/Graph/CodeGen.hs
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2018-12-31 19:13:25 +0100
committerYann Herklotz <ymherklotz@gmail.com>2018-12-31 19:13:25 +0100
commitde580a7d4b5f4def9f0b71c6cff33ccad45d678b (patch)
treed7632f745db918da754b21ed951e30351a459f41 /src/Test/VeriFuzz/Graph/CodeGen.hs
parentb679d2c6b19f647a3af98019426dfd05e8e103e9 (diff)
downloadverismith-de580a7d4b5f4def9f0b71c6cff33ccad45d678b.tar.gz
verismith-de580a7d4b5f4def9f0b71c6cff33ccad45d678b.zip
Large refactor
Diffstat (limited to 'src/Test/VeriFuzz/Graph/CodeGen.hs')
-rw-r--r--src/Test/VeriFuzz/Graph/CodeGen.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Test/VeriFuzz/Graph/CodeGen.hs b/src/Test/VeriFuzz/Graph/CodeGen.hs
index 64abb0a..eaa109e 100644
--- a/src/Test/VeriFuzz/Graph/CodeGen.hs
+++ b/src/Test/VeriFuzz/Graph/CodeGen.hs
@@ -35,8 +35,8 @@ statList g n = toStr <$> safe tail n
lastEl :: [Node] -> Maybe Text
lastEl n = fromNode <$> safe head n
-toStatement :: (Graph gr) => gr Gate e -> LNode Gate -> Text
-toStatement graph (n, g) =
+toStmnt :: (Graph gr) => gr Gate e -> LNode Gate -> Text
+toStmnt graph (n, g) =
fromMaybe empty $ Just " assign " <> Just (fromNode n)
<> Just " = " <> statList g nodeL <> lastEl nodeL <> Just ";\n"
where
@@ -48,7 +48,7 @@ generate graph =
<> fromList (imap " input wire " ",\n" inp)
<> sep ",\n" (imap " output wire " "" out)
<> ");\n"
- <> fromList (toStatement graph <$> labNodes graph)
+ <> fromList (toStmnt graph <$> labNodes graph)
<> "endmodule\n\nmodule main;\n initial\n begin\n "
<> "$display(\"Hello, world\");\n $finish;\n "
<> "end\nendmodule"