From 11743e0aace5c5e5a5545075cb0fdbf1b2e8661e Mon Sep 17 00:00:00 2001 From: fanghr Date: Wed, 18 May 2022 16:49:55 +0800 Subject: [PATCH] `PEq` instances for a bunch of on-chain structures --- agora/Agora/Proposal.hs | 4 ++-- agora/Agora/Stake.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/agora/Agora/Proposal.hs b/agora/Agora/Proposal.hs index 794ea0a..3c82fe3 100644 --- a/agora/Agora/Proposal.hs +++ b/agora/Agora/Proposal.hs @@ -303,7 +303,7 @@ data PProposalStatus (s :: S) deriving anyclass (Generic) deriving anyclass (PIsDataRepr) deriving - (PlutusType, PIsData) + (PlutusType, PIsData, PEq) via PIsDataReprInstances PProposalStatus instance PUnsafeLiftDecl PProposalStatus where type PLifted PProposalStatus = ProposalStatus @@ -361,7 +361,7 @@ newtype PProposalDatum (s :: S) = PProposalDatum deriving anyclass (Generic) deriving anyclass (PIsDataRepr) deriving - (PlutusType, PIsData, PDataFields) + (PlutusType, PIsData, PDataFields, PEq) via (PIsDataReprInstances PProposalDatum) -- TODO: Derive this. diff --git a/agora/Agora/Stake.hs b/agora/Agora/Stake.hs index a33f632..e62e20a 100644 --- a/agora/Agora/Stake.hs +++ b/agora/Agora/Stake.hs @@ -191,7 +191,7 @@ newtype PStakeDatum (s :: S) = PStakeDatum deriving anyclass (Generic) deriving anyclass (PIsDataRepr) deriving - (PlutusType, PIsData, PDataFields) + (PlutusType, PIsData, PDataFields, PEq) via (PIsDataReprInstances PStakeDatum) instance PTryFrom PData (PAsData PStakeDatum) where @@ -241,7 +241,7 @@ newtype PProposalLock (s :: S) = PProposalLock deriving anyclass (Generic) deriving anyclass (PIsDataRepr) deriving - (PlutusType, PIsData, PDataFields) + (PlutusType, PIsData, PDataFields, PEq) via (PIsDataReprInstances PProposalLock) deriving via