Skip to content

Commit

Permalink
Update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
palas committed Feb 23, 2024
1 parent 72b17e5 commit d77d91c
Show file tree
Hide file tree
Showing 76 changed files with 40 additions and 178 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2024-02-23"
CABAL_CACHE_VERSION: "2024-02-23-3"

concurrency:
group: >
Expand Down
2 changes: 0 additions & 2 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ library cardano-cli-test-lib
, hedgehog-extras ^>= 0.6.1.0
, process
, text
, transformers

test-suite cardano-cli-test
import: project-config
Expand All @@ -296,7 +295,6 @@ test-suite cardano-cli-test
, tasty-hedgehog
, text
, time
, transformers

build-tool-depends: tasty-discover:tasty-discover

Expand Down
4 changes: 0 additions & 4 deletions cardano-cli/src/Cardano/CLI/Byron/Delegation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ where

import Cardano.Api.Byron
import qualified Cardano.Api.Ledger as L
import Cardano.Api.Pretty

import qualified Cardano.Chain.Delegation as Dlg
import Cardano.Chain.Slotting (EpochNumber)
Expand All @@ -29,9 +28,6 @@ import Prelude hiding ((.))

import Control.Category
import Control.Monad (unless)
import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (left)
import Data.ByteString (ByteString)
import qualified Data.ByteString.Lazy as LB
import Data.Text (Text)
Expand Down
3 changes: 1 addition & 2 deletions cardano-cli/src/Cardano/CLI/Byron/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ where
import Cardano.Api (Key (..), NetworkId, writeSecrets)
import Cardano.Api.Byron (ByronKey, SerialiseAsRawBytes (..), SigningKey (..),
toByronRequiresNetworkMagic)
import Cardano.Api.Pretty
import Cardano.CLI.Pretty

import qualified Cardano.Chain.Common as Common
import Cardano.Chain.Delegation hiding (Map, epoch)
Expand All @@ -28,7 +28,6 @@ import Cardano.CLI.Types.Common (GenesisFile (..))
import qualified Cardano.Crypto as Crypto
import Cardano.Prelude (canonicalDecodePretty, canonicalEncodePretty)

import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans (MonadTrans (..))
import Control.Monad.Trans.Except (ExceptT (..), withExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, left, right)
Expand Down
4 changes: 0 additions & 4 deletions cardano-cli/src/Cardano/CLI/Byron/Key.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ module Cardano.CLI.Byron.Key
where

import Cardano.Api.Byron
import Cardano.Api.Pretty

import qualified Cardano.Chain.Common as Common
import Cardano.CLI.Types.Common
import qualified Cardano.Crypto.Signing as Crypto

import Control.Exception (Exception (..))
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, handleIOExceptT, hoistEither, left,
right)
import qualified Data.ByteString as SB
import qualified Data.ByteString.UTF8 as UTF8
import Data.String (IsString, fromString)
Expand Down
1 change: 0 additions & 1 deletion cardano-cli/src/Cardano/CLI/Byron/Parsers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import Cardano.Api hiding (GenesisParameters, UpdateProposal)
import Cardano.Api.Byron (Address (..), ByronProtocolParametersUpdate (..),
toByronLovelace)
import qualified Cardano.Api.Ledger as L
import Cardano.Api.Pretty
import Cardano.Api.Shelley (ReferenceScript (ReferenceScriptNone))

import Cardano.Chain.Common (BlockCount (..), TxFeePolicy (..), TxSizeLinear (..),
Expand Down
4 changes: 0 additions & 4 deletions cardano-cli/src/Cardano/CLI/Byron/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@ import Cardano.CLI.Types.Common
import qualified Cardano.Crypto.Hashing as Crypto
import qualified Cardano.Crypto.Signing as Crypto

import Control.Monad.IO.Class (MonadIO (liftIO))
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, hoistEither, left)
import Data.Bifunctor (Bifunctor (..))
import qualified Data.ByteString.Char8 as BS
import Data.Text (Text)
import qualified Data.Text.IO as Text
import qualified Data.Text.Lazy.Builder as Builder
import qualified Data.Text.Lazy.IO as TL
import qualified Formatting as F
import Prettyprinter

