From c1579547f714468511460707cdab89429ad8159d Mon Sep 17 00:00:00 2001 From: Jordan Millar Date: Thu, 21 Nov 2024 12:53:58 -0400 Subject: [PATCH] Formatting fixes --- cardano-cli/cardano-cli.cabal | 1 - .../src/Cardano/CLI/EraBased/Options/Query.hs | 3 ++- .../CLI/EraBased/Run/Governance/Actions.hs | 21 ++++++++++++------- .../GenesisKeyDelegationCertificate.hs | 3 ++- .../Types/Errors/PlutusScriptDecodeError.hs | 14 +++++++------ .../CLI/Types/Errors/ScriptDataError.hs | 13 ++++++------ 6 files changed, 32 insertions(+), 23 deletions(-) diff --git a/cardano-cli/cardano-cli.cabal b/cardano-cli/cardano-cli.cabal index 5cb7a7d18..296d30527 100644 --- a/cardano-cli/cardano-cli.cabal +++ b/cardano-cli/cardano-cli.cabal @@ -45,7 +45,6 @@ library if impl(ghc < 9.6) ghc-options: -Wno-redundant-constraints - hs-source-dirs: src exposed-modules: Cardano.CLI.Byron.Commands diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs b/cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs index 031db5e0e..490e81bd0 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs @@ -678,7 +678,8 @@ pQueryTreasuryValueCmd era envCli = do <*> optional pOutputFile pQueryNoArgCmdArgs - :: forall era. () + :: forall era + . () => ConwayEraOnwards era -> EnvCli -> Parser (QueryNoArgCmdArgs era) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs index e164dcd8c..33f1c9e78 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs @@ -78,7 +78,8 @@ runGovernanceActionViewCmd proposal runGovernanceActionInfoCmd - :: forall era. () + :: forall era + . () => GovernanceActionInfoCmdArgs era -> ExceptT GovernanceActionsError IO () runGovernanceActionInfoCmd @@ -118,7 +119,8 @@ fetchURLErrorToGovernanceActionError adt = withExceptT (GovernanceActionsProposa -- TODO: Conway era - update with new ledger types from cardano-ledger-conway-1.7.0.0 runGovernanceActionCreateNoConfidenceCmd - :: forall era. () + :: forall era + . () => GovernanceActionCreateNoConfidenceCmdArgs era -> ExceptT GovernanceActionsError IO () runGovernanceActionCreateNoConfidenceCmd @@ -166,7 +168,8 @@ runGovernanceActionCreateNoConfidenceCmd writeFileTextEnvelope outFile (Just "Motion of no confidence proposal") proposalProcedure runGovernanceActionCreateConstitutionCmd - :: forall era. () + :: forall era + . () => GovernanceActionCreateConstitutionCmdArgs era -> ExceptT GovernanceActionsError IO () runGovernanceActionCreateConstitutionCmd @@ -226,7 +229,8 @@ runGovernanceActionCreateConstitutionCmd -- TODO: Conway era - After ledger bump update this function -- with the new ledger types runGovernanceActionUpdateCommitteeCmd - :: forall era. () + :: forall era + . () => GovernanceActionUpdateCommitteeCmdArgs era -> ExceptT GovernanceActionsError IO () runGovernanceActionUpdateCommitteeCmd @@ -302,7 +306,8 @@ runGovernanceActionUpdateCommitteeCmd proposal runGovernanceActionCreateProtocolParametersUpdateCmd - :: forall era. () + :: forall era + . () => Cmd.GovernanceActionProtocolParametersUpdateCmdArgs era -> ExceptT GovernanceActionsError IO () runGovernanceActionCreateProtocolParametersUpdateCmd eraBasedPParams' = do @@ -414,7 +419,8 @@ addCostModelsToEraBasedProtocolParametersUpdate ConwayEraBasedProtocolParametersUpdate common (aOn{alCostModels = SJust cmdls}) inB inC runGovernanceActionTreasuryWithdrawalCmd - :: forall era. () + :: forall era + . () => GovernanceActionTreasuryWithdrawalCmdArgs era -> ExceptT GovernanceActionsError IO () runGovernanceActionTreasuryWithdrawalCmd @@ -466,7 +472,8 @@ runGovernanceActionTreasuryWithdrawalCmd writeFileTextEnvelope outFile (Just "Treasury withdrawal proposal") proposal runGovernanceActionHardforkInitCmd - :: forall era. () + :: forall era + . () => GovernanceActionHardforkInitCmdArgs era -> ExceptT GovernanceActionsError IO () runGovernanceActionHardforkInitCmd diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/GenesisKeyDelegationCertificate.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/GenesisKeyDelegationCertificate.hs index 740f5d97b..b7c1b702b 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/GenesisKeyDelegationCertificate.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/GenesisKeyDelegationCertificate.hs @@ -15,7 +15,8 @@ import Cardano.CLI.Types.Errors.GovernanceCmdError import Cardano.CLI.Types.Key runGovernanceGenesisKeyDelegationCertificate - :: forall era. ShelleyToBabbageEra era + :: forall era + . ShelleyToBabbageEra era -> VerificationKeyOrHashOrFile GenesisKey -> VerificationKeyOrHashOrFile GenesisDelegateKey -> VerificationKeyOrHashOrFile VrfKey diff --git a/cardano-cli/src/Cardano/CLI/Types/Errors/PlutusScriptDecodeError.hs b/cardano-cli/src/Cardano/CLI/Types/Errors/PlutusScriptDecodeError.hs index 24effd990..e00583b19 100644 --- a/cardano-cli/src/Cardano/CLI/Types/Errors/PlutusScriptDecodeError.hs +++ b/cardano-cli/src/Cardano/CLI/Types/Errors/PlutusScriptDecodeError.hs @@ -1,11 +1,13 @@ {-# LANGUAGE LambdaCase #-} -module Cardano.CLI.Types.Errors.PlutusScriptDecodeError - ( PlutusScriptDecodeError(..) - ) where +module Cardano.CLI.Types.Errors.PlutusScriptDecodeError + ( PlutusScriptDecodeError (..) + ) +where -import Cardano.Api -import Data.Text (Text) +import Cardano.Api + +import Data.Text (Text) data PlutusScriptDecodeError = PlutusScriptDecodeErrorUnknownVersion !Text @@ -29,4 +31,4 @@ instance Error PlutusScriptDecodeError where "Version mismatch in code: script version that was read" <> pretty version <> " but tried to decode script version: " - <> pshow v \ No newline at end of file + <> pshow v diff --git a/cardano-cli/src/Cardano/CLI/Types/Errors/ScriptDataError.hs b/cardano-cli/src/Cardano/CLI/Types/Errors/ScriptDataError.hs index 909c6032c..aa994380c 100644 --- a/cardano-cli/src/Cardano/CLI/Types/Errors/ScriptDataError.hs +++ b/cardano-cli/src/Cardano/CLI/Types/Errors/ScriptDataError.hs @@ -1,15 +1,14 @@ {-# LANGUAGE LambdaCase #-} -module Cardano.CLI.Types.Errors.ScriptDataError - ( ScriptDataError(..) +module Cardano.CLI.Types.Errors.ScriptDataError + ( ScriptDataError (..) , renderScriptDataError - ) where - - + ) +where import Cardano.Api -import qualified Cardano.Binary as CBOR +import qualified Cardano.Binary as CBOR data ScriptDataError = ScriptDataErrorFile (FileError ()) @@ -33,4 +32,4 @@ renderScriptDataError = \case ScriptDataErrorMetadataDecode fp decoderErr -> "Error decoding CBOR metadata at: " <> pshow fp <> " Error: " <> pshow decoderErr ScriptDataErrorJsonBytes e -> - prettyError e \ No newline at end of file + prettyError e