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

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

import           Test.VeriFuzz

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

main :: IO ()
--main = sample (arbitrary :: Gen (Circuit Input))
main = do
  gr <- genRandomDAG 100 :: IO (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 g