-- | Data type that encompasses all the possible errors of the
-- Byron client.
Expand Down
4 changes: 0 additions & 4 deletions cardano-cli/src/Cardano/CLI/Byron/Tx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ where
import Cardano.Api
import Cardano.Api.Byron
import qualified Cardano.Api.Ledger as L
import Cardano.Api.Pretty

import qualified Cardano.Binary as Binary
import qualified Cardano.Chain.Common as Common
Expand All @@ -42,9 +41,6 @@ import qualified Ouroboros.Consensus.Byron.Ledger as Byron
import Ouroboros.Consensus.Cardano.Block (EraMismatch (..))
import qualified Ouroboros.Network.Protocol.LocalTxSubmission.Client as Net.Tx

import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (left)
import Data.Bifunctor (Bifunctor (..))
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Byron/UpdateProposal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module Cardano.CLI.Byron.UpdateProposal
import Cardano.Api (NetworkId, SerialiseAsRawBytes (..), SocketPath)
import Cardano.Api.Byron (AsType (AsByronUpdateProposal), ByronProtocolParametersUpdate,
ByronUpdateProposal, makeByronUpdateProposal, toByronLedgerUpdateProposal)
import Cardano.Api.Pretty
import Cardano.CLI.Pretty

import Cardano.Chain.Update (InstallerHash (..), ProtocolVersion (..),
SoftwareVersion (..), SystemTag (..))
Expand Down
4 changes: 0 additions & 4 deletions cardano-cli/src/Cardano/CLI/Byron/Vote.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module Cardano.CLI.Byron.Vote
) where

import Cardano.Api.Byron
import Cardano.Api.Pretty

import qualified Cardano.Binary as Binary
import Cardano.CLI.Byron.Genesis (ByronGenesisError)
Expand All @@ -24,9 +23,6 @@ import Cardano.CLI.Types.Common
import Ouroboros.Consensus.Ledger.SupportsMempool (txId)
import Ouroboros.Consensus.Util.Condense (condense)

import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, hoistEither)
import Control.Tracer (stdoutTracer, traceWith)
import Data.Bifunctor (first)
import qualified Data.ByteString as BS
Expand Down
1 change: 0 additions & 1 deletion cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module Cardano.CLI.EraBased.Options.Common where

import Cardano.Api
import qualified Cardano.Api.Ledger as L
import Cardano.Api.Pretty
import Cardano.Api.Shelley

import Cardano.CLI.Environment (EnvCli (..), envCliAnyShelleyBasedEra,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import Data.Foldable
import Options.Applicative hiding (help, str)
import qualified Options.Applicative as Opt
import qualified Options.Applicative.Help as H
import Prettyprinter (line, pretty)
import Prettyprinter (line)

{- HLINT ignore "Use <$>" -}
{- HLINT ignore "Move brackets to avoid $" -}
Expand Down
2 changes: 0 additions & 2 deletions cardano-cli/src/Cardano/CLI/EraBased/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import Cardano.CLI.EraBased.Run.TextView
import Cardano.CLI.EraBased.Run.Transaction
import Cardano.CLI.Types.Errors.CmdError

import Control.Monad.Trans.Except
import Control.Monad.Trans.Except.Extra (firstExceptT)
import Data.Function ((&))

runAnyEraCommand :: ()
Expand Down
3 changes: 0 additions & 3 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Address.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ import Cardano.CLI.Types.Key (PaymentVerifier (..), StakeIdentifier (.
StakeVerifier (..), VerificationKeyTextOrFile, generateKeyPair,
readVerificationKeyOrFile, readVerificationKeyTextOrFileAnyOf)

import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, left, newExceptT)
import qualified Data.ByteString.Char8 as BS
import Data.Function
import qualified Data.Text.IO as Text
Expand Down
3 changes: 0 additions & 3 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Address/Info.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ import Cardano.Api

import Cardano.CLI.Types.Errors.AddressInfoError

import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (left)
import Data.Aeson (ToJSON (..), object, (.=))
import Data.Aeson.Encode.Pretty (encodePretty)
import qualified Data.ByteString.Lazy.Char8 as LBS
Expand Down
5 changes: 0 additions & 5 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/CreateTestnetData.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ import Ouroboros.Consensus.Shelley.Node (ShelleyGenesisStaking (..))

import Control.DeepSeq (NFData, force)
import Control.Monad (forM, forM_, unless, void, when, zipWithM)
import Control.Monad.Except (MonadError (..), runExceptT)
import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, handleIOExceptT, hoistEither,
newExceptT)
import qualified Data.Aeson as Aeson
import Data.Bifunctor (Bifunctor (..))
import qualified Data.Binary.Get as Bin
Expand Down
5 changes: 0 additions & 5 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ import Ouroboros.Consensus.Shelley.Node (ShelleyGenesisStaking (..))

