diff --git a/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs b/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs index 5c32434b68a..0063911c66a 100644 --- a/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs +++ b/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs @@ -1,5 +1,4 @@ {-# LANGUAGE GADTs #-} -{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} @@ -120,8 +119,8 @@ import Cardano.Api hiding (txIns) import qualified Cardano.Api as Api import Cardano.Api.Byron (KeyWitness (ByronKeyWitness), WitnessNetworkIdOrByronAddress (..)) -import Cardano.Api.Shelley (Hash (..), KESPeriod (KESPeriod), - GovernancePoll (..), GovernancePollAnswer (..), GovernancePollWitness (..), +import Cardano.Api.Shelley (GovernancePoll (..), GovernancePollAnswer (..), + GovernancePollWitness (..), Hash (..), KESPeriod (KESPeriod), OperationalCertificateIssueCounter (OperationalCertificateIssueCounter), PlutusScript (PlutusScriptSerialised), ProtocolParameters (ProtocolParameters), ReferenceScript (..), ReferenceTxInsScriptsInlineDatumsSupportedInEra (..), @@ -157,8 +156,8 @@ import qualified Hedgehog.Range as Range import qualified Cardano.Crypto.Hash.Class as CRYPTO import Cardano.Ledger.Alonzo.Language (Language (..)) import qualified Cardano.Ledger.Alonzo.Scripts as Alonzo +import Cardano.Ledger.Keys (VKey (..)) import Cardano.Ledger.SafeHash (unsafeMakeSafeHash) -import Cardano.Ledger.Keys (VKey(..)) import Test.Cardano.Chain.UTxO.Gen (genVKWitness) import Test.Cardano.Crypto.Gen (genProtocolMagicId) diff --git a/cardano-api/test/Test/Cardano/Api/Typed/CBOR.hs b/cardano-api/test/Test/Cardano/Api/Typed/CBOR.hs index 7182f733dfe..4a08c3568fb 100644 --- a/cardano-api/test/Test/Cardano/Api/Typed/CBOR.hs +++ b/cardano-api/test/Test/Cardano/Api/Typed/CBOR.hs @@ -10,12 +10,13 @@ import Cardano.Api import Cardano.Api.Shelley (AsType (..)) import Data.Proxy (Proxy (..)) -import Hedgehog (Property, forAll, tripping) +import Hedgehog (Property, forAll, property, tripping) import qualified Hedgehog as H import qualified Hedgehog.Gen as Gen import Test.Cardano.Api.Typed.Orphans () import Test.Gen.Cardano.Api.Typed import qualified Test.Hedgehog.Roundtrip.CBOR as H +import Test.Hedgehog.Roundtrip.CBOR import Test.Tasty (TestTree, testGroup) import Test.Tasty.Hedgehog (testPropertyNamed) @@ -176,16 +177,16 @@ prop_roundtrip_TxWitness_Cddl = H.property $ do tripping x (serialiseWitnessLedgerCddl sbe) (deserialiseWitnessLedgerCddl sbe) prop_roundtrip_GovernancePoll_CBOR :: Property -prop_roundtrip_GovernancePoll_CBOR = - roundtrip_CBOR AsGovernancePoll genGovernancePoll +prop_roundtrip_GovernancePoll_CBOR = property $ do + trippingCbor AsGovernancePoll =<< forAll genGovernancePoll prop_roundtrip_GovernancePollAnswer_CBOR :: Property -prop_roundtrip_GovernancePollAnswer_CBOR = - roundtrip_CBOR AsGovernancePollAnswer genGovernancePollAnswer +prop_roundtrip_GovernancePollAnswer_CBOR = property $ do + trippingCbor AsGovernancePollAnswer =<< forAll genGovernancePollAnswer prop_roundtrip_GovernancePollWitness_CBOR :: Property -prop_roundtrip_GovernancePollWitness_CBOR = - roundtrip_CBOR AsGovernancePollWitness genGovernancePollWitness +prop_roundtrip_GovernancePollWitness_CBOR = property $ do + trippingCbor AsGovernancePollWitness =<< forAll genGovernancePollWitness -- ----------------------------------------------------------------------------- diff --git a/cardano-cli/src/Cardano/CLI/Shelley/Run/Governance.hs b/cardano-cli/src/Cardano/CLI/Shelley/Run/Governance.hs index 533f9afceba..90646559165 100644 --- a/cardano-cli/src/Cardano/CLI/Shelley/Run/Governance.hs +++ b/cardano-cli/src/Cardano/CLI/Shelley/Run/Governance.hs @@ -16,7 +16,6 @@ import Data.Aeson (eitherDecode) import qualified Data.ByteString.Char8 as BSC import qualified Data.ByteString.Lazy as LB import Data.Function ((&)) -import qualified Data.List as List import Data.String (fromString) import Data.Text (Text) import qualified Data.Text as Text @@ -38,7 +37,6 @@ import Cardano.CLI.Shelley.Run.Read (MetadataError, readFileTxMetadata import Cardano.CLI.Types import Cardano.Binary (DecoderError) -import Cardano.Ledger.Alonzo.Scripts (CostModels (..)) import Cardano.Ledger.Crypto (StandardCrypto) import Cardano.Ledger.Keys (SignKeyDSIGN, SignKeyVRF) import qualified Cardano.Ledger.Shelley.TxBody as Shelley diff --git a/cardano-node/src/Cardano/Node/Configuration/POM.hs b/cardano-node/src/Cardano/Node/Configuration/POM.hs index e48ecb7636c..b14ea2de645 100644 --- a/cardano-node/src/Cardano/Node/Configuration/POM.hs +++ b/cardano-node/src/Cardano/Node/Configuration/POM.hs @@ -21,11 +21,11 @@ module Cardano.Node.Configuration.POM ) where -import Control.Monad (forM_, when) +import Control.Monad (when) import Data.Aeson import qualified Data.Aeson.Types as Aeson import Data.Bifunctor (Bifunctor (..)) -import Data.Maybe (fromMaybe) +import Data.Maybe import Data.Monoid (Last (..)) import Data.Text (Text) import qualified Data.Text as Text