Skip to content

Commit

Permalink
Merge pull request #4734 from IntersectMBO/lehins/update-index-state
Browse files Browse the repository at this point in the history
* Update index state
* Use `data-default` instead of `data-default-class`
* Minor cleanups
  • Loading branch information
Lucsanszky authored Oct 31, 2024
2 parents f544890 + 0284a2f commit cfc86bd
Show file tree
Hide file tree
Showing 130 changed files with 176 additions and 181 deletions.
4 changes: 2 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion eras/allegra/impl/cardano-ledger-allegra.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion eras/alonzo/impl/cardano-ledger-alonzo.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ library
cardano-slotting,
cardano-strict-containers,
containers,
data-default-class,
data-default,
deepseq,
mtl,
microlens,
Expand Down
2 changes: 1 addition & 1 deletion eras/alonzo/impl/src/Cardano/Ledger/Alonzo/PParams.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Translation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ((^.))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion eras/alonzo/test-suite/cardano-ledger-alonzo-test.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ library
cardano-strict-containers,
cborg,
containers,
data-default-class,
data-default,
microlens,
plutus-ledger-api >=1.33,
QuickCheck,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion eras/babbage/impl/cardano-ledger-babbage.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down
2 changes: 1 addition & 1 deletion eras/babbage/test-suite/cardano-ledger-babbage-test.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ library
cardano-strict-containers,
cardano-slotting,
containers,
data-default-class,
data-default,
microlens,
QuickCheck,
time,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions eras/conway/impl/cardano-ledger-conway.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -161,7 +161,7 @@ library testlib
cardano-strict-containers,
containers,
cuddle >=0.3.2,
data-default-class,
data-default,
deepseq,
FailT,
generic-random,
Expand Down Expand Up @@ -244,7 +244,7 @@ test-suite tests
cardano-slotting:testlib,
cardano-strict-containers,
containers,
data-default-class,
data-default,
microlens,
plutus-ledger-api,
testlib,
Expand Down
2 changes: 1 addition & 1 deletion eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ((:|)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion eras/conway/impl/src/Cardano/Ledger/Conway/PParams.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion eras/conway/impl/src/Cardano/Ledger/Conway/Translation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (..))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ((&), (.~), (^.))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion eras/conway/test-suite/cardano-ledger-conway-test.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (..))
Expand Down
2 changes: 1 addition & 1 deletion eras/mary/impl/cardano-ledger-mary.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion eras/mary/impl/test/Test/Cardano/Ledger/Mary/BinarySpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 (..))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ test-suite cardano-ledger-shelley-ma-test
cardano-slotting,
cborg,
containers,
data-default-class,
data-default,
deepseq,
groups,
mtl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions eras/shelley/impl/cardano-ledger-shelley.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ library
cardano-slotting,
vector-map ^>=1.1,
containers,
data-default-class,
data-default,
deepseq,
groups,
heapwords,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading

0 comments on commit cfc86bd

Please sign in to comment.