From a4c222d5214143ff3123329abe964d39202237c0 Mon Sep 17 00:00:00 2001 From: Alexey Kuleshevich Date: Thu, 31 Oct 2024 08:19:13 -0600 Subject: [PATCH 1/4] Update index-state and flake.lock --- cabal.project | 4 ++-- flake.lock | 44 ++++++++++++++++++++++---------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cabal.project b/cabal.project index bf1afab04af..4b86e982c67 100644 --- a/cabal.project +++ b/cabal.project @@ -44,9 +44,9 @@ source-repository-package index-state: -- Bump this if you need newer packages from Hackage - , hackage.haskell.org 2024-08-05T20:07:24Z + , hackage.haskell.org 2024-10-30T00:00:00Z -- Bump this if you need newer packages from CHaP - , cardano-haskell-packages 2024-09-20T19:39:13Z + , cardano-haskell-packages 2024-10-30T11:23:17Z packages: eras/allegra/impl diff --git a/flake.lock b/flake.lock index 4aa6499ca94..38a0878fdf2 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1726886523, - "narHash": "sha256-AEcPggMhxKSPlQPxciYiuJ9RRSqvszaZQQq5JEGICwc=", + "lastModified": 1730295876, + "narHash": "sha256-ijnHTQ6eKIQ9FpEqDKt6c7vuFYN8aOBDhonp67utx2s=", "owner": "intersectmbo", "repo": "cardano-haskell-packages", - "rev": "110f4bd9adf3809fa00af7807fb7f3edbf3d6538", + "rev": "25591f43ab943d5a070db5e8a2b9ff3a499d4d92", "type": "github" }, "original": { @@ -242,11 +242,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1725409900, - "narHash": "sha256-XfSA7YyjHUfuNsCw4cE6p0kQcmrJgQq3nW36Cw/PAv0=", + "lastModified": 1730334523, + "narHash": "sha256-m3YpA8tDs3EA3UZZy8U9hDT4NJuKuwi67qnGAwMBdMw=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "d86e544dec33ce5fb0ad3981be91074d397b700d", + "rev": "49a85d9969134eac18146e75d99e67dc454cfa34", "type": "github" }, "original": { @@ -295,11 +295,11 @@ "stackage": "stackage" }, "locked": { - "lastModified": 1725411053, - "narHash": "sha256-cW999pULNLOZHlV9sqBFIrWTkSxuVAVR6xJR7GndHdQ=", + "lastModified": 1730335868, + "narHash": "sha256-sFhHIYa5HKYf7xOEDaoWu2Epj0q7aDI4MpeMRZ4VdNY=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "63783ecc949e99b2396ca821275cee26385adaba", + "rev": "8bf6f8497657cc9bcadbd0f3ee15ce48c2f907f0", "type": "github" }, "original": { @@ -464,16 +464,16 @@ "hls-2.9": { "flake": false, "locked": { - "lastModified": 1718469202, - "narHash": "sha256-THXSz+iwB1yQQsr/PY151+2GvtoJnTIB2pIQ4OzfjD4=", + "lastModified": 1720003792, + "narHash": "sha256-qnDx8Pk0UxtoPr7BimEsAZh9g2WuTuMB/kGqnmdryKs=", "owner": "haskell", "repo": "haskell-language-server", - "rev": "40891bccb235ebacce020b598b083eab9dda80f1", + "rev": "0c1817cb2babef0765e4e72dd297c013e8e3d12b", "type": "github" }, "original": { "owner": "haskell", - "ref": "2.9.0.0", + "ref": "2.9.0.1", "repo": "haskell-language-server", "type": "github" } @@ -722,11 +722,11 @@ }, "nixpkgs-2405": { "locked": { - "lastModified": 1720122915, - "narHash": "sha256-Nby8WWxj0elBu1xuRaUcRjPi/rU3xVbkAt2kj4QwX2U=", + "lastModified": 1726447378, + "narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "835cf2d3f37989c5db6585a28de967a667a75fb1", + "rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1", "type": "github" }, "original": { @@ -770,11 +770,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1720181791, - "narHash": "sha256-i4vJL12/AdyuQuviMMd1Hk2tsGt02hDNhA0Zj1m16N8=", + "lastModified": 1726583932, + "narHash": "sha256-zACxiQx8knB3F8+Ze+1BpiYrI+CbhxyWpcSID9kVhkQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb", + "rev": "658e7223191d2598641d50ee4e898126768fe847", "type": "github" }, "original": { @@ -906,11 +906,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1725408838, - "narHash": "sha256-tHw95xcMElCqI6xOLmdTAEvQ0/4IS7WBZc+RF7HT/uk=", + "lastModified": 1730333489, + "narHash": "sha256-s3O+Uq7zPI9PcaTWcxPh/7qQGonAaU36aaqXyunygxo=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "2ab3b5a823933ef199a289fbf39bbf0da0023100", + "rev": "613b9cac7af7d1f9f3260f6cb2ddfe2cba823377", "type": "github" }, "original": { From 0ba75b033a649af2e427015da3210404e81caa5b Mon Sep 17 00:00:00 2001 From: Alexey Kuleshevich Date: Wed, 30 Oct 2024 22:31:21 -0600 Subject: [PATCH 2/4] Switch to `data-default-0.8` Remove orphan instance `Default` for `Bool` Starting with `data-default-0.8` the dependency is inverted and `data-default-class-0.2` re-exports `data-default`. Therefore it no longer makes sense to depend on `data-default-class`. Moreover `data-default-0.8` add sa `Default` instance for `Bool`, so we can remove such orpha instance from `cardano-ledger-core` --- eras/allegra/impl/cardano-ledger-allegra.cabal | 2 +- .../impl/test/Test/Cardano/Ledger/Allegra/BinarySpec.hs | 2 +- eras/alonzo/impl/cardano-ledger-alonzo.cabal | 2 +- eras/alonzo/impl/src/Cardano/Ledger/Alonzo/PParams.hs | 2 +- eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Translation.hs | 2 +- .../impl/src/Cardano/Ledger/Alonzo/TxBody/Internal.hs | 2 +- eras/alonzo/test-suite/cardano-ledger-alonzo-test.cabal | 2 +- .../src/Test/Cardano/Ledger/Alonzo/Examples/Consensus.hs | 2 +- eras/babbage/impl/cardano-ledger-babbage.cabal | 2 +- .../impl/test/Test/Cardano/Ledger/Babbage/BinarySpec.hs | 2 +- eras/babbage/test-suite/cardano-ledger-babbage-test.cabal | 2 +- .../src/Test/Cardano/Ledger/Babbage/Examples/Consensus.hs | 2 +- eras/conway/impl/cardano-ledger-conway.cabal | 6 +++--- eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs | 2 +- .../impl/src/Cardano/Ledger/Conway/Governance/DRepPulser.hs | 2 +- .../impl/src/Cardano/Ledger/Conway/Governance/Internal.hs | 2 +- .../impl/src/Cardano/Ledger/Conway/Governance/Procedures.hs | 2 +- .../impl/src/Cardano/Ledger/Conway/Governance/Proposals.hs | 2 +- eras/conway/impl/src/Cardano/Ledger/Conway/PParams.hs | 2 +- .../conway/impl/src/Cardano/Ledger/Conway/Rules/NewEpoch.hs | 2 +- eras/conway/impl/src/Cardano/Ledger/Conway/Translation.hs | 2 +- .../impl/test/Test/Cardano/Ledger/Conway/BinarySpec.hs | 2 +- .../impl/testlib/Test/Cardano/Ledger/Conway/Arbitrary.hs | 2 +- .../impl/testlib/Test/Cardano/Ledger/Conway/Genesis.hs | 2 +- .../testlib/Test/Cardano/Ledger/Conway/Imp/EnactSpec.hs | 2 +- .../testlib/Test/Cardano/Ledger/Conway/Imp/EpochSpec.hs | 2 +- .../impl/testlib/Test/Cardano/Ledger/Conway/Imp/GovSpec.hs | 2 +- .../testlib/Test/Cardano/Ledger/Conway/Imp/LedgerSpec.hs | 2 +- .../testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs | 2 +- .../testlib/Test/Cardano/Ledger/Conway/Imp/UtxosSpec.hs | 2 +- .../impl/testlib/Test/Cardano/Ledger/Conway/ImpTest.hs | 2 +- eras/conway/test-suite/cardano-ledger-conway-test.cabal | 2 +- .../src/Test/Cardano/Ledger/Conway/Examples/Consensus.hs | 2 +- eras/mary/impl/cardano-ledger-mary.cabal | 2 +- eras/mary/impl/test/Test/Cardano/Ledger/Mary/BinarySpec.hs | 2 +- .../test-suite/cardano-ledger-shelley-ma-test.cabal | 2 +- .../test/Test/Cardano/Ledger/Allegra/ScriptTranslation.hs | 2 +- .../test-suite/test/Test/Cardano/Ledger/Mary/Examples.hs | 2 +- eras/shelley/impl/cardano-ledger-shelley.cabal | 4 ++-- .../impl/src/Cardano/Ledger/Shelley/API/ByronTranslation.hs | 2 +- eras/shelley/impl/src/Cardano/Ledger/Shelley/API/Genesis.hs | 2 +- eras/shelley/impl/src/Cardano/Ledger/Shelley/API/Wallet.hs | 2 +- eras/shelley/impl/src/Cardano/Ledger/Shelley/Governance.hs | 2 +- .../src/Cardano/Ledger/Shelley/LedgerState/NewEpochState.hs | 2 +- .../impl/src/Cardano/Ledger/Shelley/LedgerState/Types.hs | 2 +- eras/shelley/impl/src/Cardano/Ledger/Shelley/PoolRank.hs | 2 +- .../impl/src/Cardano/Ledger/Shelley/RewardProvenance.hs | 2 +- .../shelley/impl/src/Cardano/Ledger/Shelley/RewardUpdate.hs | 2 +- eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Epoch.hs | 2 +- .../impl/src/Cardano/Ledger/Shelley/Rules/Ledgers.hs | 2 +- eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Mir.hs | 2 +- .../impl/src/Cardano/Ledger/Shelley/Rules/NewEpoch.hs | 2 +- eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Newpp.hs | 2 +- .../impl/src/Cardano/Ledger/Shelley/Rules/PoolReap.hs | 2 +- eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Upec.hs | 2 +- eras/shelley/impl/src/Cardano/Ledger/Shelley/Transition.hs | 2 +- .../impl/testlib/Test/Cardano/Ledger/Shelley/ImpTest.hs | 2 +- eras/shelley/test-suite/cardano-ledger-shelley-test.cabal | 4 ++-- .../src/Test/Cardano/Ledger/Shelley/BenchmarkFunctions.hs | 2 +- .../src/Test/Cardano/Ledger/Shelley/Examples/Consensus.hs | 2 +- .../src/Test/Cardano/Ledger/Shelley/Generator/EraGen.hs | 2 +- .../src/Test/Cardano/Ledger/Shelley/Rules/Chain.hs | 2 +- .../Test/Cardano/Ledger/Shelley/Examples/Combinators.hs | 2 +- .../test/Test/Cardano/Ledger/Shelley/Examples/EmptyBlock.hs | 2 +- .../Cardano/Ledger/Shelley/Examples/GenesisDelegation.hs | 2 +- .../test/Test/Cardano/Ledger/Shelley/Examples/Init.hs | 2 +- .../test/Test/Cardano/Ledger/Shelley/Examples/NetworkID.hs | 2 +- .../Test/Cardano/Ledger/Shelley/Examples/PoolLifetime.hs | 2 +- .../test/Test/Cardano/Ledger/Shelley/Examples/TwoPools.hs | 2 +- .../test/Test/Cardano/Ledger/Shelley/MultiSigExamples.hs | 2 +- .../test/Test/Cardano/Ledger/Shelley/UnitTests.hs | 2 +- libs/cardano-data/cardano-data.cabal | 2 +- libs/cardano-data/src/Data/OMap/Strict.hs | 2 +- libs/cardano-ledger-api/cardano-ledger-api.cabal | 2 +- .../test/Test/Cardano/Ledger/Api/State/Imp/QuerySpec.hs | 2 +- .../test/Test/Cardano/Ledger/Api/State/QuerySpec.hs | 2 +- .../cardano-ledger-conformance.cabal | 2 +- .../src/Test/Cardano/Ledger/Conformance/Orphans.hs | 2 +- .../Cardano/Ledger/Conformance/SpecTranslate/Conway/Base.hs | 2 +- .../Ledger/Conformance/SpecTranslate/Conway/GovCert.hs | 2 +- libs/cardano-ledger-core/cardano-ledger-core.cabal | 4 ++-- libs/cardano-ledger-core/src/Cardano/Ledger/Address.hs | 2 +- libs/cardano-ledger-core/src/Cardano/Ledger/BaseTypes.hs | 2 +- libs/cardano-ledger-core/src/Cardano/Ledger/CertState.hs | 2 +- libs/cardano-ledger-core/src/Cardano/Ledger/Core/PParams.hs | 2 +- libs/cardano-ledger-core/src/Cardano/Ledger/Credential.hs | 2 +- .../cardano-ledger-core/src/Cardano/Ledger/EpochBoundary.hs | 2 +- .../cardano-ledger-core/src/Cardano/Ledger/Keys/Internal.hs | 2 +- libs/cardano-ledger-core/src/Cardano/Ledger/Orphans.hs | 5 +---- libs/cardano-ledger-core/src/Cardano/Ledger/PoolParams.hs | 2 +- libs/cardano-ledger-core/src/Cardano/Ledger/SafeHash.hs | 2 +- libs/cardano-ledger-core/src/Cardano/Ledger/Tools.hs | 2 +- libs/cardano-ledger-core/src/Cardano/Ledger/UTxO.hs | 2 +- .../testlib/Test/Cardano/Ledger/Core/Binary.hs | 2 +- .../bench/Bench/Cardano/Ledger/StakeDistr.hs | 2 +- libs/cardano-ledger-test/cardano-ledger-test.cabal | 6 +++--- .../src/Test/Cardano/Ledger/Alonzo/Tools.hs | 2 +- .../src/Test/Cardano/Ledger/Constrained/Classes.hs | 2 +- .../src/Test/Cardano/Ledger/Constrained/Examples.hs | 2 +- .../src/Test/Cardano/Ledger/Constrained/Preds/CertState.hs | 2 +- .../src/Test/Cardano/Ledger/Constrained/Preds/Certs.hs | 2 +- .../Test/Cardano/Ledger/Constrained/Preds/LedgerState.hs | 2 +- .../Test/Cardano/Ledger/Constrained/Preds/NewEpochState.hs | 2 +- .../src/Test/Cardano/Ledger/Constrained/Preds/Tx.hs | 2 +- .../src/Test/Cardano/Ledger/Constrained/Preds/TxOut.hs | 2 +- .../src/Test/Cardano/Ledger/Constrained/Preds/UTxO.hs | 2 +- .../src/Test/Cardano/Ledger/Constrained/Preds/Universes.hs | 2 +- .../src/Test/Cardano/Ledger/Constrained/Trace/Pipeline.hs | 2 +- .../src/Test/Cardano/Ledger/Constrained/Trace/TraceMonad.hs | 2 +- .../src/Test/Cardano/Ledger/Constrained/TypeRep.hs | 2 +- .../src/Test/Cardano/Ledger/Constrained/Vars.hs | 2 +- .../src/Test/Cardano/Ledger/Examples/AlonzoBBODY.hs | 2 +- .../src/Test/Cardano/Ledger/Examples/AlonzoValidTxUTXOW.hs | 2 +- .../src/Test/Cardano/Ledger/Examples/BabbageFeatures.hs | 2 +- .../src/Test/Cardano/Ledger/Examples/STSTestUtils.hs | 2 +- .../src/Test/Cardano/Ledger/Generic/AggPropTests.hs | 2 +- .../src/Test/Cardano/Ledger/Generic/Functions.hs | 2 +- .../src/Test/Cardano/Ledger/Generic/GenState.hs | 2 +- .../src/Test/Cardano/Ledger/Generic/ModelState.hs | 2 +- .../src/Test/Cardano/Ledger/Generic/Properties.hs | 2 +- .../src/Test/Cardano/Ledger/Generic/Trace.hs | 2 +- .../cardano-ledger-test/src/Test/Cardano/Ledger/NoThunks.hs | 2 +- libs/cardano-ledger-test/test/Tests.hs | 2 +- libs/ledger-state/ledger-state.cabal | 2 +- libs/ledger-state/src/Cardano/Ledger/State/Query.hs | 2 +- libs/small-steps/small-steps.cabal | 2 +- libs/small-steps/src/Control/State/Transition/Extended.hs | 2 +- 127 files changed, 134 insertions(+), 137 deletions(-) diff --git a/eras/allegra/impl/cardano-ledger-allegra.cabal b/eras/allegra/impl/cardano-ledger-allegra.cabal index 336e7d27b27..5d1233075a3 100644 --- a/eras/allegra/impl/cardano-ledger-allegra.cabal +++ b/eras/allegra/impl/cardano-ledger-allegra.cabal @@ -136,5 +136,5 @@ test-suite tests cardano-ledger-core:{cardano-ledger-core, testlib}, testlib, cardano-ledger-shelley:testlib, - data-default-class, + data-default, testlib diff --git a/eras/allegra/impl/test/Test/Cardano/Ledger/Allegra/BinarySpec.hs b/eras/allegra/impl/test/Test/Cardano/Ledger/Allegra/BinarySpec.hs index 45af8524a92..adfea14a1e2 100644 --- a/eras/allegra/impl/test/Test/Cardano/Ledger/Allegra/BinarySpec.hs +++ b/eras/allegra/impl/test/Test/Cardano/Ledger/Allegra/BinarySpec.hs @@ -7,7 +7,7 @@ module Test.Cardano.Ledger.Allegra.BinarySpec (spec) where import Cardano.Ledger.Allegra import Cardano.Ledger.Crypto (Crypto) -import Data.Default.Class (def) +import Data.Default (def) import Test.Cardano.Ledger.Allegra.Arbitrary () import Test.Cardano.Ledger.Allegra.TreeDiff () import Test.Cardano.Ledger.Common diff --git a/eras/alonzo/impl/cardano-ledger-alonzo.cabal b/eras/alonzo/impl/cardano-ledger-alonzo.cabal index 42507246332..21294137882 100644 --- a/eras/alonzo/impl/cardano-ledger-alonzo.cabal +++ b/eras/alonzo/impl/cardano-ledger-alonzo.cabal @@ -88,7 +88,7 @@ library cardano-slotting, cardano-strict-containers, containers, - data-default-class, + data-default, deepseq, mtl, microlens, diff --git a/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/PParams.hs b/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/PParams.hs index 96ff13bcd85..c7f154d9006 100644 --- a/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/PParams.hs +++ b/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/PParams.hs @@ -140,7 +140,7 @@ import qualified Data.Aeson.Types as Aeson import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.Coerce (coerce) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.Function (on) import Data.Functor.Identity (Identity (..)) import Data.List (sortBy) diff --git a/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Translation.hs b/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Translation.hs index 3c029fb7c97..43cd94dc899 100644 --- a/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Translation.hs +++ b/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Translation.hs @@ -32,7 +32,7 @@ import Cardano.Ledger.Shelley.LedgerState ( ) import Cardano.Ledger.Shelley.PParams (ProposedPPUpdates (..)) import Cardano.Ledger.UTxO (UTxO (..)) -import Data.Default.Class (def) +import Data.Default (def) import qualified Data.Map.Strict as Map import Lens.Micro ((^.)) diff --git a/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxBody/Internal.hs b/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxBody/Internal.hs index a53c2c79b6a..1acb5358006 100644 --- a/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxBody/Internal.hs +++ b/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxBody/Internal.hs @@ -143,7 +143,7 @@ import Cardano.Ledger.TxIn (TxIn (..)) import Control.Arrow (left) import Control.DeepSeq (NFData (..)) import Control.Monad (when) -import Data.Default.Class (def) +import Data.Default (def) import qualified Data.Map.Strict as Map import Data.Maybe.Strict (isSJust) import Data.OSet.Strict (OSet) diff --git a/eras/alonzo/test-suite/cardano-ledger-alonzo-test.cabal b/eras/alonzo/test-suite/cardano-ledger-alonzo-test.cabal index 582820e6ba8..5de1563c4f5 100644 --- a/eras/alonzo/test-suite/cardano-ledger-alonzo-test.cabal +++ b/eras/alonzo/test-suite/cardano-ledger-alonzo-test.cabal @@ -53,7 +53,7 @@ library cardano-strict-containers, cborg, containers, - data-default-class, + data-default, microlens, plutus-ledger-api >=1.33, QuickCheck, diff --git a/eras/alonzo/test-suite/src/Test/Cardano/Ledger/Alonzo/Examples/Consensus.hs b/eras/alonzo/test-suite/src/Test/Cardano/Ledger/Alonzo/Examples/Consensus.hs index f44ff9e66cf..d049c740fce 100644 --- a/eras/alonzo/test-suite/src/Test/Cardano/Ledger/Alonzo/Examples/Consensus.hs +++ b/eras/alonzo/test-suite/src/Test/Cardano/Ledger/Alonzo/Examples/Consensus.hs @@ -42,7 +42,7 @@ import Cardano.Ledger.Shelley.Scripts import Cardano.Ledger.Shelley.Tx (ShelleyTx (..)) import Cardano.Ledger.TxIn (mkTxInPartial) import Cardano.Slotting.Slot (EpochNo (..), SlotNo (..)) -import Data.Default.Class (def) +import Data.Default (def) import qualified Data.Map.Strict as Map import Data.Proxy (Proxy (..)) import qualified Data.Sequence.Strict as StrictSeq diff --git a/eras/babbage/impl/cardano-ledger-babbage.cabal b/eras/babbage/impl/cardano-ledger-babbage.cabal index 1f02e49077b..4807918bd12 100644 --- a/eras/babbage/impl/cardano-ledger-babbage.cabal +++ b/eras/babbage/impl/cardano-ledger-babbage.cabal @@ -168,6 +168,6 @@ test-suite tests cardano-ledger-binary:testlib, cardano-ledger-core:testlib, cardano-ledger-alonzo:testlib, - data-default-class, + data-default, HUnit, testlib diff --git a/eras/babbage/impl/test/Test/Cardano/Ledger/Babbage/BinarySpec.hs b/eras/babbage/impl/test/Test/Cardano/Ledger/Babbage/BinarySpec.hs index d9c9ce3ed70..ee25b5ce6f7 100644 --- a/eras/babbage/impl/test/Test/Cardano/Ledger/Babbage/BinarySpec.hs +++ b/eras/babbage/impl/test/Test/Cardano/Ledger/Babbage/BinarySpec.hs @@ -7,7 +7,7 @@ module Test.Cardano.Ledger.Babbage.BinarySpec (spec) where import Cardano.Ledger.Babbage import Cardano.Ledger.Crypto (Crypto) -import Data.Default.Class (def) +import Data.Default (def) import Test.Cardano.Ledger.Alonzo.Binary.RoundTrip (roundTripAlonzoCommonSpec) import Test.Cardano.Ledger.Babbage.Arbitrary () import Test.Cardano.Ledger.Babbage.TreeDiff () diff --git a/eras/babbage/test-suite/cardano-ledger-babbage-test.cabal b/eras/babbage/test-suite/cardano-ledger-babbage-test.cabal index 26074c14eae..114161c552f 100644 --- a/eras/babbage/test-suite/cardano-ledger-babbage-test.cabal +++ b/eras/babbage/test-suite/cardano-ledger-babbage-test.cabal @@ -42,7 +42,7 @@ library cardano-strict-containers, cardano-slotting, containers, - data-default-class, + data-default, microlens, QuickCheck, time, diff --git a/eras/babbage/test-suite/src/Test/Cardano/Ledger/Babbage/Examples/Consensus.hs b/eras/babbage/test-suite/src/Test/Cardano/Ledger/Babbage/Examples/Consensus.hs index 114d787ed35..d30637ad25a 100644 --- a/eras/babbage/test-suite/src/Test/Cardano/Ledger/Babbage/Examples/Consensus.hs +++ b/eras/babbage/test-suite/src/Test/Cardano/Ledger/Babbage/Examples/Consensus.hs @@ -46,7 +46,7 @@ import Cardano.Ledger.Shelley.Scripts import Cardano.Ledger.Shelley.Tx (ShelleyTx (..)) import Cardano.Ledger.TxIn (mkTxInPartial) import Cardano.Slotting.Slot (EpochNo (..), SlotNo (..)) -import Data.Default.Class (def) +import Data.Default (def) import qualified Data.Map.Strict as Map import Data.Proxy (Proxy (..)) import qualified Data.Sequence.Strict as StrictSeq diff --git a/eras/conway/impl/cardano-ledger-conway.cabal b/eras/conway/impl/cardano-ledger-conway.cabal index 6b53941974b..9dbad6c108d 100644 --- a/eras/conway/impl/cardano-ledger-conway.cabal +++ b/eras/conway/impl/cardano-ledger-conway.cabal @@ -85,7 +85,7 @@ library build-depends: base >=4.14 && <5, aeson >=2.2, - data-default-class, + data-default, cardano-crypto-class, cardano-data >=1.2.3, cardano-ledger-binary ^>=1.5, @@ -161,7 +161,7 @@ library testlib cardano-strict-containers, containers, cuddle >=0.3.2, - data-default-class, + data-default, deepseq, FailT, generic-random, @@ -244,7 +244,7 @@ test-suite tests cardano-slotting:testlib, cardano-strict-containers, containers, - data-default-class, + data-default, microlens, plutus-ledger-api, testlib, diff --git a/eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs b/eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs index 889a07ff123..f3b0c78faf2 100644 --- a/eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs +++ b/eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs @@ -227,7 +227,7 @@ import Control.DeepSeq (NFData (..)) import Control.Monad (guard) import Control.Monad.Trans.Reader (ReaderT, ask) import Data.Aeson (KeyValue, ToJSON (..), object, pairs, (.=)) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Foldable (Foldable (..)) import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map diff --git a/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/DRepPulser.hs b/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/DRepPulser.hs index 099961eeff3..b445412dc60 100644 --- a/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/DRepPulser.hs +++ b/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/DRepPulser.hs @@ -71,7 +71,7 @@ import Control.Monad (guard) import Control.Monad.Trans.Reader (Reader, runReader) import Control.State.Transition.Extended import Data.Aeson (KeyValue, ToJSON (..), object, pairs, (.=)) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Functor.Identity (Identity) import Data.Kind (Type) import Data.List.NonEmpty (NonEmpty ((:|))) diff --git a/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Internal.hs b/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Internal.hs index dde7cb43967..0631ef901c0 100644 --- a/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Internal.hs +++ b/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Internal.hs @@ -128,7 +128,7 @@ import Cardano.Ledger.Shelley.LedgerState ( import Cardano.Ledger.UMap import Control.DeepSeq (NFData (rnf), deepseq) import Data.Aeson (KeyValue, ToJSON (..), object, pairs, (.=)) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Foldable (Foldable (..)) import Data.List (sortOn) import Data.Map.Strict (Map) diff --git a/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Procedures.hs b/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Procedures.hs index 4f37bd429bf..6ebb8f4ce95 100644 --- a/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Procedures.hs +++ b/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Procedures.hs @@ -136,7 +136,7 @@ import Data.Aeson ( ) import Data.Aeson.Types (toJSONKeyText) import Data.Data (Typeable) -import Data.Default.Class +import Data.Default import Data.Kind import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map diff --git a/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Proposals.hs b/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Proposals.hs index 0511dc468a6..3503da036a8 100644 --- a/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Proposals.hs +++ b/eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Proposals.hs @@ -136,7 +136,7 @@ import Control.DeepSeq (NFData) import Control.Exception (assert) import Control.Monad (unless) import Data.Aeson (ToJSON (..)) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Either (partitionEithers) import Data.Foldable as F (foldl', foldrM, toList) import qualified Data.Map as Map diff --git a/eras/conway/impl/src/Cardano/Ledger/Conway/PParams.hs b/eras/conway/impl/src/Cardano/Ledger/Conway/PParams.hs index 2e0a9c2fade..e416cafd9d3 100644 --- a/eras/conway/impl/src/Cardano/Ledger/Conway/PParams.hs +++ b/eras/conway/impl/src/Cardano/Ledger/Conway/PParams.hs @@ -124,7 +124,7 @@ import Cardano.Ledger.Val (Val (..)) import Control.DeepSeq (NFData (..), rwhnf) import Data.Aeson hiding (Encoding, Value, decode, encode) import qualified Data.Aeson as Aeson -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.Functor.Identity (Identity) import qualified Data.Map.Strict as Map import Data.Maybe.Strict (StrictMaybe (..), isSNothing) diff --git a/eras/conway/impl/src/Cardano/Ledger/Conway/Rules/NewEpoch.hs b/eras/conway/impl/src/Cardano/Ledger/Conway/Rules/NewEpoch.hs index f83f0cce2dd..c5b72a44568 100644 --- a/eras/conway/impl/src/Cardano/Ledger/Conway/Rules/NewEpoch.hs +++ b/eras/conway/impl/src/Cardano/Ledger/Conway/Rules/NewEpoch.hs @@ -57,7 +57,7 @@ import Cardano.Ledger.Slot (EpochNo (EpochNo)) import qualified Cardano.Ledger.Val as Val import Control.DeepSeq (NFData) import Control.State.Transition -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import qualified Data.Map.Strict as Map import Data.Set (Set) import GHC.Generics (Generic) diff --git a/eras/conway/impl/src/Cardano/Ledger/Conway/Translation.hs b/eras/conway/impl/src/Cardano/Ledger/Conway/Translation.hs index df4726084b7..37a2dc6aa85 100644 --- a/eras/conway/impl/src/Cardano/Ledger/Conway/Translation.hs +++ b/eras/conway/impl/src/Cardano/Ledger/Conway/Translation.hs @@ -55,7 +55,7 @@ import Cardano.Ledger.Shelley.LedgerState ( epochStateGovStateL, ) import qualified Cardano.Ledger.UMap as UM -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.Map.Strict as Map import Lens.Micro diff --git a/eras/conway/impl/test/Test/Cardano/Ledger/Conway/BinarySpec.hs b/eras/conway/impl/test/Test/Cardano/Ledger/Conway/BinarySpec.hs index e58f9c6d4c2..f050e7d35fe 100644 --- a/eras/conway/impl/test/Test/Cardano/Ledger/Conway/BinarySpec.hs +++ b/eras/conway/impl/test/Test/Cardano/Ledger/Conway/BinarySpec.hs @@ -14,7 +14,7 @@ import Cardano.Ledger.Conway.Governance import Cardano.Ledger.Credential import Cardano.Ledger.Crypto import Cardano.Ledger.Shelley.LedgerState -import Data.Default.Class (def) +import Data.Default (def) import qualified Data.Map.Strict as Map import Lens.Micro import Test.Cardano.Ledger.Binary.RoundTrip diff --git a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Arbitrary.hs b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Arbitrary.hs index 0367b8c43b5..343a5c3ee17 100644 --- a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Arbitrary.hs +++ b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Arbitrary.hs @@ -55,7 +55,7 @@ import Cardano.Ledger.Crypto (Crypto) import Cardano.Ledger.HKD (HKD, NoUpdate (..)) import Cardano.Ledger.Plutus (Language (PlutusV3)) import Control.State.Transition.Extended (STS (Event)) -import Data.Default.Class (def) +import Data.Default (def) import Data.Foldable (toList) import Data.Functor.Identity (Identity) import Data.List (nubBy) diff --git a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Genesis.hs b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Genesis.hs index d1308cdc4fd..4bb99c9a736 100644 --- a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Genesis.hs +++ b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Genesis.hs @@ -20,7 +20,7 @@ import Cardano.Ledger.Credential import Cardano.Ledger.Crypto (StandardCrypto) import Cardano.Ledger.Keys import Cardano.Ledger.Slot (EpochNo (..)) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.ListMap as ListMap import Data.Map as Map import Data.Maybe (fromJust) diff --git a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/EnactSpec.hs b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/EnactSpec.hs index be79aa30b25..09d45bd3a2f 100644 --- a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/EnactSpec.hs +++ b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/EnactSpec.hs @@ -24,7 +24,7 @@ import Cardano.Ledger.Val (zero, (<->)) import Control.Monad (forM) import Control.Monad.Writer (listen) import Control.State.Transition.Extended (STS (..)) -import Data.Default.Class (def) +import Data.Default (def) import Data.Foldable as F (foldl', traverse_) import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.List.NonEmpty as NE diff --git a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/EpochSpec.hs b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/EpochSpec.hs index c3d25247e4f..19ae1051289 100644 --- a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/EpochSpec.hs +++ b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/EpochSpec.hs @@ -25,7 +25,7 @@ import Cardano.Ledger.Shelley.LedgerState import Cardano.Ledger.Shelley.Rules (Event, ShelleyTickEvent (..)) import Cardano.Ledger.Val import Control.Monad.Writer (listen) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import qualified Data.List.NonEmpty as NE import qualified Data.Map.Strict as Map import Data.Maybe.Strict (StrictMaybe (..)) diff --git a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/GovSpec.hs b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/GovSpec.hs index a1e426571e2..2d5219d424a 100644 --- a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/GovSpec.hs +++ b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/GovSpec.hs @@ -28,7 +28,7 @@ import Cardano.Ledger.Shelley.Scripts ( pattern RequireSignature, ) import Cardano.Ledger.Val (zero, (<->)) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.Map.Strict as Map import qualified Data.OMap.Strict as OMap diff --git a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/LedgerSpec.hs b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/LedgerSpec.hs index 1ceda4123a9..61d3fe8fa9e 100644 --- a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/LedgerSpec.hs +++ b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/LedgerSpec.hs @@ -27,7 +27,7 @@ import qualified Cardano.Ledger.Shelley.HardForks as HF (bootstrapPhase) import Cardano.Ledger.Shelley.LedgerState import Cardano.Ledger.Shelley.Rules (ShelleyLedgersEnv (..), ShelleyLedgersEvent (..)) import Control.State.Transition.Extended -import Data.Default.Class (def) +import Data.Default (def) import qualified Data.Sequence as Seq import qualified Data.Set as Set import Lens.Micro ((&), (.~), (^.)) diff --git a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs index 1c300d525b5..c73f5c7be50 100644 --- a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs +++ b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs @@ -21,7 +21,7 @@ import Cardano.Ledger.Shelley.HardForks (bootstrapPhase) import Cardano.Ledger.Shelley.LedgerState import qualified Cardano.Ledger.UMap as UM import Cardano.Ledger.Val (zero, (<->)) -import Data.Default.Class (def) +import Data.Default (def) import Data.Foldable import qualified Data.List.NonEmpty as NE import qualified Data.Map.Strict as Map diff --git a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/UtxosSpec.hs b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/UtxosSpec.hs index 46a60658841..675c0c35da4 100644 --- a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/UtxosSpec.hs +++ b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/UtxosSpec.hs @@ -37,7 +37,7 @@ import Cardano.Ledger.Plutus import Cardano.Ledger.Shelley.LedgerState import Cardano.Ledger.Shelley.Rules (ShelleyUtxowPredFailure (..)) import Cardano.Ledger.TxIn (TxId (..), mkTxInPartial) -import Data.Default.Class (def) +import Data.Default (def) import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.Map.Strict as Map import qualified Data.OSet.Strict as OSet diff --git a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/ImpTest.hs b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/ImpTest.hs index 9af106962a7..bd8f46968f3 100644 --- a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/ImpTest.hs +++ b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/ImpTest.hs @@ -223,7 +223,7 @@ import Control.Monad (forM) import Control.Monad.Trans.Fail.String (errorFail) import Control.State.Transition.Extended (STS (..)) import Data.Bifunctor (bimap) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Foldable (Foldable (..)) import Data.Functor.Identity import Data.List.NonEmpty (NonEmpty) diff --git a/eras/conway/test-suite/cardano-ledger-conway-test.cabal b/eras/conway/test-suite/cardano-ledger-conway-test.cabal index 05136dc1287..056857eaa86 100644 --- a/eras/conway/test-suite/cardano-ledger-conway-test.cabal +++ b/eras/conway/test-suite/cardano-ledger-conway-test.cabal @@ -38,7 +38,7 @@ library cardano-ledger-shelley >=1.6, cardano-strict-containers, containers, - data-default-class, + data-default, small-steps >=1.1, plutus-ledger-api, microlens diff --git a/eras/conway/test-suite/src/Test/Cardano/Ledger/Conway/Examples/Consensus.hs b/eras/conway/test-suite/src/Test/Cardano/Ledger/Conway/Examples/Consensus.hs index c262d90bad5..45d464691c8 100644 --- a/eras/conway/test-suite/src/Test/Cardano/Ledger/Conway/Examples/Consensus.hs +++ b/eras/conway/test-suite/src/Test/Cardano/Ledger/Conway/Examples/Consensus.hs @@ -56,7 +56,7 @@ import Cardano.Ledger.Shelley.Scripts ( import Cardano.Ledger.Shelley.Tx (ShelleyTx (..)) import Cardano.Ledger.TxIn (mkTxInPartial) import Control.State.Transition.Extended (Embed (..)) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.Map.Strict as Map import qualified Data.OSet.Strict as OSet import Data.Proxy (Proxy (..)) diff --git a/eras/mary/impl/cardano-ledger-mary.cabal b/eras/mary/impl/cardano-ledger-mary.cabal index 12c56ea2d7d..613068525f3 100644 --- a/eras/mary/impl/cardano-ledger-mary.cabal +++ b/eras/mary/impl/cardano-ledger-mary.cabal @@ -147,5 +147,5 @@ test-suite tests cardano-ledger-core:{cardano-ledger-core, testlib}, cardano-ledger-mary, cardano-ledger-shelley:testlib, - data-default-class, + data-default, testlib diff --git a/eras/mary/impl/test/Test/Cardano/Ledger/Mary/BinarySpec.hs b/eras/mary/impl/test/Test/Cardano/Ledger/Mary/BinarySpec.hs index 647fc35d39a..bc4bb39d5e6 100644 --- a/eras/mary/impl/test/Test/Cardano/Ledger/Mary/BinarySpec.hs +++ b/eras/mary/impl/test/Test/Cardano/Ledger/Mary/BinarySpec.hs @@ -7,7 +7,7 @@ module Test.Cardano.Ledger.Mary.BinarySpec (spec) where import Cardano.Ledger.Crypto (Crypto) import Cardano.Ledger.Mary -import Data.Default.Class (def) +import Data.Default (def) import Test.Cardano.Ledger.Common import Test.Cardano.Ledger.Core.Binary (specUpgrade) import Test.Cardano.Ledger.Core.Binary.RoundTrip (RuleListEra (..)) diff --git a/eras/shelley-ma/test-suite/cardano-ledger-shelley-ma-test.cabal b/eras/shelley-ma/test-suite/cardano-ledger-shelley-ma-test.cabal index 744f13405fe..79ad1ab20ad 100644 --- a/eras/shelley-ma/test-suite/cardano-ledger-shelley-ma-test.cabal +++ b/eras/shelley-ma/test-suite/cardano-ledger-shelley-ma-test.cabal @@ -97,7 +97,7 @@ test-suite cardano-ledger-shelley-ma-test cardano-slotting, cborg, containers, - data-default-class, + data-default, deepseq, groups, mtl, diff --git a/eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Allegra/ScriptTranslation.hs b/eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Allegra/ScriptTranslation.hs index 85acb1b6ef8..12f6b2a1173 100644 --- a/eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Allegra/ScriptTranslation.hs +++ b/eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Allegra/ScriptTranslation.hs @@ -21,7 +21,7 @@ import qualified Cardano.Ledger.Val as Val import Cardano.Slotting.Slot (SlotNo (..)) import Control.Monad.Except (runExcept) import Control.State.Transition.Extended (TRC (..)) -import Data.Default.Class (def) +import Data.Default (def) import qualified Data.Map.Strict as Map import qualified Data.Sequence.Strict as StrictSeq import qualified Data.Set as Set diff --git a/eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Mary/Examples.hs b/eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Mary/Examples.hs index 5db1c8428c3..477a6ce2c84 100644 --- a/eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Mary/Examples.hs +++ b/eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Mary/Examples.hs @@ -14,7 +14,7 @@ import Cardano.Ledger.Shelley.LedgerState (LedgerState (..), UTxOState (..), sma import Cardano.Ledger.Shelley.Tx (ShelleyTx (..)) import Cardano.Ledger.UTxO (UTxO) import Control.State.Transition.Extended hiding (Assertion) -import Data.Default.Class (def) +import Data.Default (def) import Data.List.NonEmpty (NonEmpty) import GHC.Stack import Lens.Micro diff --git a/eras/shelley/impl/cardano-ledger-shelley.cabal b/eras/shelley/impl/cardano-ledger-shelley.cabal index a04c8fbba1b..886286feab6 100644 --- a/eras/shelley/impl/cardano-ledger-shelley.cabal +++ b/eras/shelley/impl/cardano-ledger-shelley.cabal @@ -109,7 +109,7 @@ library cardano-slotting, vector-map ^>=1.1, containers, - data-default-class, + data-default, deepseq, groups, heapwords, @@ -158,7 +158,7 @@ library testlib base, bytestring, cardano-crypto-class, - data-default-class, + data-default, cardano-data, cardano-ledger-binary:{cardano-ledger-binary, testlib}, cardano-ledger-byron, diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/API/ByronTranslation.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/API/ByronTranslation.hs index 11fda01876d..079dc66ea0b 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/API/ByronTranslation.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/API/ByronTranslation.hs @@ -36,7 +36,7 @@ import qualified Cardano.Ledger.UMap as UM import Cardano.Ledger.UTxO (coinBalance) import Cardano.Ledger.Val (zero, (<->)) import qualified Data.ByteString.Short as SBS -import Data.Default.Class (def) +import Data.Default (def) import qualified Data.Map.Strict as Map import Data.Word import GHC.Stack (HasCallStack) diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/API/Genesis.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/API/Genesis.hs index 9b0539f0459..a6ccb23b0c1 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/API/Genesis.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/API/Genesis.hs @@ -35,7 +35,7 @@ import Cardano.Ledger.Shelley.LedgerState ( import qualified Cardano.Ledger.UMap as UM import Cardano.Ledger.UTxO (coinBalance) import Cardano.Ledger.Val (Val (..)) -import Data.Default.Class (Default, def) +import Data.Default (Default, def) import Data.Kind (Type) import qualified Data.Map.Strict as Map import Lens.Micro ((&), (.~)) diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/API/Wallet.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/API/Wallet.hs index ccb45e0ef9f..23cd3b33c30 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/API/Wallet.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/API/Wallet.hs @@ -115,7 +115,7 @@ import Cardano.Slotting.Slot (EpochSize) import Control.DeepSeq (NFData) import Control.Monad.Trans.Reader (runReader) import Data.Aeson (FromJSON, ToJSON) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.Foldable (foldMap') import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Governance.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Governance.hs index 98cfe5b2e14..7a49c2faadf 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Governance.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Governance.hs @@ -59,7 +59,7 @@ import Data.Aeson ( pairs, (.=), ) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Kind (Type) import Data.Typeable import GHC.Generics (Generic) diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/NewEpochState.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/NewEpochState.hs index 144728b7a94..6ce59c72f2d 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/NewEpochState.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/NewEpochState.hs @@ -32,7 +32,7 @@ import Cardano.Ledger.Shelley.LedgerState.Types import qualified Cardano.Ledger.UMap as UM import Cardano.Ledger.UTxO (UTxO (..), coinBalance) import Cardano.Ledger.Val ((<+>), (<->)) -import Data.Default.Class (def) +import Data.Default (def) import Data.Foldable (fold) import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/Types.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/Types.hs index fda6f90b3a8..2f698b24ba2 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/Types.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/Types.hs @@ -78,7 +78,7 @@ import Control.DeepSeq (NFData) import Control.Monad.State.Strict (evalStateT) import Control.Monad.Trans (MonadTrans (lift)) import Data.Aeson (KeyValue, ToJSON (..), object, pairs, (.=)) -import Data.Default.Class (Default, def) +import Data.Default (Default, def) import Data.Group (Group, invert) import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/PoolRank.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/PoolRank.hs index 31c63b1ec1a..26d8aa5daf5 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/PoolRank.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/PoolRank.hs @@ -57,7 +57,7 @@ import Cardano.Slotting.Slot (EpochSize (..)) import Control.DeepSeq (NFData) import Control.Monad.Trans import Data.Aeson (FromJSON, KeyValue, ToJSON (..), object, pairs, (.=)) -import Data.Default.Class (Default, def) +import Data.Default (Default, def) import Data.Foldable (find) import Data.Function (on) import Data.List (sortBy) diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/RewardProvenance.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/RewardProvenance.hs index 72a4ca23a2b..98c637eea65 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/RewardProvenance.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/RewardProvenance.hs @@ -21,7 +21,7 @@ import Cardano.Ledger.Keys (KeyHash (..), KeyRole (..)) import Cardano.Ledger.PoolParams (PoolParams (..)) import Control.DeepSeq (NFData) import Data.Aeson (FromJSON, ToJSON) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Map.Strict (Map) import Data.Word (Word64) import GHC.Generics diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/RewardUpdate.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/RewardUpdate.hs index 1cd689056e8..f66a614aed4 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/RewardUpdate.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/RewardUpdate.hs @@ -61,7 +61,7 @@ import Cardano.Ledger.Shelley.Rewards ( ) import Control.DeepSeq (NFData (..)) import Data.Aeson (KeyValue, ToJSON (..), Value (Null), object, pairs, (.=)) -import Data.Default.Class (def) +import Data.Default (def) import Data.Group (invert) import Data.Kind (Type) import Data.Map.Strict (Map) diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Epoch.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Epoch.hs index 71fab967ca8..199461bca7c 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Epoch.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Epoch.hs @@ -71,7 +71,7 @@ import Control.State.Transition ( judgmentContext, trans, ) -import Data.Default.Class (Default) +import Data.Default (Default) import qualified Data.Map.Strict as Map import Data.Void (Void) import GHC.Generics (Generic) diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Ledgers.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Ledgers.hs index 5384d15ae72..82366c43318 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Ledgers.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Ledgers.hs @@ -51,7 +51,7 @@ import Control.State.Transition ( judgmentContext, trans, ) -import Data.Default.Class (Default) +import Data.Default (Default) import Data.Foldable (toList) import Data.Sequence (Seq) import GHC.Generics (Generic) diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Mir.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Mir.hs index b54ae904561..0c1fd6810d9 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Mir.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Mir.hs @@ -55,7 +55,7 @@ import Control.State.Transition ( judgmentContext, tellEvent, ) -import Data.Default.Class (Default) +import Data.Default (Default) import Data.Foldable (fold) import qualified Data.Map.Strict as Map import GHC.Generics (Generic) diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/NewEpoch.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/NewEpoch.hs index 731415579fe..6f533213ca3 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/NewEpoch.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/NewEpoch.hs @@ -45,7 +45,7 @@ import Cardano.Ledger.Slot (EpochNo (..)) import qualified Cardano.Ledger.Val as Val import Control.DeepSeq (NFData) import Control.State.Transition -import Data.Default.Class (Default, def) +import Data.Default (Default, def) import qualified Data.Map.Strict as Map import Data.Set (Set) import GHC.Generics (Generic) diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Newpp.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Newpp.hs index 5e107ee8dfb..260fd10b427 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Newpp.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Newpp.hs @@ -37,7 +37,7 @@ import Control.State.Transition ( judgmentContext, liftSTS, ) -import Data.Default.Class (Default, def) +import Data.Default (Default, def) import Data.Void (Void) import Data.Word (Word64) diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/PoolReap.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/PoolReap.hs index f35d4059af1..a4b5531e726 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/PoolReap.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/PoolReap.hs @@ -61,7 +61,7 @@ import Control.State.Transition ( judgmentContext, tellEvent, ) -import Data.Default.Class (Default, def) +import Data.Default (Default, def) import Data.Foldable (fold) import qualified Data.Map.Strict as Map import Data.Set (Set) diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Upec.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Upec.hs index 0f3c0d4c876..6c664fdf847 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Upec.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Upec.hs @@ -46,7 +46,7 @@ import Control.State.Transition ( judgmentContext, trans, ) -import Data.Default.Class (Default) +import Data.Default (Default) import GHC.Generics (Generic) import NoThunks.Class (NoThunks (..)) diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Transition.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Transition.hs index f2eedf8e72b..4a40065fa7c 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Transition.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Transition.hs @@ -53,7 +53,7 @@ import qualified Cardano.Ledger.UMap as UM import Cardano.Ledger.UTxO import Cardano.Ledger.Val import Data.Aeson (FromJSON (..), KeyValue (..), ToJSON (..), object, pairs, withObject, (.:)) -import Data.Default.Class +import Data.Default import Data.Kind import qualified Data.ListMap as LM import qualified Data.ListMap as ListMap diff --git a/eras/shelley/impl/testlib/Test/Cardano/Ledger/Shelley/ImpTest.hs b/eras/shelley/impl/testlib/Test/Cardano/Ledger/Shelley/ImpTest.hs index 38986fbd909..b9f060bd5b3 100644 --- a/eras/shelley/impl/testlib/Test/Cardano/Ledger/Shelley/ImpTest.hs +++ b/eras/shelley/impl/testlib/Test/Cardano/Ledger/Shelley/ImpTest.hs @@ -248,7 +248,7 @@ import Control.State.Transition.Extended ( import Data.Bifunctor (first) import Data.Coerce (coerce) import Data.Data (Proxy (..), type (:~:) (..)) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Foldable (toList, traverse_) import Data.Functor (($>)) import Data.Functor.Identity (Identity (..)) diff --git a/eras/shelley/test-suite/cardano-ledger-shelley-test.cabal b/eras/shelley/test-suite/cardano-ledger-shelley-test.cabal index 4741af3333b..06671589ece 100644 --- a/eras/shelley/test-suite/cardano-ledger-shelley-test.cabal +++ b/eras/shelley/test-suite/cardano-ledger-shelley-test.cabal @@ -84,7 +84,7 @@ library cardano-slotting:{cardano-slotting, testlib}, cborg, containers, - data-default-class, + data-default, deepseq, microlens, mtl, @@ -159,7 +159,7 @@ test-suite cardano-ledger-shelley-test cardano-slotting, cborg, containers, - data-default-class, + data-default, deepseq, groups, iproute, diff --git a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/BenchmarkFunctions.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/BenchmarkFunctions.hs index 627f6075eb7..386152bca9f 100644 --- a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/BenchmarkFunctions.hs +++ b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/BenchmarkFunctions.hs @@ -78,7 +78,7 @@ import Cardano.Ledger.Slot (EpochNo (..), SlotNo (..)) import Cardano.Ledger.TxIn (TxIn (..), mkTxInPartial) import Cardano.Protocol.TPraos.API (PraosCrypto) import Control.State.Transition.Extended (TRC (..), applySTS) -import Data.Default.Class (def) +import Data.Default (def) import qualified Data.Map.Strict as Map import Data.Sequence.Strict (StrictSeq) import qualified Data.Sequence.Strict as StrictSeq diff --git a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Examples/Consensus.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Examples/Consensus.hs index 059a5608ca6..7d9ef046dea 100644 --- a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Examples/Consensus.hs +++ b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Examples/Consensus.hs @@ -39,7 +39,7 @@ import Cardano.Protocol.TPraos.Rules.Tickn import Cardano.Slotting.EpochInfo import qualified Data.ByteString as Strict import Data.Coerce (coerce) -import Data.Default.Class +import Data.Default import qualified Data.List.NonEmpty as NE import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map diff --git a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/EraGen.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/EraGen.hs index 8ee25c55460..c97e181f2c8 100644 --- a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/EraGen.hs +++ b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/EraGen.hs @@ -57,7 +57,7 @@ import Cardano.Ledger.UTxO (UTxO) import Cardano.Protocol.TPraos.BHeader (BHeader) import Cardano.Slotting.Slot (SlotNo) import Control.State.Transition.Extended (STS (..)) -import Data.Default.Class (Default) +import Data.Default (Default) import Data.Map (Map) import Data.Sequence (Seq) import Data.Sequence.Strict (StrictSeq) diff --git a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/Chain.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/Chain.hs index cb7cce81d10..fc029aeac6d 100644 --- a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/Chain.hs +++ b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/Chain.hs @@ -119,7 +119,7 @@ import Control.State.Transition ( judgmentContext, trans, ) -import Data.Default.Class (Default, def) +import Data.Default (Default, def) import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Void (Void) diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Combinators.hs b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Combinators.hs index 5a07e709067..2bf32c9b511 100644 --- a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Combinators.hs +++ b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Combinators.hs @@ -117,7 +117,7 @@ import Cardano.Protocol.TPraos.BHeader ( prevHashToNonce, ) import Cardano.Slotting.Slot (EpochNo, WithOrigin (..)) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Foldable as F (fold, foldl') import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/EmptyBlock.hs b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/EmptyBlock.hs index 858c62ae276..d772e681392 100644 --- a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/EmptyBlock.hs +++ b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/EmptyBlock.hs @@ -18,7 +18,7 @@ import Cardano.Ledger.Slot (BlockNo (..), SlotNo (..)) import Cardano.Ledger.UTxO (UTxO (..)) import Cardano.Protocol.TPraos.BHeader (BHeader) import Cardano.Protocol.TPraos.OCert (KESPeriod (..)) -import Data.Default.Class +import Data.Default import GHC.Stack (HasCallStack) import Test.Cardano.Ledger.Shelley.ConcreteCryptoTypes (ExMock) import Test.Cardano.Ledger.Shelley.Examples (CHAINExample (..)) diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/GenesisDelegation.hs b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/GenesisDelegation.hs index 6fbc0f37453..1359067f334 100644 --- a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/GenesisDelegation.hs +++ b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/GenesisDelegation.hs @@ -46,7 +46,7 @@ import Cardano.Ledger.Val ((<->)) import qualified Cardano.Ledger.Val as Val import Cardano.Protocol.TPraos.BHeader (BHeader, bhHash) import Cardano.Protocol.TPraos.OCert (KESPeriod (..)) -import Data.Default.Class (Default) +import Data.Default (Default) import qualified Data.Map.Strict as Map import qualified Data.Sequence.Strict as StrictSeq import qualified Data.Set as Set diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Init.hs b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Init.hs index 799d283b686..cc682e7b323 100644 --- a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Init.hs +++ b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Init.hs @@ -37,7 +37,7 @@ import Cardano.Protocol.TPraos.BHeader ( hashHeaderToNonce, ) import Cardano.Slotting.Slot (WithOrigin (..)) -import Data.Default.Class +import Data.Default import Lens.Micro import Test.Cardano.Ledger.Shelley.Examples.Federation (genDelegs) import Test.Cardano.Ledger.Shelley.Rules.Chain ( diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/NetworkID.hs b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/NetworkID.hs index fdd27f7b7f0..13777b6cb45 100644 --- a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/NetworkID.hs +++ b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/NetworkID.hs @@ -18,7 +18,7 @@ import Cardano.Ledger.Shelley.API ( import Cardano.Ledger.Shelley.Core import Cardano.Ledger.Slot (SlotNo (..)) import Control.State.Transition.Extended hiding (Assertion) -import Data.Default.Class (def) +import Data.Default (def) import Lens.Micro import Test.Cardano.Ledger.Shelley.ConcreteCryptoTypes (C_Crypto) import qualified Test.Cardano.Ledger.Shelley.Examples.Cast as Cast diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/PoolLifetime.hs b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/PoolLifetime.hs index 2cd8ff27a4e..eabaa877110 100644 --- a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/PoolLifetime.hs +++ b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/PoolLifetime.hs @@ -90,7 +90,7 @@ import Cardano.Ledger.Val ((<+>), (<->), (<×>)) import qualified Cardano.Ledger.Val as Val import Cardano.Protocol.TPraos.BHeader (BHeader, bhHash, hashHeaderToNonce) import Cardano.Protocol.TPraos.OCert (KESPeriod (..)) -import Data.Default.Class (def) +import Data.Default (def) import Data.Group (invert) import qualified Data.Map.Strict as Map import Data.Ratio ((%)) diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/TwoPools.hs b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/TwoPools.hs index 748270c52ad..038f527ec5f 100644 --- a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/TwoPools.hs +++ b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/TwoPools.hs @@ -94,7 +94,7 @@ import Cardano.Ledger.Val ((<+>), (<->), (<×>)) import qualified Cardano.Ledger.Val as Val import Cardano.Protocol.TPraos.BHeader (BHeader, bhHash, hashHeaderToNonce) import Cardano.Protocol.TPraos.OCert (KESPeriod (..)) -import Data.Default.Class (def) +import Data.Default (def) import Data.Group (invert) import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/MultiSigExamples.hs b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/MultiSigExamples.hs index 9dfd682f9ac..c83b5d2cdea 100644 --- a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/MultiSigExamples.hs +++ b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/MultiSigExamples.hs @@ -61,7 +61,7 @@ import Cardano.Ledger.Slot (SlotNo (..)) import Cardano.Ledger.TxIn (TxId, TxIn (..)) import qualified Cardano.Ledger.Val as Val import Control.State.Transition -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.Foldable (fold) import Data.List.NonEmpty (NonEmpty) import Data.Map.Strict (Map) diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/UnitTests.hs b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/UnitTests.hs index 39a62227f8d..3daccb690b7 100644 --- a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/UnitTests.hs +++ b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/UnitTests.hs @@ -83,7 +83,7 @@ import Cardano.Protocol.TPraos.BHeader (checkLeaderValue) import Control.DeepSeq (rnf) import Control.State.Transition.Extended (PredicateFailure, TRC (..)) import qualified Data.ByteString.Char8 as BS (pack) -import Data.Default.Class (def) +import Data.Default (def) import Data.List.NonEmpty (NonEmpty) import qualified Data.Map.Strict as Map import Data.Maybe (fromJust) diff --git a/libs/cardano-data/cardano-data.cabal b/libs/cardano-data/cardano-data.cabal index 2b0611f7668..bc08ad35b4c 100644 --- a/libs/cardano-data/cardano-data.cabal +++ b/libs/cardano-data/cardano-data.cabal @@ -38,7 +38,7 @@ library cardano-ledger-binary >=1.4, cardano-strict-containers >=0.1.2.1, containers, - data-default-class, + data-default, deepseq, mtl, nothunks, diff --git a/libs/cardano-data/src/Data/OMap/Strict.hs b/libs/cardano-data/src/Data/OMap/Strict.hs index 4bb8806c565..64c17a24d11 100644 --- a/libs/cardano-data/src/Data/OMap/Strict.hs +++ b/libs/cardano-data/src/Data/OMap/Strict.hs @@ -57,7 +57,7 @@ import Cardano.Ledger.Binary ( import Cardano.Ledger.Binary.Decoding (DecCBOR (decCBOR)) import Control.DeepSeq (NFData (..)) import Data.Aeson (ToJSON (..)) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Foldable qualified as F import Data.Map.Strict qualified as Map import Data.MapExtras qualified as MapE diff --git a/libs/cardano-ledger-api/cardano-ledger-api.cabal b/libs/cardano-ledger-api/cardano-ledger-api.cabal index 345cd88d2d7..189e720b93d 100644 --- a/libs/cardano-ledger-api/cardano-ledger-api.cabal +++ b/libs/cardano-ledger-api/cardano-ledger-api.cabal @@ -112,7 +112,7 @@ test-suite cardano-ledger-api-test bytestring, cardano-ledger-api, cardano-ledger-byron, - data-default-class, + data-default, testlib, cardano-crypto-class, cardano-ledger-binary, diff --git a/libs/cardano-ledger-api/test/Test/Cardano/Ledger/Api/State/Imp/QuerySpec.hs b/libs/cardano-ledger-api/test/Test/Cardano/Ledger/Api/State/Imp/QuerySpec.hs index cd6aa2b2169..cdd079661e8 100644 --- a/libs/cardano-ledger-api/test/Test/Cardano/Ledger/Api/State/Imp/QuerySpec.hs +++ b/libs/cardano-ledger-api/test/Test/Cardano/Ledger/Api/State/Imp/QuerySpec.hs @@ -30,7 +30,7 @@ import Cardano.Ledger.DRep import Cardano.Ledger.Keys (KeyRole (..)) import qualified Cardano.Ledger.Shelley.HardForks as HF import Cardano.Ledger.Shelley.LedgerState -import Data.Default.Class (def) +import Data.Default (def) import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Lens.Micro diff --git a/libs/cardano-ledger-api/test/Test/Cardano/Ledger/Api/State/QuerySpec.hs b/libs/cardano-ledger-api/test/Test/Cardano/Ledger/Api/State/QuerySpec.hs index 621cc7becf6..f1534f57d80 100644 --- a/libs/cardano-ledger-api/test/Test/Cardano/Ledger/Api/State/QuerySpec.hs +++ b/libs/cardano-ledger-api/test/Test/Cardano/Ledger/Api/State/QuerySpec.hs @@ -40,7 +40,7 @@ import Cardano.Ledger.PoolDistr import Cardano.Ledger.Shelley.Core import Cardano.Ledger.Shelley.LedgerState import Cardano.Ledger.UMap (UMap) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Foldable (foldMap') import qualified Data.Map.Strict as Map import Data.Maybe (isNothing) diff --git a/libs/cardano-ledger-conformance/cardano-ledger-conformance.cabal b/libs/cardano-ledger-conformance/cardano-ledger-conformance.cabal index d21afbf8166..b2140c2e8c0 100644 --- a/libs/cardano-ledger-conformance/cardano-ledger-conformance.cabal +++ b/libs/cardano-ledger-conformance/cardano-ledger-conformance.cabal @@ -62,7 +62,7 @@ library base16-bytestring, cardano-data, cardano-strict-containers, - data-default-class, + data-default, microlens, mtl, cardano-ledger-api:testlib, diff --git a/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/Orphans.hs b/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/Orphans.hs index 6c7106113ea..89bdc6752b0 100644 --- a/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/Orphans.hs +++ b/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/Orphans.hs @@ -7,7 +7,7 @@ module Test.Cardano.Ledger.Conformance.Orphans where import Data.Bifunctor (Bifunctor (..)) -import Data.Default.Class (Default) +import Data.Default (Default) import Data.List (nub, sortOn) import qualified Data.Set as Set import Data.Void (Void) diff --git a/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/SpecTranslate/Conway/Base.hs b/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/SpecTranslate/Conway/Base.hs index be0cf5ec665..491d6c504d5 100644 --- a/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/SpecTranslate/Conway/Base.hs +++ b/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/SpecTranslate/Conway/Base.hs @@ -92,7 +92,7 @@ import Control.State.Transition.Extended (STS (..)) import Data.Bifunctor (Bifunctor (..)) import Data.Bitraversable (bimapM) import Data.Data (Typeable) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Foldable (Foldable (..)) import Data.List (sortOn) import Data.Map.Strict (Map) diff --git a/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/SpecTranslate/Conway/GovCert.hs b/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/SpecTranslate/Conway/GovCert.hs index 3f191c3edeb..23b12add57a 100644 --- a/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/SpecTranslate/Conway/GovCert.hs +++ b/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/SpecTranslate/Conway/GovCert.hs @@ -33,7 +33,7 @@ import Cardano.Ledger.Conway.TxCert ( import Cardano.Ledger.Credential (Credential (..)) import Cardano.Ledger.Crypto (Crypto) import Cardano.Ledger.Shelley.LedgerState -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Functor.Identity (Identity) import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map diff --git a/libs/cardano-ledger-core/cardano-ledger-core.cabal b/libs/cardano-ledger-core/cardano-ledger-core.cabal index 69e5ddc42fa..39b4721d99c 100644 --- a/libs/cardano-ledger-core/cardano-ledger-core.cabal +++ b/libs/cardano-ledger-core/cardano-ledger-core.cabal @@ -105,7 +105,7 @@ library cardano-prelude, cardano-slotting, containers, - data-default-class, + data-default >=0.8, deepseq, FailT, groups, @@ -184,7 +184,7 @@ library testlib cardano-ledger-byron-test, containers, cuddle, - data-default-class, + data-default, deepseq, FailT, generic-random, diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/Address.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/Address.hs index 0c7e7b9b740..fd2d1b6845a 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/Address.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/Address.hs @@ -120,7 +120,7 @@ import qualified Data.ByteString.Base16 as B16 import qualified Data.ByteString.Lazy as BSL import Data.ByteString.Short as SBS (ShortByteString, fromShort, index, length, toShort) import qualified Data.ByteString.Unsafe as BS (unsafeDrop, unsafeIndex, unsafeTake) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Function (fix) import Data.Map.Strict (Map) import Data.Maybe (fromMaybe) diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/BaseTypes.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/BaseTypes.hs index f6cda520d3b..fbb76653863 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/BaseTypes.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/BaseTypes.hs @@ -155,7 +155,7 @@ import Data.Aeson.Types (Pair) import qualified Data.Binary.Put as B import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.Fixed as FP (Fixed, HasResolution, resolution) import Data.Functor.Identity (Identity) import Data.Map.Strict (Map) diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/CertState.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/CertState.hs index df4c652f51d..3d58460ca27 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/CertState.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/CertState.hs @@ -104,7 +104,7 @@ import qualified Cardano.Ledger.UMap as UM import Control.DeepSeq (NFData (..)) import Control.Monad.Trans import Data.Aeson (KeyValue, ToJSON (..), object, pairs, (.=)) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.Foldable as F import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/Core/PParams.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/Core/PParams.hs index a4c39376323..d4b8014d05f 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/Core/PParams.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/Core/PParams.hs @@ -96,7 +96,7 @@ import Control.DeepSeq (NFData) import Control.Monad.Identity (Identity) import Data.Aeson (FromJSON, ToJSON) import Data.Data (Typeable) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Kind (Type) import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/Credential.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/Credential.hs index a08fd05e7d9..e1d178f5358 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/Credential.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/Credential.hs @@ -64,7 +64,7 @@ import Data.Aeson ( ) import qualified Data.Aeson as Aeson import Data.Aeson.Types (toJSONKeyText) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Foldable (asum) import qualified Data.Text as T import Data.Typeable (Typeable) diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/EpochBoundary.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/EpochBoundary.hs index 121d874cbbd..dab2f5cb758 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/EpochBoundary.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/EpochBoundary.hs @@ -75,7 +75,7 @@ import Cardano.Ledger.Val ((<+>)) import Control.DeepSeq (NFData) import Control.Monad.Trans (lift) import Data.Aeson (KeyValue, ToJSON (..), object, pairs, (.=)) -import Data.Default.Class (Default, def) +import Data.Default (Default, def) import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Ratio ((%)) diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/Keys/Internal.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/Keys/Internal.hs index bc66bb29a17..a8e731424cf 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/Keys/Internal.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/Keys/Internal.hs @@ -95,7 +95,7 @@ import Control.DeepSeq (NFData) import Data.Aeson (FromJSON (..), FromJSONKey, ToJSON (..), ToJSONKey, (.:), (.=)) import qualified Data.Aeson as Aeson import Data.Coerce (Coercible, coerce) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Kind (Type) import Data.Map.Strict (Map) import Data.Typeable (Typeable) diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/Orphans.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/Orphans.hs index a0189a246a9..b01e080957c 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/Orphans.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/Orphans.hs @@ -17,7 +17,7 @@ import Data.Aeson import qualified Data.ByteString as Long (ByteString, empty) import qualified Data.ByteString.Lazy as Lazy (ByteString, empty) import qualified Data.ByteString.Short as Short (ShortByteString, empty, pack) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Fixed (Fixed (..)) import Data.IP (IPv4, IPv6) import Data.Proxy @@ -83,6 +83,3 @@ instance HS.HashAlgorithm h => Default (Hash h b) where UnsafeHash $ Short.pack $ replicate (fromIntegral (Hash.sizeHash (Proxy :: Proxy h))) 0 - -instance Default Bool where - def = False diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/PoolParams.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/PoolParams.hs index 5ac2d17e6b9..ef14ef0a405 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/PoolParams.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/PoolParams.hs @@ -56,7 +56,7 @@ import Data.Aeson.Types (Parser, explicitParseField) import Data.ByteString (ByteString) import qualified Data.ByteString.Base16 as B16 import qualified Data.ByteString.Char8 as Char8 -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Foldable (asum) import Data.IP (IPv4, IPv6) import Data.Proxy (Proxy (..)) diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/SafeHash.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/SafeHash.hs index 0894f809b5e..368a797d85e 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/SafeHash.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/SafeHash.hs @@ -70,7 +70,7 @@ import Data.ByteString (ByteString) import qualified Data.ByteString as BS (length) import Data.ByteString.Short (ShortByteString, fromShort) import qualified Data.ByteString.Short as SBS (length) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Foldable (fold) import Data.Typeable import NoThunks.Class (NoThunks (..)) diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/Tools.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/Tools.hs index b461ea40d19..17f2dc80b4f 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/Tools.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/Tools.hs @@ -46,7 +46,7 @@ import Cardano.Ledger.UTxO (EraUTxO (..), UTxO (..)) import Data.Bits (Bits (..), shiftR) import Data.ByteString (ByteString) import qualified Data.ByteString as BS -import Data.Default.Class (def) +import Data.Default (def) import qualified Data.Map.Strict as Map import Data.Maybe (mapMaybe) import Data.Proxy diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/UTxO.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/UTxO.hs index b9ea2ecc650..455ed40f315 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/UTxO.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/UTxO.hs @@ -65,7 +65,7 @@ import Control.DeepSeq (NFData) import Control.Monad ((<$!>)) import Data.Aeson (ToJSON) import Data.Coerce (coerce) -import Data.Default.Class (Default) +import Data.Default (Default) import Data.Foldable (foldMap', toList) import Data.Kind (Type) import qualified Data.Map.Strict as Map diff --git a/libs/cardano-ledger-core/testlib/Test/Cardano/Ledger/Core/Binary.hs b/libs/cardano-ledger-core/testlib/Test/Cardano/Ledger/Core/Binary.hs index 759ce45dba8..35f2911b036 100644 --- a/libs/cardano-ledger-core/testlib/Test/Cardano/Ledger/Core/Binary.hs +++ b/libs/cardano-ledger-core/testlib/Test/Cardano/Ledger/Core/Binary.hs @@ -10,7 +10,7 @@ module Test.Cardano.Ledger.Core.Binary where import Cardano.Ledger.Core import Cardano.Ledger.MemoBytes (EqRaw (eqRaw)) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Prettyprinter as Pretty import Test.Cardano.Ledger.Binary.RoundTrip import Test.Cardano.Ledger.Common diff --git a/libs/cardano-ledger-test/bench/Bench/Cardano/Ledger/StakeDistr.hs b/libs/cardano-ledger-test/bench/Bench/Cardano/Ledger/StakeDistr.hs index 7aebe9d4bde..1790189db0c 100644 --- a/libs/cardano-ledger-test/bench/Bench/Cardano/Ledger/StakeDistr.hs +++ b/libs/cardano-ledger-test/bench/Bench/Cardano/Ledger/StakeDistr.hs @@ -78,7 +78,7 @@ import Control.State.Transition.Extended ( import Criterion (Benchmark, bench, bgroup, env, nf, whnf) import qualified Data.Aeson as Aeson (eitherDecode) import Data.ByteString.Lazy as Lazy (readFile) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.Map.Strict as Map import Data.Maybe.Strict (StrictMaybe (..)) import Data.Text (pack) diff --git a/libs/cardano-ledger-test/cardano-ledger-test.cabal b/libs/cardano-ledger-test/cardano-ledger-test.cabal index 24fb6aa62ac..fe4705e5c6e 100644 --- a/libs/cardano-ledger-test/cardano-ledger-test.cabal +++ b/libs/cardano-ledger-test/cardano-ledger-test.cabal @@ -145,7 +145,7 @@ library haskeline, hashable, vector-map, - data-default-class, + data-default, microlens, mtl, nothunks, @@ -182,7 +182,7 @@ test-suite cardano-ledger-test base, cardano-ledger-test, tasty, - data-default-class, + data-default, cardano-ledger-core:testlib benchmark bench @@ -222,7 +222,7 @@ benchmark bench vector-map, containers, criterion, - data-default-class, + data-default, deepseq, QuickCheck, cardano-ledger-shelley:{cardano-ledger-shelley, testlib}, diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Alonzo/Tools.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Alonzo/Tools.hs index 21d29c826e5..bc3dc9ae6c4 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Alonzo/Tools.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Alonzo/Tools.hs @@ -34,7 +34,7 @@ import Cardano.Slotting.EpochInfo (EpochInfo, fixedEpochInfo) import Cardano.Slotting.Slot (EpochSize (..), SlotNo (..)) import Cardano.Slotting.Time (SystemStart (..), mkSlotLength) import Control.State.Transition.Extended (STS (BaseM, Environment, Signal, State), TRC (TRC)) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Map (Map) import qualified Data.Map.Strict as Map import qualified Data.Sequence.Strict as SSeq diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Classes.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Classes.hs index 44029f523ea..3fe65b1b0bc 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Classes.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Classes.hs @@ -34,7 +34,7 @@ import Cardano.Ledger.Shelley.TxOut (ShelleyTxOut (..)) import Cardano.Ledger.TxIn (TxIn) import Cardano.Ledger.UTxO (ScriptsNeeded, UTxO (..)) import Cardano.Ledger.Val (Val (coin, modifyCoin, (<+>))) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.List as List import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Examples.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Examples.hs index bb73a59af7d..7c24937610a 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Examples.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Examples.hs @@ -25,7 +25,7 @@ import Cardano.Ledger.Keys (GenDelegPair) import Control.DeepSeq (deepseq) import Control.Exception (ErrorCall (..)) import Control.Monad (when) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Map (Map) import Data.Ratio ((%)) import qualified Debug.Trace as Debug diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/CertState.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/CertState.hs index 38273e0602c..b535f51362e 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/CertState.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/CertState.hs @@ -14,7 +14,7 @@ import Cardano.Ledger.Keys (GenDelegPair (..), KeyHash, KeyRole (..), asWitness, import Cardano.Ledger.Shelley.LedgerState (availableAfterMIR) import Cardano.Ledger.Shelley.TxCert (MIRPot (..)) import Control.Monad (when) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Lens.Micro import Test.Cardano.Ledger.Constrained.Ast import Test.Cardano.Ledger.Constrained.Classes (OrdCond (..)) diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/Certs.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/Certs.hs index e6f8abe465a..0a8c2fed61e 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/Certs.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/Certs.hs @@ -39,7 +39,7 @@ import Cardano.Ledger.Shelley.TxCert ( ShelleyTxCert (..), ) import Control.Monad (when) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.Map (Map) import qualified Data.Map.Strict as Map import Data.Maybe.Strict (StrictMaybe (..)) diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/LedgerState.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/LedgerState.hs index abaec6125bf..428608696b3 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/LedgerState.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/LedgerState.hs @@ -40,7 +40,7 @@ import Cardano.Ledger.Core ( import Cardano.Ledger.DRep (drepDepositL) import Cardano.Ledger.Shelley.Governance (FuturePParams (..)) import Control.Monad (when) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.List as List import qualified Data.Map.Strict as Map import Data.Maybe.Strict (StrictMaybe (..)) diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/NewEpochState.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/NewEpochState.hs index a973b98b802..1965c402663 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/NewEpochState.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/NewEpochState.hs @@ -14,7 +14,7 @@ import Cardano.Ledger.PoolDistr (PoolDistr (..)) import Cardano.Ledger.Shelley.Core (EraGov) import qualified Cardano.Ledger.UMap as UMap import Control.Monad (when) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.Map.Strict as Map import qualified Data.VMap as VMap import Test.Cardano.Ledger.Constrained.Ast diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/Tx.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/Tx.hs index 44aad6b11cb..9cfffb182ea 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/Tx.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/Tx.hs @@ -52,7 +52,7 @@ import Cardano.Ledger.UTxO (EraUTxO (..), ScriptsProvided (..), UTxO (..)) import Cardano.Ledger.Val (Val (..), inject) import Control.Monad (when) import Control.State.Transition.Extended (STS (..), TRC (..)) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.Foldable as F (foldl', toList) import qualified Data.List as List import Data.Map (Map) diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/TxOut.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/TxOut.hs index fe601b36c6d..73a345fc166 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/TxOut.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/TxOut.hs @@ -35,7 +35,7 @@ import Cardano.Ledger.Mary.Value ( import Cardano.Ledger.Plutus.Data (Data (..), Datum (..), dataToBinaryData, hashData) import Cardano.Ledger.Shelley.TxOut (ShelleyTxOut (..)) import Control.Monad (when) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.Int (Int64) import qualified Data.Map.Strict as Map import Data.Maybe.Strict (StrictMaybe (..), maybeToStrictMaybe, strictMaybeToMaybe) diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/UTxO.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/UTxO.hs index 974db1c9bfa..68640160e05 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/UTxO.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/UTxO.hs @@ -9,7 +9,7 @@ module Test.Cardano.Ledger.Constrained.Preds.UTxO where import Control.Monad (when) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.Map.Strict as Map import Test.Cardano.Ledger.Constrained.Ast import Test.Cardano.Ledger.Constrained.Env diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/Universes.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/Universes.hs index 07557b9381d..8b0b2c0e494 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/Universes.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Preds/Universes.hs @@ -51,7 +51,7 @@ import Cardano.Ledger.Mary.Value ( ) import Cardano.Ledger.Plutus.Data (Data (..), Datum (..), dataToBinaryData, hashData) import Cardano.Ledger.Shelley.TxOut (ShelleyTxOut (..)) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.List as List import Data.Map (Map) import qualified Data.Map.Strict as Map diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Trace/Pipeline.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Trace/Pipeline.hs index 9fb42961266..f842d0da487 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Trace/Pipeline.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Trace/Pipeline.hs @@ -21,7 +21,7 @@ import Control.State.Transition.Extended ( TRC (..), applySTS, ) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.HashSet (HashSet) import qualified Data.HashSet as HashSet import Data.List.NonEmpty (NonEmpty) diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Trace/TraceMonad.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Trace/TraceMonad.hs index 034c9c9f388..50199daebc4 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Trace/TraceMonad.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Trace/TraceMonad.hs @@ -30,7 +30,7 @@ import Control.Monad.Trans.Except import Control.Monad.Trans.Reader (runReaderT) import Control.Monad.Trans.State.Strict hiding (State) import Control.State.Transition.Extended (IRC (..), STS, TRC (..)) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.Foldable (toList) import qualified Data.Foldable as Fold (toList) import Data.Function (on) diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/TypeRep.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/TypeRep.hs index 5c99c30c749..6a885298134 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/TypeRep.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/TypeRep.hs @@ -109,7 +109,7 @@ import Cardano.Ledger.Val (Val ((<+>))) import Control.Monad.Identity (Identity) import Data.ByteString (ByteString) import qualified Data.ByteString as BS -import Data.Default.Class (def) +import Data.Default (def) import qualified Data.List as List import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Vars.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Vars.hs index ac8ffbdf3e0..523dd1ffc95 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Vars.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Vars.hs @@ -97,7 +97,7 @@ import Cardano.Ledger.UMap (compactCoinOrError, fromCompact, ptrMap, rdPairMap, import Cardano.Ledger.UTxO (UTxO (..)) import Cardano.Ledger.Val (Val (..)) import Control.Arrow (first) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.Foldable (toList) import qualified Data.Foldable as F import Data.Functor.Identity (Identity) diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/AlonzoBBODY.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/AlonzoBBODY.hs index dc902460c0d..d1f739c078d 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/AlonzoBBODY.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/AlonzoBBODY.hs @@ -79,7 +79,7 @@ import Cardano.Ledger.Val (inject, (<->)) import Cardano.Slotting.Slot (SlotNo (..)) import Control.State.Transition.Extended (STS (..)) import qualified Data.ByteString as BS (replicate) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import qualified Data.Map.Strict as Map import Data.Maybe (fromJust) import qualified Data.Sequence.Strict as StrictSeq diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/AlonzoValidTxUTXOW.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/AlonzoValidTxUTXOW.hs index 018d049775a..0093ad60cf6 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/AlonzoValidTxUTXOW.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/AlonzoValidTxUTXOW.hs @@ -48,7 +48,7 @@ import Cardano.Ledger.TxIn (TxIn (..)) import Cardano.Ledger.Val (Val (..), inject, (<+>)) import Cardano.Slotting.Slot (SlotNo (..)) import Control.State.Transition.Extended hiding (Assertion) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.List.NonEmpty (NonEmpty) import qualified Data.Map.Strict as Map import GHC.Stack diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/BabbageFeatures.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/BabbageFeatures.hs index 8b940fa90c1..7b61fb16705 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/BabbageFeatures.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/BabbageFeatures.hs @@ -80,7 +80,7 @@ import Cardano.Ledger.Val (inject) import Control.State.Transition.Extended hiding (Assertion) import qualified Data.ByteString as BS import Data.ByteString.Short as SBS (pack) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Foldable (toList) import Data.List.NonEmpty (NonEmpty ((:|))) import qualified Data.Map.Strict as Map diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/STSTestUtils.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/STSTestUtils.hs index eb47eafd547..b4823cb33c0 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/STSTestUtils.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/STSTestUtils.hs @@ -80,7 +80,7 @@ import Cardano.Ledger.TxIn (TxIn (..)) import Cardano.Ledger.Val (inject) import Cardano.Slotting.Slot (SlotNo (..)) import Control.State.Transition.Extended hiding (Assertion) -import Data.Default.Class (Default (..)) +import Data.Default (Default (..)) import Data.Foldable (toList) import Data.List.NonEmpty (NonEmpty ((:|))) import qualified Data.Map.Strict as Map diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/AggPropTests.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/AggPropTests.hs index 42c32d29d27..9574f033e8f 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/AggPropTests.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/AggPropTests.hs @@ -24,7 +24,7 @@ import Cardano.Ledger.UMap (UView (RewDepUView), depositMap, domain, fromCompact import Cardano.Ledger.UTxO (UTxO (..)) import Cardano.Ledger.Val ((<+>)) import Control.State.Transition (STS (..)) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.Foldable as F (foldl') import qualified Data.Map as Map import qualified Data.Set as Set diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Functions.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Functions.hs index c18dc88d476..45517dd2b86 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Functions.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Functions.hs @@ -55,7 +55,7 @@ import Cardano.Ledger.UTxO (EraUTxO (..), UTxO (..), coinBalance, unScriptsProvi import Cardano.Ledger.Val (Val ((<+>), (<->)), inject) import Cardano.Slotting.EpochInfo.API (epochInfoSize) import Control.Monad.Reader (runReader) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.Foldable as Fold (fold, toList) import qualified Data.List as List import Data.Map (Map, keysSet, restrictKeys) diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/GenState.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/GenState.hs index aad413a2bc1..9026ea97437 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/GenState.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/GenState.hs @@ -133,7 +133,7 @@ import Control.Monad (join, replicateM, when, zipWithM_) import Control.Monad.Trans.Class (MonadTrans (lift)) import Control.Monad.Trans.RWS.Strict (RWST (..), ask, asks, get, gets, modify) import Control.SetAlgebra (eval, (⨃)) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.Map (Map) import qualified Data.Map.Strict as Map import Data.Maybe.Strict (StrictMaybe (SJust, SNothing)) diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/ModelState.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/ModelState.hs index 24dca115239..f19c689d1a4 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/ModelState.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/ModelState.hs @@ -77,7 +77,7 @@ import Cardano.Ledger.TxIn (TxId (..), TxIn (..)) import qualified Cardano.Ledger.UMap as UM import Cardano.Ledger.UTxO (UTxO (..)) import Control.Monad.Trans () -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import qualified Data.Maybe as Maybe diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Properties.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Properties.hs index bb5c104ed44..c05835c6624 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Properties.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Properties.hs @@ -31,7 +31,7 @@ import Cardano.Slotting.Slot (SlotNo (..)) import Control.Monad.Trans.RWS.Strict (gets) import Control.State.Transition.Extended hiding (Assertion) import Data.Coerce (coerce) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.Map.Strict as Map import Test.Cardano.Ledger.Alonzo.Serialisation.Generators () import Test.Cardano.Ledger.Babbage.Arbitrary () diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Trace.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Trace.hs index b33ad75250c..eeb6fddaf3f 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Trace.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Trace.hs @@ -57,7 +57,7 @@ import Control.Monad.Trans.RWS.Strict (get, gets) import Control.Monad.Trans.Reader (ReaderT (..)) import qualified Control.State.Transition as STS import Control.State.Transition.Extended (IRC (), STS (..), TRC (..)) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import qualified Data.Foldable as Fold import Data.Functor.Identity (Identity (runIdentity)) import Data.IORef (IORef, newIORef, readIORef, writeIORef) diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/NoThunks.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/NoThunks.hs index 46580f2f7db..be1ca21fd09 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/NoThunks.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/NoThunks.hs @@ -9,7 +9,7 @@ module Test.Cardano.Ledger.NoThunks ( ) where import Control.State.Transition.Extended (STS) -import Data.Default.Class (def) +import Data.Default (def) import Test.Cardano.Ledger.Generic.GenState (GenSize) import Test.Cardano.Ledger.Generic.MockChain (MOCKCHAIN, noThunksGen) import Test.Cardano.Ledger.Generic.Proof (Proof (..), Reflect) diff --git a/libs/cardano-ledger-test/test/Tests.hs b/libs/cardano-ledger-test/test/Tests.hs index 812ef52a72f..97da188a1d3 100644 --- a/libs/cardano-ledger-test/test/Tests.hs +++ b/libs/cardano-ledger-test/test/Tests.hs @@ -7,7 +7,7 @@ module Main where -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import System.Environment (lookupEnv) import System.IO (hSetEncoding, stdout, utf8) import qualified Test.Cardano.Ledger.Alonzo.Tools as Tools diff --git a/libs/ledger-state/ledger-state.cabal b/libs/ledger-state/ledger-state.cabal index fa89567896e..17969f0a9cb 100644 --- a/libs/ledger-state/ledger-state.cabal +++ b/libs/ledger-state/ledger-state.cabal @@ -43,7 +43,7 @@ library cardano-ledger-shelley, conduit, containers, - data-default-class, + data-default, vector-map, deepseq, foldl, diff --git a/libs/ledger-state/src/Cardano/Ledger/State/Query.hs b/libs/ledger-state/src/Cardano/Ledger/State/Query.hs index 8f43db7d7ca..0fe6e8ddde2 100644 --- a/libs/ledger-state/src/Cardano/Ledger/State/Query.hs +++ b/libs/ledger-state/src/Cardano/Ledger/State/Query.hs @@ -32,7 +32,7 @@ import Control.Monad import Control.Monad.Trans.Reader import Data.Conduit.Internal (zipSources) import Data.Conduit.List (sourceList) -import Data.Default.Class (def) +import Data.Default (def) import Data.Functor import qualified Data.IntMap.Strict as IntMap import qualified Data.Map.Strict as Map diff --git a/libs/small-steps/small-steps.cabal b/libs/small-steps/small-steps.cabal index 015d42c0d80..5b2a286c3dd 100644 --- a/libs/small-steps/small-steps.cabal +++ b/libs/small-steps/small-steps.cabal @@ -37,7 +37,7 @@ library aeson, base >=4.14 && <5, containers, - data-default-class, + data-default, free, mtl, nothunks, diff --git a/libs/small-steps/src/Control/State/Transition/Extended.hs b/libs/small-steps/src/Control/State/Transition/Extended.hs index e7396f06778..a65ef1612cc 100644 --- a/libs/small-steps/src/Control/State/Transition/Extended.hs +++ b/libs/small-steps/src/Control/State/Transition/Extended.hs @@ -99,7 +99,7 @@ import Control.Monad.Trans.State.Strict (StateT (..)) import Data.Bifunctor (Bifunctor (second), first) import Data.Coerce (Coercible, coerce) import Data.Data (Data, Typeable) -import Data.Default.Class (Default, def) +import Data.Default (Default, def) import Data.Foldable as F (find, toList, traverse_) import Data.Functor (($>), (<&>)) import Data.Kind (Type) From 632b9beb10c1b4b491084a688e2e0054d42df200 Mon Sep 17 00:00:00 2001 From: Alexey Kuleshevich Date: Thu, 31 Oct 2024 08:35:37 -0600 Subject: [PATCH 3/4] Remove config for non-existent packages --- flake.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/flake.nix b/flake.nix index 62ad6a97e9e..dcc4f692cf1 100644 --- a/flake.nix +++ b/flake.nix @@ -132,10 +132,8 @@ # uncomment if necessary when profiling packages.byron-spec-chain.configureFlags = ["--ghc-option=-Werror"]; packages.byron-spec-ledger.configureFlags = ["--ghc-option=-Werror"]; - packages.delegation.configureFlags = ["--ghc-option=-Werror"]; packages.non-integral.configureFlags = ["--ghc-option=-Werror"]; packages.cardano-ledger-shelley.configureFlags = ["--ghc-option=-Werror"]; - packages.cardano-ledger-shelley-ma.configureFlags = ["--ghc-option=-Werror"]; packages.cardano-ledger-shelley-ma-test.configureFlags = ["--ghc-option=-Werror"]; packages.small-steps.configureFlags = ["--ghc-option=-Werror"]; packages.cardano-ledger-byron = { From 0284a2fdbe9ed6dd3c2572640bd35789e2dca26f Mon Sep 17 00:00:00 2001 From: Alexey Kuleshevich Date: Thu, 31 Oct 2024 09:00:20 -0600 Subject: [PATCH 4/4] Cleanup: remove qualified import of Crypto --- .../Ledger/Shelley/Examples/PoolLifetime.hs | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/PoolLifetime.hs b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/PoolLifetime.hs index eabaa877110..f633bae498b 100644 --- a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/PoolLifetime.hs +++ b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/PoolLifetime.hs @@ -42,7 +42,7 @@ import Cardano.Ledger.Coin ( ) import Cardano.Ledger.Compactible import Cardano.Ledger.Credential (Credential, Ptr (..)) -import qualified Cardano.Ledger.Crypto as Cr +import Cardano.Ledger.Crypto import qualified Cardano.Ledger.EpochBoundary as EB import Cardano.Ledger.Keys (KeyRole (..), asWitness, coerceKeyRole) import Cardano.Ledger.PoolDistr ( @@ -154,7 +154,7 @@ mkStake :: EB.Stake c mkStake = EB.Stake . GHC.Exts.fromList . map (fmap toCompactCoinError) -initUTxO :: Cr.Crypto c => UTxO (ShelleyEra c) +initUTxO :: Crypto c => UTxO (ShelleyEra c) initUTxO = genesisCoins genesisId @@ -162,7 +162,7 @@ initUTxO = , ShelleyTxOut Cast.bobAddr (Val.inject bobInitCoin) ] -initStPoolLifetime :: forall c. Cr.Crypto c => ChainState (ShelleyEra c) +initStPoolLifetime :: forall c. Crypto c => ChainState (ShelleyEra c) initStPoolLifetime = initSt initUTxO -- @@ -185,7 +185,7 @@ dariaMIR = Coin 99 feeTx1 :: Coin feeTx1 = Coin 3 -txbodyEx1 :: Cr.Crypto c => ShelleyTxBody (ShelleyEra c) +txbodyEx1 :: Crypto c => ShelleyTxBody (ShelleyEra c) txbodyEx1 = ShelleyTxBody (Set.fromList [TxIn genesisId minBound]) @@ -292,7 +292,7 @@ aliceCoinEx2Ptr = aliceCoinEx1 <-> (aliceCoinEx2Base <+> feeTx2) -- | The transaction delegates Alice's and Bob's stake to Alice's pool. -- Additionally, we split Alice's ADA between a base address and a pointer address. -txbodyEx2 :: forall c. Cr.Crypto c => ShelleyTxBody (ShelleyEra c) +txbodyEx2 :: forall c. Crypto c => ShelleyTxBody (ShelleyEra c) txbodyEx2 = ShelleyTxBody { stbInputs = Set.fromList [TxIn (txIdTxBody (txbodyEx1 @c)) minBound] @@ -420,7 +420,7 @@ blockEx3 = 0 (mkOCert (coreNodeKeysBySchedule @(ShelleyEra c) ppEx 110) 0 (KESPeriod 0)) -snapEx3 :: Cr.Crypto c => EB.SnapShot c +snapEx3 :: Crypto c => EB.SnapShot c snapEx3 = EB.SnapShot { EB.ssStake = @@ -463,7 +463,7 @@ feeTx4 = Coin 5 aliceCoinEx4Base :: Coin aliceCoinEx4Base = aliceCoinEx2Base <-> feeTx4 -txbodyEx4 :: forall c. Cr.Crypto c => ShelleyTxBody (ShelleyEra c) +txbodyEx4 :: forall c. Crypto c => ShelleyTxBody (ShelleyEra c) txbodyEx4 = ShelleyTxBody { stbInputs = Set.fromList [TxIn (txIdTxBody txbodyEx2) minBound] @@ -563,7 +563,7 @@ blockEx5 = 10 (mkOCert (coreNodeKeysBySchedule @(ShelleyEra c) ppEx 220) 1 (KESPeriod 10)) -snapEx5 :: forall c. Cr.Crypto c => EB.SnapShot c +snapEx5 :: forall c. Crypto c => EB.SnapShot c snapEx5 = EB.SnapShot { EB.ssStake = @@ -580,7 +580,7 @@ snapEx5 = , EB.ssPoolParams = [(aikColdKeyHash Cast.alicePoolKeys, Cast.alicePoolParams)] } -pdEx5 :: forall c. Cr.Crypto c => PoolDistr c +pdEx5 :: forall c. Crypto c => PoolDistr c pdEx5 = PoolDistr ( Map.singleton @@ -752,7 +752,7 @@ alicePerfEx8 = likelihood blocks t (epochSize $ EpochNo 3) relativeStake = fromRational (stake % tot) f = activeSlotCoeff testGlobals -nonMyopicEx8 :: forall c. Cr.Crypto c => NonMyopic c +nonMyopicEx8 :: forall c. Crypto c => NonMyopic c nonMyopicEx8 = NonMyopic (Map.singleton (aikColdKeyHash Cast.alicePoolKeys) alicePerfEx8) @@ -762,7 +762,7 @@ pulserEx8 :: forall c. ExMock c => PulsingRewUpdate c pulserEx8 = makeCompletedPulser (BlocksMade $ Map.singleton (aikColdKeyHash Cast.alicePoolKeys) 1) expectedStEx7 -rewardUpdateEx8 :: forall c. Cr.Crypto c => RewardUpdate c +rewardUpdateEx8 :: forall c. Crypto c => RewardUpdate c rewardUpdateEx8 = RewardUpdate { deltaT = deltaT8 @@ -822,7 +822,7 @@ blockEx9 = 20 (mkOCert (coreNodeKeysBySchedule @(ShelleyEra c) ppEx 410) 2 (KESPeriod 20)) -snapEx9 :: forall c. Cr.Crypto c => EB.SnapShot c +snapEx9 :: forall c. Crypto c => EB.SnapShot c snapEx9 = snapEx5 { EB.ssStake = @@ -863,7 +863,7 @@ bobAda10 = <+> Coin 7 <-> feeTx10 -txbodyEx10 :: Cr.Crypto c => ShelleyTxBody (ShelleyEra c) +txbodyEx10 :: Crypto c => ShelleyTxBody (ShelleyEra c) txbodyEx10 = ShelleyTxBody (Set.fromList [mkTxInPartial genesisId 1]) @@ -929,7 +929,7 @@ aliceCoinEx11Ptr = aliceCoinEx4Base <-> feeTx11 aliceRetireEpoch :: EpochNo aliceRetireEpoch = EpochNo 5 -txbodyEx11 :: forall c. Cr.Crypto c => ShelleyTxBody (ShelleyEra c) +txbodyEx11 :: forall c. Crypto c => ShelleyTxBody (ShelleyEra c) txbodyEx11 = ShelleyTxBody (Set.fromList [TxIn (txIdTxBody txbodyEx4) minBound]) @@ -973,7 +973,7 @@ blockEx11 = reserves12 :: Coin reserves12 = addDeltaCoin reserves7 deltaR8 -alicePerfEx11 :: forall c. Cr.Crypto c => Likelihood +alicePerfEx11 :: forall c. Crypto c => Likelihood alicePerfEx11 = applyDecay decayFactor alicePerfEx8 <> epoch4Likelihood where epoch4Likelihood = likelihood blocks t (epochSize $ EpochNo 4) @@ -985,7 +985,7 @@ alicePerfEx11 = applyDecay decayFactor alicePerfEx8 <> epoch4Likelihood Coin supply = maxLLSupply <-> reserves12 f = activeSlotCoeff testGlobals -nonMyopicEx11 :: forall c. Cr.Crypto c => NonMyopic c +nonMyopicEx11 :: forall c. Crypto c => NonMyopic c nonMyopicEx11 = NonMyopic (Map.singleton (aikColdKeyHash Cast.alicePoolKeys) (alicePerfEx11 @c)) @@ -994,7 +994,7 @@ nonMyopicEx11 = pulserEx11 :: forall c. ExMock c => PulsingRewUpdate c pulserEx11 = makeCompletedPulser (BlocksMade mempty) expectedStEx10 -rewardUpdateEx11 :: forall c. Cr.Crypto c => RewardUpdate c +rewardUpdateEx11 :: forall c. Crypto c => RewardUpdate c rewardUpdateEx11 = RewardUpdate { deltaT = DeltaCoin 0 @@ -1044,7 +1044,7 @@ blockEx12 = 25 (mkOCert (coreNodeKeysBySchedule @(ShelleyEra c) ppEx 510) 3 (KESPeriod 25)) -snapEx12 :: forall c. Cr.Crypto c => EB.SnapShot c +snapEx12 :: forall c. Crypto c => EB.SnapShot c snapEx12 = snapEx9 { EB.ssStake =