Skip to content

Commit

Permalink
Merge pull request #1023 from input-output-hk/improve-show-snapshow
Browse files Browse the repository at this point in the history
TUI should not say "UnsafeSnapshotNumber"
  • Loading branch information
ffakenz committed Aug 16, 2023
2 parents 5ca487f + d2dad6b commit 1e13b60
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hydra-node/src/Hydra/Snapshot.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 1e13b60

Please sign in to comment.