diff --git a/hydra-node/src/Hydra/Snapshot.hs b/hydra-node/src/Hydra/Snapshot.hs index 0ec9bce2e19..30d82869fb2 100644 --- a/hydra-node/src/Hydra/Snapshot.hs +++ b/hydra-node/src/Hydra/Snapshot.hs @@ -18,8 +18,11 @@ import Test.QuickCheck.Instances.Natural () newtype SnapshotNumber = UnsafeSnapshotNumber Natural - deriving (Eq, Show, Ord, Generic) - deriving newtype (ToJSON, FromJSON, ToCBOR, FromCBOR, Real, Num, Enum, Integral) + deriving (Eq, Ord, Generic) + deriving newtype (Show, ToJSON, FromJSON, ToCBOR, FromCBOR, Real, Num, Enum, Integral) + +instance Arbitrary SnapshotNumber where + arbitrary = UnsafeSnapshotNumber <$> arbitrary data Snapshot tx = Snapshot { number :: SnapshotNumber @@ -32,9 +35,6 @@ data Snapshot tx = Snapshot deriving instance IsTx tx => Eq (Snapshot tx) deriving instance IsTx tx => Show (Snapshot tx) -instance Arbitrary SnapshotNumber where - arbitrary = UnsafeSnapshotNumber <$> arbitrary - instance (Arbitrary (TxIdType tx), Arbitrary (UTxOType tx)) => Arbitrary (Snapshot tx) where arbitrary = genericArbitrary