diff options
author | Yann Herklotz <git@yannherklotz.com> | 2019-07-27 00:57:44 +0200 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2019-07-27 00:57:44 +0200 |
commit | 7e5621f79dfbeb2e5112bef931c4cfc858a2f19e (patch) | |
tree | 03677dc06c19f6c188446661a51c158adafc83a8 /src/VeriFuzz/Verilog/BitVec.hs | |
parent | 7777952f38b24f26f29c2327296494f32d5f49a9 (diff) | |
download | verismith-7e5621f79dfbeb2e5112bef931c4cfc858a2f19e.tar.gz verismith-7e5621f79dfbeb2e5112bef931c4cfc858a2f19e.zip |
Add a benchmark
Diffstat (limited to 'src/VeriFuzz/Verilog/BitVec.hs')
-rw-r--r-- | src/VeriFuzz/Verilog/BitVec.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/VeriFuzz/Verilog/BitVec.hs b/src/VeriFuzz/Verilog/BitVec.hs index 80fa539..0cc9eb3 100644 --- a/src/VeriFuzz/Verilog/BitVec.hs +++ b/src/VeriFuzz/Verilog/BitVec.hs @@ -10,9 +10,11 @@ Portability : POSIX Unsigned BitVec implementation. -} +{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} +{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} module VeriFuzz.Verilog.BitVec @@ -23,16 +25,18 @@ module VeriFuzz.Verilog.BitVec ) where +import Control.DeepSeq (NFData) import Data.Bits import Data.Data import Data.Ratio +import GHC.Generics (Generic) -- | Bit Vector that stores the bits in an arbitrary container together with the -- size. data BitVecF a = BitVec { width :: {-# UNPACK #-} !Int , value :: !a } - deriving (Show, Eq, Ord, Data, Functor, Foldable, Traversable) + deriving (Show, Eq, Ord, Data, Functor, Foldable, Traversable, Generic, NFData) -- | Specialisation of the above with Integer, so that infinitely large bit -- vectors can be stored. |