Data.Binary.Builder.Internal

Copyright Lennart Kolmodin, Ross Paterson
License BSD3-style (see LICENSE)
Maintainer Lennart Kolmodin <[email protected]>
Stability experimental
Portability portable to Hugs and GHC
Safe Haskell Trustworthy
Language Haskell98

Description

A module containing semi-public Builder internals that exposes low level construction functions. Modules which extend the Builder system will need to use this module while ideally most users will be able to make do with the public interface modules.

Low-level construction of Builders

writeN :: Int -> (Ptr Word8 -> IO ()) -> Builder Source

Ensure that n bytes are available, and then use f to write exactly n bytes into memory.

writeAtMost :: Int -> (Ptr Word8 -> IO Int) -> Builder Source

Ensure that n bytes are available, and then use f to write at most n bytes into memory. f must return the actual number of bytes written.

© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/7.10.3/docs/html/libraries/binary-0.7.5.0/Data-Binary-Builder-Internal.html