aboutsummaryrefslogtreecommitdiffstats
path: root/app/Main.hs
blob: bb2697a288dcca8b3ca25b08a625322d0ed7f79c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module Main where

import qualified Data.Graph.Inductive              as G
import qualified Data.GraphViz                     as Gviz
import qualified Data.GraphViz.Attributes.Complete as Gviz
import qualified Data.Text.IO                      as T
import qualified Data.Text.Lazy                    as T
import qualified Test.QuickCheck                   as QC
import           Test.VeriFuzz

instance Gviz.Labellable Gate where
  toLabelValue gate = Gviz.StrLabel . T.pack $ show gate

main :: IO ()
--main = sample (arbitrary :: Gen (Circuit Input))
main = do
  gr <- genRandomDAG 100 :: IO (G.Gr Gate ())
--  _ <- runGraphviz (graphToDot quickParams $ emap (const "") gr) Png "output.png",
--  T.putStrLn $ generate gr
  --g <- QC.generate (QC.arbitrary :: QC.Gen SourceText)
  render . genSourceText . generateAST $ Circuit gr