Skip to content

Commit

Permalink
Apply hlint hints
Browse files Browse the repository at this point in the history
  • Loading branch information
palas committed Jul 15, 2024
1 parent 9d1fd09 commit b65ce64
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
9 changes: 5 additions & 4 deletions cardano-cli/src/Cardano/CLI/Byron/Parsers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,11 @@ parseUpdateProposalTTL =

parseSoftforkRule :: Parser SoftforkRule
parseSoftforkRule =
SoftforkRule
<$> ( rationalToLovelacePortion
<$> parseFraction "softfork-init-thd" "Propose initial threshold (right after proposal is confirmed)."
)
( SoftforkRule . rationalToLovelacePortion
<$> parseFraction
"softfork-init-thd"
"Propose initial threshold (right after proposal is confirmed)."
)
<*> ( rationalToLovelacePortion
<$> parseFraction "softfork-min-thd" "Propose minimum threshold (threshold can't be less than this)."
)
Expand Down
10 changes: 5 additions & 5 deletions cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1384,11 +1384,12 @@ pProposalFile balExUnits =

pCurrentTreasuryValueAndDonation
:: ShelleyBasedEra era -> Parser (Maybe (TxCurrentTreasuryValue, TxTreasuryDonation))
pCurrentTreasuryValueAndDonation sbe =
pCurrentTreasuryValueAndDonation =
caseShelleyToBabbageOrConwayEraOnwards
(const $ pure Nothing)
(const $ optional ((,) <$> pCurrentTreasuryValue' <*> pTreasuryDonation'))
sbe
( const $
optional ((,) <$> pCurrentTreasuryValue' <*> pTreasuryDonation')
)

pCurrentTreasuryValue' :: Parser TxCurrentTreasuryValue
pCurrentTreasuryValue' =
Expand Down Expand Up @@ -3608,8 +3609,7 @@ pAlwaysAbstain =

pVoteAnchor :: Parser (VoteUrl, L.SafeHash L.StandardCrypto L.AnchorData)
pVoteAnchor =
(,)
<$> (VoteUrl <$> pUrl "anchor-url" "Vote anchor URL")
((,) . VoteUrl <$> pUrl "anchor-url" "Vote anchor URL")
<*> pVoteAnchorDataHash

pVoteAnchorDataHash :: Parser (L.SafeHash L.StandardCrypto L.AnchorData)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}

module Cardano.CLI.Types.Errors.TxValidationError
( TxAuxScriptsValidationError (..)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}

{- HLINT ignore "Use camelCase" -}

Expand Down
4 changes: 1 addition & 3 deletions cardano-cli/test/cardano-cli-test/Test/Cli/JSON.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE NumericUnderscores #-}
{-# LANGUAGE OverloadedStrings #-}

module Test.Cli.JSON
( hprop_json_roundtrip_delegations_and_rewards
Expand Down Expand Up @@ -44,8 +43,7 @@ genDelegationsAndRewards = do

genOpCertIntervalInformation :: Gen OpCertIntervalInformation
genOpCertIntervalInformation = do
createOpCertIntervalInfo
<$> (CurrentKesPeriod <$> genWord64)
(createOpCertIntervalInfo . CurrentKesPeriod <$> genWord64)
<*> (OpCertStartingKesPeriod <$> genWord64)
<*> (OpCertEndingKesPeriod <$> genWord64)
<*> Gen.maybe (SlotsTillKesKeyExpiry <$> genSlotNo)
Expand Down

0 comments on commit b65ce64

Please sign in to comment.