aboutsummaryrefslogtreecommitdiffstats
path: root/src/Test/VeriFuzz/Graph/Random.hs
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2018-11-09 17:19:34 +0000
committerYann Herklotz <ymherklotz@gmail.com>2018-11-09 17:19:34 +0000
commit036baeb670314358c6021aa9da2f23c1787aa3e6 (patch)
treee6084195a38e0224571bfbdb8195252eab9cb65f /src/Test/VeriFuzz/Graph/Random.hs
parentadda9ab2f66adeb7fa5c5c7cef6ceb7bb107e169 (diff)
downloadverismith-036baeb670314358c6021aa9da2f23c1787aa3e6.tar.gz
verismith-036baeb670314358c6021aa9da2f23c1787aa3e6.zip
Add initial module files
Diffstat (limited to 'src/Test/VeriFuzz/Graph/Random.hs')
-rw-r--r--src/Test/VeriFuzz/Graph/Random.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Test/VeriFuzz/Graph/Random.hs b/src/Test/VeriFuzz/Graph/Random.hs
new file mode 100644
index 0000000..a0937d0
--- /dev/null
+++ b/src/Test/VeriFuzz/Graph/Random.hs
@@ -0,0 +1,13 @@
+module Test.VeriFuzz.Graph.Random
+ ( randomDAG
+ ) where
+
+import Data.Graph.Inductive
+import Test.QuickCheck
+
+randomDAG :: (Arbitrary a)
+ => GenIO -- ^ The random number generator to use
+ -> Int -- ^ The number of nodes
+ -> IO (Gr (LNode a) e) -- ^ The generated graph. It uses Arbitrary to
+ -- generate random instances of each node
+randomDAG = do