aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2018-10-29 12:00:40 +0000
committerYann Herklotz <ymherklotz@gmail.com>2018-10-29 12:00:40 +0000
commit1f43e82274e095e31ca5c575cc358b91982bfc45 (patch)
tree25272931a9b4df64550fdb4f51a40ba614eea6d5 /src
parent485f6ed3c4c9814e6e1aef9d79930c0f97580fb8 (diff)
downloadverismith-1f43e82274e095e31ca5c575cc358b91982bfc45.tar.gz
verismith-1f43e82274e095e31ca5c575cc358b91982bfc45.zip
Partial tree visualization
Diffstat (limited to 'src')
-rw-r--r--src/Main.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 529c5b0..aabff1c 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -7,6 +7,7 @@ import Data.Graph.Inductive.Example (clr479, dag4)
import Data.Text.Lazy
import Data.GraphViz.Printing
import Data.Graph.Inductive.Graph
+import Data.Graph.Inductive.PatriciaTree
type Input = Bool
@@ -39,7 +40,7 @@ eval (Node Xor c1 c2) = eval c1 `xor` eval c2
eval (Node Nand c1 c2) = complement $ eval c1 .&. eval c2
eval (Node Nor c1 c2) = complement $ eval c1 .|. eval c2
-visualize :: (Graph g, Show a) => Circuit a -> g String ()
+visualize :: (Show a) => Circuit a -> Gr String ()
visualize circ =
uncurry mkGraph $ graph Nothing 0 ([], []) circ
where