Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
raehik's bytestring extras (reimplementations of unexported internals).
Synopsis
- createFp :: Int -> (ForeignPtr Word8 -> IO ()) -> IO ByteString
- memcpyFp :: ForeignPtr Word8 -> ForeignPtr Word8 -> Int -> IO ()
- createUptoNCPS :: Int -> (Ptr Word8 -> (Int -> IO ByteString) -> IO r) -> IO r
- createCPS :: Int -> (ForeignPtr Word8 -> Int -> IO r) -> ((Int -> IO r) -> Ptr Word8 -> IO r) -> IO r
- createAndTrimCPS :: Int -> (Ptr Word8 -> (Int -> IO ByteString) -> IO r) -> IO r
- unsafeCreateAndTrimCPS :: Int -> (Ptr Word8 -> (Int -> IO ByteString) -> IO r) -> r
- unsafeDupablePerformIOByteString :: IO a -> a
- createAndTrimFailable :: Int -> (Ptr Word8 -> IO (Either e Int)) -> IO (Either e ByteString)
- createFpAndTrimFailable :: Int -> (ForeignPtr Word8 -> IO (Either e Int)) -> IO (Either e ByteString)
- wrapAction :: (Ptr Word8 -> IO res) -> ForeignPtr Word8 -> IO res
- createUptoNFailable :: Int -> (Ptr Word8 -> IO (Either e Int)) -> IO (Either e ByteString)
- createFpUptoNFailable :: Int -> (ForeignPtr Word8 -> IO (Either e Int)) -> IO (Either e ByteString)
- createFailable :: Int -> (Ptr Word8 -> IO (Either e Int)) -> IO (Either e ByteString)
- createFpFailable :: Int -> (ForeignPtr Word8 -> IO (Either e Int)) -> IO (Either e ByteString)
- mkDeferredByteString :: ForeignPtr Word8 -> Int -> IO ByteString
Documentation
createFp :: Int -> (ForeignPtr Word8 -> IO ()) -> IO ByteString Source #
Create a ByteString
of size l
and use action f
to fill its contents.
Reimplemented from the unexported function 'Data.ByteString.Internal.Type.createFp.
memcpyFp :: ForeignPtr Word8 -> ForeignPtr Word8 -> Int -> IO () Source #
Copy the given number of bytes from the second area (source) into the first (destination); the copied areas may not overlap.
Reimplemented from the unexported function
memcpyFp
.
createCPS :: Int -> (ForeignPtr Word8 -> Int -> IO r) -> ((Int -> IO r) -> Ptr Word8 -> IO r) -> IO r Source #
unsafeCreateAndTrimCPS :: Int -> (Ptr Word8 -> (Int -> IO ByteString) -> IO r) -> r Source #
unsafeDupablePerformIOByteString :: IO a -> a Source #
createAndTrimFailable :: Int -> (Ptr Word8 -> IO (Either e Int)) -> IO (Either e ByteString) Source #
createFpAndTrimFailable :: Int -> (ForeignPtr Word8 -> IO (Either e Int)) -> IO (Either e ByteString) Source #
wrapAction :: (Ptr Word8 -> IO res) -> ForeignPtr Word8 -> IO res Source #
createFpUptoNFailable :: Int -> (ForeignPtr Word8 -> IO (Either e Int)) -> IO (Either e ByteString) Source #
createFpFailable :: Int -> (ForeignPtr Word8 -> IO (Either e Int)) -> IO (Either e ByteString) Source #
mkDeferredByteString :: ForeignPtr Word8 -> Int -> IO ByteString #
Variant of fromForeignPtr0
that calls deferForeignPtrAvailability
Since: bytestring-0.11.5.0