Skip to content

Commit

Permalink
Merge pull request #1049 from IntersectMBO/mgalazyn/chore/upgrade-fou…
Browse files Browse the repository at this point in the history
…rmolu-0.18

 Nix dev shell: upgrade fourmolu-0.18.0
  • Loading branch information
carbolymer authored Feb 4, 2025
2 parents 867b295 + db53aaa commit 2427f53
Show file tree
Hide file tree
Showing 13 changed files with 144 additions and 122 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
9d1fd093071278be77428dba189d958d5b7a7aeb
ddeefdf97d635634083ea286af05c1026d4bc28b
cdd0ead52f740eca8cedb152307992a11c6b478a
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ data GovernanceDRepUpdateCertificateCmdArgs era
, drepHashSource :: !DRepHashSource
, mAnchor
:: Maybe
( PotentiallyCheckedAnchor
DRepMetadataUrl
(L.Anchor L.StandardCrypto)
)
( PotentiallyCheckedAnchor
DRepMetadataUrl
(L.Anchor L.StandardCrypto)
)
, outFile :: !(File () Out)
}

Expand Down
16 changes: 8 additions & 8 deletions cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1102,10 +1102,10 @@ pScriptWitnessFiles witctx autoBalanceExecUnits scriptFlagPrefix scriptFlagPrefi
toScriptWitnessFiles
:: ScriptFile
-> Maybe
( ScriptDatumOrFile witctx
, ScriptRedeemerOrFile
, ExecutionUnits
)
( ScriptDatumOrFile witctx
, ScriptRedeemerOrFile
, ExecutionUnits
)
-> ScriptWitnessFiles witctx
toScriptWitnessFiles sf Nothing = SimpleScriptWitnessFile sf
toScriptWitnessFiles sf (Just (d, r, e)) = PlutusScriptWitnessFiles sf d r e
Expand Down Expand Up @@ -1581,10 +1581,10 @@ pMetadataFile =
pWithdrawal
:: BalanceTxExecUnits
-> Parser
( StakeAddress
, Lovelace
, Maybe (ScriptWitnessFiles WitCtxStake)
)
( StakeAddress
, Lovelace
, Maybe (ScriptWitnessFiles WitCtxStake)
)
pWithdrawal balance =
(\(stakeAddr, lovelace) maybeScriptFp -> (stakeAddr, lovelace, maybeScriptFp))
<$> Opt.option
Expand Down
88 changes: 44 additions & 44 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,13 @@ generateShelleyNodeSecrets
:: [SigningKey GenesisDelegateExtendedKey]
-> [VerificationKey GenesisKey]
-> IO
( Map
(Hash GenesisKey)
(Hash GenesisDelegateKey, Hash VrfKey)
, [SigningKey VrfKey]
, [SigningKey KesKey]
, [(OperationalCertificate, OperationalCertificateIssueCounter)]
)
( Map
(Hash GenesisKey)
(Hash GenesisDelegateKey, Hash VrfKey)
, [SigningKey VrfKey]
, [SigningKey KesKey]
, [(OperationalCertificate, OperationalCertificateIssueCounter)]
)
generateShelleyNodeSecrets shelleyDelegateKeys shelleyGenesisvkeys = do
let
shelleyDelegatevkeys :: [VerificationKey GenesisDelegateKey]
Expand Down Expand Up @@ -711,17 +711,17 @@ runGenesisCreateStakedCmd
, " delegation map entries, "
]
++ [ mconcat
[ ", "
, textShow numBulkPoolCredFiles
, " bulk pool credential files, "
, textShow numBulkPoolsPerFile
, " pools per bulk credential file, indices starting from "
, textShow bulkOffset
, ", "
, textShow $ length bulkIndices
, " total pools in bulk nodes, each bulk node having this many entries: "
, textShow $ length <$> bulkSlices
]
[ ", "
, textShow numBulkPoolCredFiles
, " bulk pool credential files, "
, textShow numBulkPoolsPerFile
, " pools per bulk credential file, indices starting from "
, textShow bulkOffset
, ", "
, textShow $ length bulkIndices
, " total pools in bulk nodes, each bulk node having this many entries: "
, textShow $ length <$> bulkSlices
]
| numBulkPoolCredFiles * numBulkPoolsPerFile > 0
]
where
Expand Down Expand Up @@ -983,9 +983,9 @@ writeBulkPoolCredentials dir bulkIx poolIxs = do
readPoolCreds
:: Word
-> ExceptT
GenesisCmdError
IO
(TextEnvelope, TextEnvelope, TextEnvelope)
GenesisCmdError
IO
(TextEnvelope, TextEnvelope, TextEnvelope)
readPoolCreds ix = do
(,,)
<$> readEnvelope poolOpCert
Expand Down Expand Up @@ -1158,25 +1158,25 @@ readGenDelegsMap
:: FilePath
-> FilePath
-> ExceptT
GenesisCmdError
IO
( Map
(Hash GenesisKey)
(Hash GenesisDelegateKey, Hash VrfKey)
)
GenesisCmdError
IO
( Map
(Hash GenesisKey)
(Hash GenesisDelegateKey, Hash VrfKey)
)
readGenDelegsMap gendir deldir = do
gkm <- readGenesisKeys gendir
dkm <- readDelegateKeys deldir
vkm <- readDelegateVrfKeys deldir

