diff options
Diffstat (limited to 'src/Test/VeriFuzz/Circuit.hs')
-rw-r--r-- | src/Test/VeriFuzz/Circuit.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Test/VeriFuzz/Circuit.hs b/src/Test/VeriFuzz/Circuit.hs index d934a3d..dc0ec81 100644 --- a/src/Test/VeriFuzz/Circuit.hs +++ b/src/Test/VeriFuzz/Circuit.hs @@ -12,7 +12,7 @@ Definition of the circuit graph. module Test.VeriFuzz.Circuit where -import Data.Graph.Inductive +import Data.Graph.Inductive (Gr, LNode) import System.Random import Test.QuickCheck @@ -25,6 +25,8 @@ data Gate = And -- | Newtype for the Circuit which implements a Graph from fgl. newtype Circuit = Circuit { getCircuit :: Gr Gate () } +newtype CNode = CNode { getCNode :: LNode Gate } + instance Random Gate where randomR (a, b) g = case randomR (fromEnum a, fromEnum b) g of |