OpenAFP-1.1: IBM AFP document format parser and generatorSource codeContentsIndex
OpenAFP.Types.Buffer
Portabilitynon-portable (GHC-only)
Stabilityexperimental
Maintaineraudreyt@audreyt.org
Description
This module handles sized binary buffers.
Synopsis
class (Show a, Typeable a) => Buf a where
mkBuf :: BS -> a
packBuf :: a -> BS
newtype Buffer0 = Buf0 {
fromBuf0 :: BS
}
newtype Buffer1 = Buf1 {
fromBuf1 :: BS
}
newtype Buffer2 = Buf2 {
fromBuf2 :: BS
}
Documentation
class (Show a, Typeable a) => Buf a whereSource
The Buf class represents buffers, with the leading bytes representing its length.
Methods
mkBuf :: BS -> aSource
packBuf :: a -> BSSource
show/hide Instances
newtype Buffer0 Source
Buffer0, being a simple BS, is of unlimited length.
Constructors
Buf0
fromBuf0 :: BS
show/hide Instances
newtype Buffer1 Source
Buffer1 uses one byte as length, hence is at most 254 bytes long.
Constructors
Buf1
fromBuf1 :: BS
show/hide Instances
newtype Buffer2 Source
Buffer2 uses two bytes; it can store up to 65535 bytes.
Constructors
Buf2
fromBuf2 :: BS
show/hide Instances
Produced by Haddock version 2.3.0