diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2018-12-02 18:11:28 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2018-12-02 18:11:28 +0000 |
commit | 9ed95213c0b33c56a1de73703f7fc30c13eee4fa (patch) | |
tree | ae31b12137e69c6af52102cc87bf2e4e0b7836d8 /src/Test/VeriFuzz/Types.hs | |
parent | 2c46f7c0700878eddd1b761332373f6d97dea11e (diff) | |
download | verismith-9ed95213c0b33c56a1de73703f7fc30c13eee4fa.tar.gz verismith-9ed95213c0b33c56a1de73703f7fc30c13eee4fa.zip |
[Fix #8] Add Circuit newtype
Diffstat (limited to 'src/Test/VeriFuzz/Types.hs')
-rw-r--r-- | src/Test/VeriFuzz/Types.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Test/VeriFuzz/Types.hs b/src/Test/VeriFuzz/Types.hs index 3b17b8c..78fde7d 100644 --- a/src/Test/VeriFuzz/Types.hs +++ b/src/Test/VeriFuzz/Types.hs @@ -1,5 +1,6 @@ module Test.VeriFuzz.Types where +import Data.Graph.Inductive import System.Random import Test.QuickCheck @@ -8,6 +9,8 @@ data Gate = And | Xor deriving (Show, Eq, Enum, Bounded, Ord) +newtype Circuit = Circuit { getCircuit :: Gr Gate () } + instance Random Gate where randomR (a, b) g = case randomR (fromEnum a, fromEnum b) g of |