import Control.DeepSeq (NFData, force)
import Control.Monad (forM, forM_, unless, when)
import Control.Monad.Except (MonadError (..))
import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans.Except (ExceptT, throwE, withExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, handleIOExceptT, hoistEither, left,
newExceptT)
import Data.Aeson hiding (Key)
import qualified Data.Aeson as Aeson
import Data.Aeson.Encode.Pretty (encodePretty)
Expand Down
2 changes: 0 additions & 2 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Governance.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ import Cardano.CLI.Types.Errors.CmdError
import Cardano.CLI.Types.Errors.GovernanceCmdError

import Control.Monad
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra
import Data.Function
import qualified Data.Map.Strict as Map

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ import Cardano.CLI.Types.Errors.GovernanceActionsError
import Cardano.CLI.Types.Key

import Control.Monad
import Control.Monad.Except (ExceptT)
import Control.Monad.Trans (MonadTrans (..))
import Control.Monad.Trans.Except.Extra
import Data.Function
import qualified Data.Map.Strict as Map

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ import Cardano.CLI.Types.Errors.GovernanceCommitteeError
import Cardano.CLI.Types.Key
import Cardano.CLI.Types.Key.VerificationKey

import Control.Monad.Except (ExceptT)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans (lift)
import Control.Monad.Trans.Except.Extra
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as BS
import Data.Function
Expand Down
4 changes: 0 additions & 4 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ import Cardano.CLI.Types.Errors.GovernanceCmdError
import Cardano.CLI.Types.Errors.RegistrationError
import Cardano.CLI.Types.Key

import Control.Monad.IO.Class
import Control.Monad.Trans.Class
import Control.Monad.Trans.Except
import Control.Monad.Trans.Except.Extra
import Data.Function
import qualified Data.Text.Encoding as Text

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import Cardano.Api.Shelley
import Cardano.CLI.Types.Errors.GovernanceCmdError
import Cardano.CLI.Types.Key

import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra

runGovernanceGenesisKeyDelegationCertificate
:: ShelleyToBabbageEra era
-> VerificationKeyOrHashOrFile GenesisKey
Expand Down
2 changes: 0 additions & 2 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Hash.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import Cardano.CLI.Types.Errors.GovernanceCmdError
import Cardano.CLI.Types.Errors.GovernanceHashError
import Cardano.Crypto.Hash (hashToTextAsHex)

import Control.Monad.Trans.Except
import Control.Monad.Trans.Except.Extra
import qualified Data.ByteString as BS
import Data.Function
import qualified Data.Text.Encoding as Text
Expand Down
4 changes: 0 additions & 4 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Poll.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ import Cardano.CLI.Read
import Cardano.CLI.Types.Errors.GovernanceCmdError

import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra
import qualified Data.ByteString.Char8 as BSC
import Data.Function ((&))
import Data.String (fromString)
Expand Down
2 changes: 0 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 @@ -22,8 +22,6 @@ import Cardano.CLI.Types.Errors.GovernanceVoteCmdError
import Cardano.CLI.Types.Governance
import Cardano.CLI.Types.Key

import Control.Monad.Trans.Except
import Control.Monad.Trans.Except.Extra
import Data.Aeson.Encode.Pretty
import Data.Function
import qualified Data.Yaml.Pretty as Yaml
Expand Down
3 changes: 0 additions & 3 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Key.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ import qualified Cardano.Crypto.Wallet as Crypto

