From fdb0ec36c69785e40b18870eec316a55ebf08d9b Mon Sep 17 00:00:00 2001 From: John Ky Date: Thu, 14 Sep 2023 20:21:17 +1000 Subject: [PATCH] Simplify with caseShelleyToBabbageOrConwayEraOnwards --- .../CLI/EraBased/Options/Governance/Actions.hs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs b/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs index 8923e57d2f..efa0c7546e 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs @@ -235,14 +235,10 @@ pIntroducedInBabbagePParams = -- Not necessary in Conway era onwards pProtocolParametersUpdateGenesisKeys :: ShelleyBasedEra era -> Parser [VerificationKeyFile In] -pProtocolParametersUpdateGenesisKeys sbe = - case sbe of - ShelleyBasedEraShelley -> many pGenesisVerificationKeyFile - ShelleyBasedEraAllegra -> many pGenesisVerificationKeyFile - ShelleyBasedEraMary -> many pGenesisVerificationKeyFile - ShelleyBasedEraAlonzo -> many pGenesisVerificationKeyFile - ShelleyBasedEraBabbage -> many pGenesisVerificationKeyFile - ShelleyBasedEraConway -> empty +pProtocolParametersUpdateGenesisKeys = + caseShelleyToBabbageOrConwayEraOnwards + (const (many pGenesisVerificationKeyFile)) + (const empty) dpGovActionProtocolParametersUpdate :: ShelleyBasedEra era -> Parser (EraBasedProtocolParametersUpdate era)