Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbo4350 committed Nov 21, 2024
1 parent 1e136a3 commit 5649c78
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 28 deletions.
1 change: 0 additions & 1 deletion cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,8 @@ pQueryTreasuryValueCmd era envCli = do
<*> optional pOutputFile

pQueryNoArgCmdArgs
:: forall era. ()
:: forall era
. ()
=> ConwayEraOnwards era
-> EnvCli
-> Parser (QueryNoArgCmdArgs era)
Expand Down
9 changes: 6 additions & 3 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Governance.hs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ runGovernanceCmds = \case
runGovernanceVoteCmds cmds

runGovernanceMIRCertificatePayStakeAddrs
:: forall era. ShelleyToBabbageEra era
:: forall era
. ShelleyToBabbageEra era
-> L.MIRPot
-> [StakeAddress]
-- ^ Stake addresses
Expand Down Expand Up @@ -104,7 +105,8 @@ runGovernanceMIRCertificatePayStakeAddrs w mirPot sAddrs rwdAmts oFp = do
mirCertDesc = "Move Instantaneous Rewards Certificate"

runGovernanceCreateMirCertificateTransferToTreasuryCmd
:: forall era. ()
:: forall era
. ()
=> ShelleyToBabbageEra era
-> Lovelace
-> File () Out
Expand All @@ -125,7 +127,8 @@ runGovernanceCreateMirCertificateTransferToTreasuryCmd w ll oFp = do
mirCertDesc = "MIR Certificate Send To Treasury"

runGovernanceCreateMirCertificateTransferToReservesCmd
:: forall era. ()
:: forall era
. ()
=> ShelleyToBabbageEra era
-> Lovelace
-> File () Out
Expand Down
21 changes: 14 additions & 7 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ runGovernanceActionViewCmd
proposal

runGovernanceActionInfoCmd
:: forall era. ()
:: forall era
. ()
=> GovernanceActionInfoCmdArgs era
-> ExceptT GovernanceActionsError IO ()
runGovernanceActionInfoCmd
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -302,7 +306,8 @@ runGovernanceActionUpdateCommitteeCmd
proposal

runGovernanceActionCreateProtocolParametersUpdateCmd
:: forall era. ()
:: forall era
. ()
=> Cmd.GovernanceActionProtocolParametersUpdateCmdArgs era
-> ExceptT GovernanceActionsError IO ()
runGovernanceActionCreateProtocolParametersUpdateCmd eraBasedPParams' = do
Expand Down Expand Up @@ -414,7 +419,8 @@ addCostModelsToEraBasedProtocolParametersUpdate
ConwayEraBasedProtocolParametersUpdate common (aOn{alCostModels = SJust cmdls}) inB inC

runGovernanceActionTreasuryWithdrawalCmd
:: forall era. ()
:: forall era
. ()
=> GovernanceActionTreasuryWithdrawalCmdArgs era
-> ExceptT GovernanceActionsError IO ()
runGovernanceActionTreasuryWithdrawalCmd
Expand Down Expand Up @@ -466,7 +472,8 @@ runGovernanceActionTreasuryWithdrawalCmd
writeFileTextEnvelope outFile (Just "Treasury withdrawal proposal") proposal

runGovernanceActionHardforkInitCmd
:: forall era. ()
:: forall era
. ()
=> GovernanceActionHardforkInitCmdArgs era
-> ExceptT GovernanceActionsError IO ()
runGovernanceActionHardforkInitCmd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Vote.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ runGovernanceVoteCmds = \case
& firstExceptT CmdGovernanceVoteError

runGovernanceVoteCreateCmd
:: forall era. ()
:: forall era
. ()
=> Cmd.GovernanceVoteCreateCmdArgs era
-> ExceptT GovernanceVoteCmdError IO ()
runGovernanceVoteCreateCmd
Expand Down Expand Up @@ -92,7 +93,8 @@ runGovernanceVoteCreateCmd
writeFileTextEnvelope outFile Nothing votingProcedures

runGovernanceVoteViewCmd
:: forall era. ()
:: forall era
. ()
=> Cmd.GovernanceVoteViewCmdArgs era
-> ExceptT GovernanceVoteCmdError IO ()
runGovernanceVoteViewCmd
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
<> pshow v
13 changes: 6 additions & 7 deletions cardano-cli/src/Cardano/CLI/Types/Errors/ScriptDataError.hs
Original file line number Diff line number Diff line change
@@ -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 ())
Expand All @@ -33,4 +32,4 @@ renderScriptDataError = \case
ScriptDataErrorMetadataDecode fp decoderErr ->
"Error decoding CBOR metadata at: " <> pshow fp <> " Error: " <> pshow decoderErr
ScriptDataErrorJsonBytes e ->
prettyError e
prettyError e

0 comments on commit 5649c78

Please sign in to comment.