diff --git a/cardano-api/internal/Cardano/Api/Error.hs b/cardano-api/internal/Cardano/Api/Error.hs index 75063a5f4f..c153a675df 100644 --- a/cardano-api/internal/Cardano/Api/Error.hs +++ b/cardano-api/internal/Cardano/Api/Error.hs @@ -13,13 +13,12 @@ module Cardano.Api.Error ) where import Control.Exception (Exception (..), IOException, throwIO) +import Control.Monad.Except (throwError) +import Control.Monad.IO.Class (MonadIO) +import Control.Monad.Trans.Except (ExceptT) +import Control.Monad.Trans.Except.Extra (handleIOExceptT) +import System.Directory (doesFileExist) import System.IO (Handle) -import Control.Monad.Trans.Except (ExceptT) -import Control.Monad.Trans.Except.Extra (handleIOExceptT) -import Control.Monad.IO.Class (MonadIO) -import System.Directory (doesFileExist) -import Control.Monad.Except (throwError) - class Show e => Error e where diff --git a/cardano-api/internal/Cardano/Api/Keys/Read.hs b/cardano-api/internal/Cardano/Api/Keys/Read.hs index 7dc0bc245c..8b3728b7e9 100644 --- a/cardano-api/internal/Cardano/Api/Keys/Read.hs +++ b/cardano-api/internal/Cardano/Api/Keys/Read.hs @@ -18,9 +18,9 @@ import Cardano.Api.SerialiseBech32 import Cardano.Api.SerialiseTextEnvelope import Cardano.Api.Utils +import Control.Monad.Except (runExceptT) import Data.Bifunctor import Data.List.NonEmpty (NonEmpty) -import Control.Monad.Except (runExceptT) -- | Read a cryptographic key from a file. -- diff --git a/cardano-api/internal/Cardano/Api/Protocol.hs b/cardano-api/internal/Cardano/Api/Protocol.hs index 6bff874831..7d08e30712 100644 --- a/cardano-api/internal/Cardano/Api/Protocol.hs +++ b/cardano-api/internal/Cardano/Api/Protocol.hs @@ -20,8 +20,6 @@ module Cardano.Api.Protocol import Cardano.Api.Modes -import Data.Bifunctor (bimap) - import Ouroboros.Consensus.Block.Forging (BlockForging) import Ouroboros.Consensus.Cardano import Ouroboros.Consensus.Cardano.Block @@ -39,6 +37,8 @@ import Ouroboros.Consensus.Shelley.Node.Praos import Ouroboros.Consensus.Shelley.ShelleyHFC (ShelleyBlockHFC) import Ouroboros.Consensus.Util.IOLike (IOLike) +import Data.Bifunctor (bimap) + import Type.Reflection ((:~:) (..)) class (RunNode blk, IOLike m) => Protocol m blk where diff --git a/cardano-api/internal/Cardano/Api/SerialiseLedgerCddl.hs b/cardano-api/internal/Cardano/Api/SerialiseLedgerCddl.hs index 2d062e49eb..841bf200ca 100644 --- a/cardano-api/internal/Cardano/Api/SerialiseLedgerCddl.hs +++ b/cardano-api/internal/Cardano/Api/SerialiseLedgerCddl.hs @@ -41,8 +41,8 @@ import Cardano.Api.Utils import Cardano.Ledger.Binary (DecoderError) import qualified Cardano.Ledger.Binary as CBOR -import Control.Monad.Trans.Except.Extra (firstExceptT, hoistEither, - newExceptT, runExceptT) +import Control.Monad.Trans.Except.Extra (firstExceptT, hoistEither, newExceptT, + runExceptT) import Data.Aeson import qualified Data.Aeson as Aeson import Data.Aeson.Encode.Pretty (Config (..), defConfig, encodePretty', keyOrder)