From 7f6f0d09636a6d3a9f0ab182402a9d5f46c1025b Mon Sep 17 00:00:00 2001 From: Joris Dral Date: Tue, 23 Apr 2024 16:10:26 +0200 Subject: [PATCH] TOSQUASH --- fs-api/bench/Main.hs | 4 ++-- fs-api/fs-api.cabal | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs-api/bench/Main.hs b/fs-api/bench/Main.hs index 3eb716e..07bb58d 100644 --- a/fs-api/bench/Main.hs +++ b/fs-api/bench/Main.hs @@ -23,10 +23,10 @@ import Data.List (unfoldr) import Data.Primitive.ByteArray import Data.Word (Word64) import Foreign (withForeignPtr) +import qualified GHC.Exts as GHC import qualified GHC.ForeignPtr as GHC import GHC.Generics (Generic) import qualified GHC.IO as GHC -import qualified GHC.Ptr as GHC import GHC.Stack (HasCallStack) import qualified System.Directory as Dir import qualified System.FS.API as FS @@ -104,7 +104,7 @@ unsafeByteArrayToByteString !ba !len = let !(GHC.Ptr addr#) = byteArrayContents ba (MutableByteArray mba#) <- unsafeThawByteArray ba let fp = GHC.ForeignPtr addr# (GHC.PlainPtr mba#) - BS.mkDeferredByteString fp len + pure $! BS.BS fp len -- | Copy a 'Prim.ByteArray' at a certain offset and length into a -- 'BS.ByteString'. diff --git a/fs-api/fs-api.cabal b/fs-api/fs-api.cabal index d2a2c29..03abf23 100644 --- a/fs-api/fs-api.cabal +++ b/fs-api/fs-api.cabal @@ -48,7 +48,7 @@ library default-language: Haskell2010 build-depends: , base >=4.14 && <4.20 - , bytestring >=0.10 && <0.13 + , bytestring >=0.11 && <0.13 , containers >=0.5 && <0.7 , deepseq , digest