let combinedMap
:: Map
Int
( VerificationKey GenesisKey
, ( VerificationKey GenesisDelegateKey
, VerificationKey VrfKey
)
)
Int
( VerificationKey GenesisKey
, ( VerificationKey GenesisDelegateKey
, VerificationKey VrfKey
)
)
combinedMap =
Map.intersectionWith
(,)
Expand All @@ -1200,8 +1200,8 @@ readGenDelegsMap gendir deldir = do

let delegsMap
:: Map
(Hash GenesisKey)
(Hash GenesisDelegateKey, Hash VrfKey)
(Hash GenesisKey)
(Hash GenesisDelegateKey, Hash VrfKey)
delegsMap =
fromList
[ (gh, (dh, vh))
Expand All @@ -1216,9 +1216,9 @@ readGenDelegsMap gendir deldir = do
readGenesisKeys
:: FilePath
-> ExceptT
GenesisCmdError
IO
(Map Int (VerificationKey GenesisKey))
GenesisCmdError
IO
(Map Int (VerificationKey GenesisKey))
readGenesisKeys gendir = do
files <- liftIO (listDirectory gendir)
fileIxs <-
Expand All @@ -1241,9 +1241,9 @@ readGenesisKeys gendir = do
readDelegateKeys
:: FilePath
-> ExceptT
GenesisCmdError
IO
(Map Int (VerificationKey GenesisDelegateKey))
GenesisCmdError
IO
(Map Int (VerificationKey GenesisDelegateKey))
readDelegateKeys deldir = do
files <- liftIO (listDirectory deldir)
fileIxs <-
Expand All @@ -1266,9 +1266,9 @@ readDelegateKeys deldir = do
readDelegateVrfKeys
:: FilePath
-> ExceptT
GenesisCmdError
IO
(Map Int (VerificationKey VrfKey))
GenesisCmdError
IO
(Map Int (VerificationKey VrfKey))
readDelegateVrfKeys deldir = do
files <- liftIO (listDirectory deldir)
fileIxs <-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE NumericUnderscores #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeApplications #-}
Expand Down Expand Up @@ -645,11 +644,11 @@ createGenesisKeys dir = do
createStakeDelegatorCredentials
:: FilePath
-> ExceptT
GenesisCmdError
IO
( VerificationKey PaymentKey
, VerificationKey StakeKey
)
GenesisCmdError
IO
( VerificationKey PaymentKey
, VerificationKey StakeKey
)
createStakeDelegatorCredentials dir = do
liftIO $ createDirectoryIfMissing True dir
(pvk, _psk) <-
Expand Down Expand Up @@ -901,25 +900,25 @@ readGenDelegsMap
-> Map Int FilePath
-> Map Int FilePath
-> ExceptT
GenesisCmdError
IO
( Map
(Hash GenesisKey)
(Hash GenesisDelegateKey, Hash VrfKey)
)
GenesisCmdError
IO
( Map
(Hash GenesisKey)
(Hash GenesisDelegateKey, Hash VrfKey)
)
readGenDelegsMap genesisKeys delegateKeys delegateVrfKeys = do
gkm <- readKeys (AsVerificationKey AsGenesisKey) genesisKeys
dkm <- readKeys (AsVerificationKey AsGenesisDelegateKey) delegateKeys
vkm <- readKeys (AsVerificationKey AsVrfKey) delegateVrfKeys

let combinedMap
:: Map
Int
( VerificationKey GenesisKey
, ( VerificationKey GenesisDelegateKey
, VerificationKey VrfKey
)
)
Int
( VerificationKey GenesisKey
, ( VerificationKey GenesisDelegateKey
, VerificationKey VrfKey
)
)
combinedMap =
Map.intersectionWith
(,)
Expand All @@ -939,8 +938,8 @@ readGenDelegsMap genesisKeys delegateKeys delegateVrfKeys = do

let delegsMap
:: Map
(Hash GenesisKey)
(Hash GenesisDelegateKey, Hash VrfKey)
(Hash GenesisKey)
(Hash GenesisDelegateKey, Hash VrfKey)
delegsMap =
fromList
[ (gh, (dh, vh))
Expand Down
22 changes: 11 additions & 11 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1671,8 +1671,8 @@ runQuerySPOStakeDistribution

let addressesAndRewards
:: Map
StakeAddress
(L.KeyHash L.StakePool StandardCrypto) =
StakeAddress
(L.KeyHash L.StakePool StandardCrypto) =
Map.fromList
[ ( makeStakeAddress networkId . fromShelleyStakeCredential . L.raCredential . L.ppRewardAccount $ addr
, keyHash
Expand Down Expand Up @@ -1792,15 +1792,15 @@ runQuery
:: LocalNodeConnectInfo
-> Consensus.Target ChainPoint
-> LocalStateQueryExpr
BlockInMode
ChainPoint
QueryInMode
()
IO
( Either
UnsupportedNtcVersionError
(Either Consensus.EraMismatch a)
)
BlockInMode
ChainPoint
QueryInMode
()
IO
( Either
UnsupportedNtcVersionError
(Either Consensus.EraMismatch a)
)
-> ExceptT QueryCmdError IO a
runQuery localNodeConnInfo target query =
firstExceptT
Expand Down
20 changes: 10 additions & 10 deletions cardano-cli/src/Cardano/CLI/Run/Node.hs
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,11 @@ runNodeIssueOpCertCmd

textEnvPossibleBlockIssuers
:: [ FromSomeType
HasTextEnvelope
( Either
(SigningKey StakePoolKey)
(SigningKey GenesisDelegateExtendedKey)
)
HasTextEnvelope
( Either
(SigningKey StakePoolKey)
(SigningKey GenesisDelegateExtendedKey)
)
]
textEnvPossibleBlockIssuers =
[ FromSomeType (AsSigningKey AsStakePoolKey) Left
Expand All @@ -296,11 +296,11 @@ runNodeIssueOpCertCmd

bech32PossibleBlockIssuers
:: [ FromSomeType
SerialiseAsBech32
( Either
(SigningKey StakePoolKey)
(SigningKey GenesisDelegateExtendedKey)
)
SerialiseAsBech32
( Either
(SigningKey StakePoolKey)
(SigningKey GenesisDelegateExtendedKey)
)
]
bech32PossibleBlockIssuers =
[FromSomeType (AsSigningKey AsStakePoolKey) Left]
Expand Down
8 changes: 4 additions & 4 deletions cardano-cli/src/Cardano/CLI/Types/Errors/TxValidationError.hs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ validateTxCurrentTreasuryValue
=> ShelleyBasedEra era
-> Maybe TxCurrentTreasuryValue
-> Either
(TxNotSupportedInEraValidationError era)
(Maybe (Featured ConwayEraOnwards era (Maybe Lovelace)))
(TxNotSupportedInEraValidationError era)
(Maybe (Featured ConwayEraOnwards era (Maybe Lovelace)))
validateTxCurrentTreasuryValue sbe mCurrentTreasuryValue =
case mCurrentTreasuryValue of
Nothing -> Right Nothing
Expand Down Expand Up @@ -195,8 +195,8 @@ validateUpdateProposalFile
:: CardanoEra era
-> Maybe UpdateProposalFile
-> Either
(TxNotSupportedInEraValidationError era)
(Maybe (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile)))
(TxNotSupportedInEraValidationError era)
(Maybe (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile)))
validateUpdateProposalFile era = \case
Nothing -> pure Nothing
Just updateProposal -> do
Expand Down
4 changes: 2 additions & 2 deletions cardano-cli/src/Cardano/CLI/Types/Output.hs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ instance ToJSON QueryDRepStateOutput where
, "deposit" .= deposit
]
<> ( case includeStake of
WithStake -> ["stake" .= stake]
NoStake -> []
WithStake -> ["stake" .= stake]
NoStake -> []
)
)

Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2427f53

Please sign in to comment.