remove unused SOP.Generic derivations
This commit is contained in:
parent
b6a30b9ea9
commit
bedac537d0
8 changed files with 12 additions and 94 deletions
|
|
@ -8,7 +8,14 @@ Helpers for constructing effects.
|
||||||
module Agora.Effect (makeEffect) where
|
module Agora.Effect (makeEffect) where
|
||||||
|
|
||||||
import Agora.AuthorityToken (singleAuthorityTokenBurned)
|
import Agora.AuthorityToken (singleAuthorityTokenBurned)
|
||||||
import Plutarch.Api.V1 (PCurrencySymbol, PScriptPurpose (PSpending), PTxInfo, PTxOutRef, PValidator, PValue)
|
import Plutarch.Api.V1 (
|
||||||
|
PCurrencySymbol,
|
||||||
|
PScriptPurpose (PSpending),
|
||||||
|
PTxInfo,
|
||||||
|
PTxOutRef,
|
||||||
|
PValidator,
|
||||||
|
PValue,
|
||||||
|
)
|
||||||
import Plutarch.Extra.TermCont (pguardC, pletC, pletFieldsC, pmatchC, ptryFromC)
|
import Plutarch.Extra.TermCont (pguardC, pletC, pletFieldsC, pmatchC, ptryFromC)
|
||||||
import Plutarch.TryFrom ()
|
import Plutarch.TryFrom ()
|
||||||
import PlutusLedgerApi.V1.Value (CurrencySymbol)
|
import PlutusLedgerApi.V1.Value (CurrencySymbol)
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ import Agora.Governor (
|
||||||
)
|
)
|
||||||
import Agora.Plutarch.Orphans ()
|
import Agora.Plutarch.Orphans ()
|
||||||
import Agora.Scripts (AgoraScripts, authorityTokenSymbol, governorSTAssetClass)
|
import Agora.Scripts (AgoraScripts, authorityTokenSymbol, governorSTAssetClass)
|
||||||
import Generics.SOP qualified as SOP
|
|
||||||
import Plutarch.Api.V1 (
|
import Plutarch.Api.V1 (
|
||||||
PTxOutRef,
|
PTxOutRef,
|
||||||
PValidator,
|
PValidator,
|
||||||
|
|
@ -66,10 +65,6 @@ data MutateGovernorDatum = MutateGovernorDatum
|
||||||
, -- | @since 0.1.ç
|
, -- | @since 0.1.ç
|
||||||
Generic
|
Generic
|
||||||
)
|
)
|
||||||
deriving anyclass
|
|
||||||
( -- | @since 0.1.ç
|
|
||||||
SOP.Generic
|
|
||||||
)
|
|
||||||
|
|
||||||
PlutusTx.makeIsDataIndexed ''MutateGovernorDatum [('MutateGovernorDatum, 0)]
|
PlutusTx.makeIsDataIndexed ''MutateGovernorDatum [('MutateGovernorDatum, 0)]
|
||||||
|
|
||||||
|
|
@ -95,8 +90,6 @@ newtype PMutateGovernorDatum (s :: S)
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ module Agora.Effect.TreasuryWithdrawal (
|
||||||
|
|
||||||
import Agora.Effect (makeEffect)
|
import Agora.Effect (makeEffect)
|
||||||
import Agora.Plutarch.Orphans ()
|
import Agora.Plutarch.Orphans ()
|
||||||
import Generics.SOP qualified as SOP
|
|
||||||
import Plutarch.Api.V1 (
|
import Plutarch.Api.V1 (
|
||||||
AmountGuarantees (Positive),
|
AmountGuarantees (Positive),
|
||||||
KeyGuarantees (Sorted),
|
KeyGuarantees (Sorted),
|
||||||
|
|
@ -57,10 +56,6 @@ data TreasuryWithdrawalDatum = TreasuryWithdrawalDatum
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
Generic
|
Generic
|
||||||
)
|
)
|
||||||
deriving anyclass
|
|
||||||
( -- | @since 0.1.0
|
|
||||||
SOP.Generic
|
|
||||||
)
|
|
||||||
|
|
||||||
-- | @since 0.1.0
|
-- | @since 0.1.0
|
||||||
PlutusTx.makeLift ''TreasuryWithdrawalDatum
|
PlutusTx.makeLift ''TreasuryWithdrawalDatum
|
||||||
|
|
@ -88,8 +83,6 @@ newtype PTreasuryWithdrawalDatum (s :: S)
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ import Agora.Proposal.Time (
|
||||||
)
|
)
|
||||||
import Agora.SafeMoney (GTTag)
|
import Agora.SafeMoney (GTTag)
|
||||||
import Data.Tagged (Tagged (..))
|
import Data.Tagged (Tagged (..))
|
||||||
import Generics.SOP qualified as SOP
|
|
||||||
import Plutarch.DataRepr (
|
import Plutarch.DataRepr (
|
||||||
DerivePConstantViaData (..),
|
DerivePConstantViaData (..),
|
||||||
PDataFields,
|
PDataFields,
|
||||||
|
|
@ -114,10 +113,6 @@ data GovernorRedeemer
|
||||||
, -- | @since 0.2.0
|
, -- | @since 0.2.0
|
||||||
Bounded
|
Bounded
|
||||||
)
|
)
|
||||||
deriving anyclass
|
|
||||||
( -- | @since 0.2.0
|
|
||||||
SOP.Generic
|
|
||||||
)
|
|
||||||
deriving
|
deriving
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
PlutusTx.ToData
|
PlutusTx.ToData
|
||||||
|
|
@ -169,10 +164,6 @@ newtype PGovernorDatum (s :: S) = PGovernorDatum
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
Generic
|
Generic
|
||||||
)
|
)
|
||||||
deriving anyclass
|
|
||||||
( -- | @since 0.1.0
|
|
||||||
SOP.Generic
|
|
||||||
)
|
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
PlutusType
|
PlutusType
|
||||||
|
|
@ -215,8 +206,6 @@ data PGovernorRedeemer (s :: S)
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
|
||||||
|
|
@ -108,10 +108,6 @@ newtype ProposalId = ProposalId {proposalTag :: Integer}
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PlutusTx.UnsafeFromData
|
PlutusTx.UnsafeFromData
|
||||||
)
|
)
|
||||||
deriving anyclass
|
|
||||||
( -- | @since 0.2.0
|
|
||||||
SOP.Generic
|
|
||||||
)
|
|
||||||
|
|
||||||
{- | Encodes a result. Typically, for a Yes/No proposal, we encode it like this:
|
{- | Encodes a result. Typically, for a Yes/No proposal, we encode it like this:
|
||||||
|
|
||||||
|
|
@ -141,10 +137,6 @@ newtype ResultTag = ResultTag {getResultTag :: Integer}
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PlutusTx.UnsafeFromData
|
PlutusTx.UnsafeFromData
|
||||||
)
|
)
|
||||||
deriving anyclass
|
|
||||||
( -- | @since 0.2.0
|
|
||||||
SOP.Generic
|
|
||||||
)
|
|
||||||
|
|
||||||
{- | The "status" of the proposal. This is only useful for state transitions that
|
{- | The "status" of the proposal. This is only useful for state transitions that
|
||||||
need to happen as a result of a transaction as opposed to time-based "periods".
|
need to happen as a result of a transaction as opposed to time-based "periods".
|
||||||
|
|
@ -240,7 +232,6 @@ data ProposalThresholds = ProposalThresholds
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
Generic
|
Generic
|
||||||
)
|
)
|
||||||
deriving anyclass (SOP.Generic)
|
|
||||||
|
|
||||||
PlutusTx.makeIsDataIndexed 'ProposalThresholds [('ProposalThresholds, 0)]
|
PlutusTx.makeIsDataIndexed 'ProposalThresholds [('ProposalThresholds, 0)]
|
||||||
|
|
||||||
|
|
@ -274,10 +265,6 @@ newtype ProposalVotes = ProposalVotes
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PlutusTx.FromData
|
PlutusTx.FromData
|
||||||
)
|
)
|
||||||
deriving anyclass
|
|
||||||
( -- | @since 0.2.0
|
|
||||||
SOP.Generic
|
|
||||||
)
|
|
||||||
|
|
||||||
{- | Create a 'ProposalVotes' that has the same shape as the 'effects' field.
|
{- | Create a 'ProposalVotes' that has the same shape as the 'effects' field.
|
||||||
|
|
||||||
|
|
@ -384,10 +371,6 @@ data ProposalRedeemer
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
Generic
|
Generic
|
||||||
)
|
)
|
||||||
deriving anyclass
|
|
||||||
( -- | @since 0.2.0
|
|
||||||
SOP.Generic
|
|
||||||
)
|
|
||||||
|
|
||||||
-- | @since 0.1.0
|
-- | @since 0.1.0
|
||||||
PlutusTx.makeIsDataIndexed
|
PlutusTx.makeIsDataIndexed
|
||||||
|
|
@ -411,9 +394,7 @@ newtype PResultTag (s :: S) = PResultTag (Term s PInteger)
|
||||||
Generic
|
Generic
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.2.0
|
( -- @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
@ -453,9 +434,7 @@ newtype PProposalId (s :: S) = PProposalId (Term s PInteger)
|
||||||
Generic
|
Generic
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.2.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
@ -508,8 +487,6 @@ data PProposalStatus (s :: S)
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
@ -551,8 +528,6 @@ newtype PProposalThresholds (s :: S) = PProposalThresholds
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
@ -587,9 +562,7 @@ newtype PProposalVotes (s :: S)
|
||||||
Generic
|
Generic
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.2.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
@ -637,8 +610,6 @@ newtype PProposalDatum (s :: S) = PProposalDatum
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
@ -673,8 +644,6 @@ data PProposalRedeemer (s :: S)
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ module Agora.Proposal.Time (
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Composition ((.*))
|
import Control.Composition ((.*))
|
||||||
import Generics.SOP qualified as SOP
|
|
||||||
import Plutarch.Api.V1 (
|
import Plutarch.Api.V1 (
|
||||||
PExtended (PFinite),
|
PExtended (PFinite),
|
||||||
PInterval (PInterval),
|
PInterval (PInterval),
|
||||||
|
|
@ -107,10 +106,6 @@ data ProposalTimingConfig = ProposalTimingConfig
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
Generic
|
Generic
|
||||||
)
|
)
|
||||||
deriving anyclass
|
|
||||||
( -- | @since 0.1.0
|
|
||||||
SOP.Generic
|
|
||||||
)
|
|
||||||
|
|
||||||
PlutusTx.makeIsDataIndexed 'ProposalTimingConfig [('ProposalTimingConfig, 0)]
|
PlutusTx.makeIsDataIndexed 'ProposalTimingConfig [('ProposalTimingConfig, 0)]
|
||||||
|
|
||||||
|
|
@ -174,10 +169,6 @@ data PProposalTime (s :: S) = PProposalTime
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
SOP.HasDatatypeInfo
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PEq
|
PEq
|
||||||
|
|
@ -194,8 +185,6 @@ newtype PProposalStartingTime (s :: S) = PProposalStartingTime (Term s PPOSIXTim
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
@ -240,8 +229,6 @@ newtype PProposalTimingConfig (s :: S) = PProposalTimingConfig
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
@ -273,9 +260,7 @@ newtype PMaxTimeRangeWidth (s :: S)
|
||||||
Generic
|
Generic
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.2.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
|
||||||
|
|
@ -114,10 +114,6 @@ data ProposalLock
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
Generic
|
Generic
|
||||||
)
|
)
|
||||||
deriving anyclass
|
|
||||||
( -- | @since 0.1.0
|
|
||||||
SOP.Generic
|
|
||||||
)
|
|
||||||
|
|
||||||
PlutusTx.makeIsDataIndexed
|
PlutusTx.makeIsDataIndexed
|
||||||
''ProposalLock
|
''ProposalLock
|
||||||
|
|
@ -234,8 +230,6 @@ newtype PStakeDatum (s :: S) = PStakeDatum
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
@ -329,10 +323,6 @@ data PProposalLock (s :: S)
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
SOP.HasDatatypeInfo
|
|
||||||
, -- | @since 0.1.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.1.0
|
, -- | @since 0.1.0
|
||||||
PIsData
|
PIsData
|
||||||
|
|
@ -419,11 +409,7 @@ data PStakeRole (s :: S)
|
||||||
)
|
)
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.2.0
|
( -- | @since 0.2.0
|
||||||
SOP.Generic
|
|
||||||
, -- | @since 0.2.0
|
|
||||||
PlutusType
|
PlutusType
|
||||||
, -- | @since 0.2.0
|
|
||||||
SOP.HasDatatypeInfo
|
|
||||||
, -- | @since 0.2.0
|
, -- | @since 0.2.0
|
||||||
PEq
|
PEq
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -75,10 +75,6 @@ data PTreasuryRedeemer (s :: S)
|
||||||
, -- | @since 0.2.0
|
, -- | @since 0.2.0
|
||||||
Enum
|
Enum
|
||||||
)
|
)
|
||||||
deriving anyclass
|
|
||||||
( -- | @since 0.1.0
|
|
||||||
SOP.Generic
|
|
||||||
)
|
|
||||||
deriving anyclass
|
deriving anyclass
|
||||||
( -- | @since 0.1.0
|
( -- | @since 0.1.0
|
||||||
PlutusType
|
PlutusType
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue