Skip to content

Commit

Permalink
Merge pull request #4841 from IntersectMBO/lehins/remove-usage-of-car…
Browse files Browse the repository at this point in the history
…dano-prelude

Drop dependency on `cardano-prelude`
  • Loading branch information
lehins authored Jan 22, 2025
2 parents 97266f3 + 8105bb2 commit 32106b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions libs/cardano-ledger-core/cardano-ledger-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,14 @@ 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,
cardano-crypto-wrapper,
cardano-data ^>=1.2,
cardano-ledger-binary ^>=1.6,
cardano-ledger-byron,
cardano-prelude,
cardano-slotting,
cardano-strict-containers,
containers,
Expand Down
4 changes: 2 additions & 2 deletions libs/cardano-ledger-core/src/Cardano/Ledger/Address.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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 #-}
Expand Down

0 comments on commit 32106b9

Please sign in to comment.