import qualified Codec.Binary.Bech32 as Bech32
import qualified Control.Exception as Exception
import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, hoistEither, left, newExceptT)
import Data.Bifunctor (Bifunctor (..))
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
Expand Down
3 changes: 0 additions & 3 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Node.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ import Cardano.CLI.Types.Common
import Cardano.CLI.Types.Errors.NodeCmdError
import Cardano.CLI.Types.Key

import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, hoistEither, newExceptT)
import qualified Data.ByteString.Char8 as BS
import Data.String (fromString)
import Data.Word (Word64)
Expand Down
6 changes: 0 additions & 6 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import Cardano.Api hiding (QueryInShelleyBasedEra (..))
import qualified Cardano.Api as Api
import Cardano.Api.Byron hiding (QueryInShelleyBasedEra (..))
import qualified Cardano.Api.Ledger as L
import Cardano.Api.Pretty
import Cardano.Api.Shelley hiding (QueryInShelleyBasedEra (..))

import qualified Cardano.CLI.EraBased.Commands.Query as Cmd
Expand All @@ -68,11 +67,6 @@ import Ouroboros.Network.Block (Serialised (..))
import qualified Ouroboros.Network.Protocol.LocalStateQuery.Type as Consensus

import Control.Monad (forM, forM_, join)
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.IO.Unlift (MonadIO (..))
import Control.Monad.Trans.Class
import Control.Monad.Trans.Except
import Control.Monad.Trans.Except.Extra
import Data.Aeson as Aeson
import qualified Data.Aeson as A
import Data.Aeson.Encode.Pretty (encodePretty)
Expand Down
5 changes: 0 additions & 5 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/StakeAddress.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ import Cardano.CLI.Types.Errors.StakeAddressRegistrationError
import Cardano.CLI.Types.Governance
import Cardano.CLI.Types.Key

import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans (lift)
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, hoistEither, left, newExceptT,
onLeft)
import qualified Data.ByteString.Char8 as BS
import Data.Function ((&))
import qualified Data.Text.IO as Text
Expand Down
5 changes: 0 additions & 5 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/StakePool.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ import Cardano.CLI.Types.Common
import Cardano.CLI.Types.Errors.StakePoolCmdError
import Cardano.CLI.Types.Key (readVerificationKeyOrFile)

import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans (lift)
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, handleIOExceptT, hoistEither, left,
newExceptT, onLeft)
import qualified Data.ByteString.Char8 as BS
import Data.Function ((&))

Expand Down
3 changes: 0 additions & 3 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/TextView.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ import Cardano.CLI.EraBased.Commands.TextView
import Cardano.CLI.Helpers (pPrintCBOR)
import Cardano.CLI.Types.Errors.TextViewFileError

import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, newExceptT)
import qualified Data.ByteString.Lazy.Char8 as LBS

runTextViewCmds :: TextViewCmds era -> ExceptT TextViewFileError IO ()
Expand Down
5 changes: 0 additions & 5 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ import qualified Ouroboros.Network.Protocol.LocalStateQuery.Type as Consensus
import qualified Ouroboros.Network.Protocol.LocalTxSubmission.Client as Net.Tx

import Control.Monad (forM)
import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans (MonadTrans (..))
import Control.Monad.Trans.Except
import Control.Monad.Trans.Except.Extra (firstExceptT, hoistEither, hoistMaybe, left,
newExceptT, onLeft, onNothing)
import Data.Aeson.Encode.Pretty (encodePretty)
import Data.Bifunctor (Bifunctor (..))
import qualified Data.ByteString.Char8 as BS
Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Helpers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module Cardano.CLI.Helpers
) where

import qualified Cardano.Api.Ledger as L
import Cardano.Api.Pretty
import Cardano.CLI.Pretty (Doc, pretty, pshow)

import Cardano.Chain.Block (decCBORABlockOrBoundary)
import qualified Cardano.Chain.Delegation as Delegation
Expand Down
Loading

0 comments on commit d77d91c

Please sign in to comment.