diff --git a/libs/cardano-ledger-core/cardano-ledger-core.cabal b/libs/cardano-ledger-core/cardano-ledger-core.cabal index 8c4566b48ca..4af07250ca9 100644 --- a/libs/cardano-ledger-core/cardano-ledger-core.cabal +++ b/libs/cardano-ledger-core/cardano-ledger-core.cabal @@ -96,7 +96,7 @@ library base16-bytestring, base64-bytestring, binary, - bytestring, + bytestring >=0.10 && <0.11.3 || >=0.11.4, cardano-crypto, cardano-crypto-class ^>=2.2, cardano-crypto-praos ^>=2.2, @@ -104,7 +104,6 @@ library cardano-data ^>=1.2, cardano-ledger-binary ^>=1.6, cardano-ledger-byron, - cardano-prelude, cardano-slotting, cardano-strict-containers, containers, diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/Address.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/Address.hs index e6702a1ebf3..c6fb48293d2 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/Address.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/Address.hs @@ -90,7 +90,6 @@ import Cardano.Ledger.Credential ( ) import Cardano.Ledger.Hashes (ScriptHash (..)) import Cardano.Ledger.Keys (KeyHash (..), KeyRole (..)) -import Cardano.Prelude (unsafeShortByteStringIndex) import Control.DeepSeq (NFData) import Control.Monad (guard, unless, when) import Control.Monad.Trans.Fail (FailT (..), runFail) @@ -109,6 +108,7 @@ import qualified Data.ByteString as BS 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 Data.ByteString.Short.Internal as SBS (unsafeIndex) import qualified Data.ByteString.Unsafe as BS (unsafeDrop, unsafeIndex, unsafeTake) import Data.Default (Default (..)) import Data.Function (fix) @@ -466,7 +466,7 @@ class AddressBuffer b where instance AddressBuffer ShortByteString where bufLength = SBS.length {-# INLINE bufLength #-} - bufUnsafeIndex = unsafeShortByteStringIndex + bufUnsafeIndex = SBS.unsafeIndex {-# INLINE bufUnsafeIndex #-} bufToByteString = SBS.fromShort {-# INLINE bufToByteString #-}