flat-0.4.4: Principled and efficient bit-oriented binary serialization.

Safe HaskellNone
LanguageHaskell2010

Flat.Memory

Description

Memory access primitives.

Includes code from the store-core package.

Synopsis

Documentation

data ByteArray #

Byte arrays

Instances
IsList ByteArray

Since: primitive-0.6.3.0

Instance details

Defined in Data.Primitive.ByteArray

Associated Types

type Item ByteArray :: Type #

Eq ByteArray

Since: primitive-0.6.3.0

Instance details

Defined in Data.Primitive.ByteArray

Data ByteArray 
Instance details

Defined in Data.Primitive.ByteArray

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteArray -> c ByteArray #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteArray #

toConstr :: ByteArray -> Constr #

dataTypeOf :: ByteArray -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteArray) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteArray) #

gmapT :: (forall b. Data b => b -> b) -> ByteArray -> ByteArray #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteArray -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteArray -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

Ord ByteArray

Non-lexicographic ordering. This compares the lengths of the byte arrays first and uses a lexicographic ordering if the lengths are equal. Subject to change between major versions.

Since: primitive-0.6.3.0

Instance details

Defined in Data.Primitive.ByteArray

Show ByteArray

Since: primitive-0.6.3.0

Instance details

Defined in Data.Primitive.ByteArray

Semigroup ByteArray 
Instance details

Defined in Data.Primitive.ByteArray

Monoid ByteArray 
Instance details

Defined in Data.Primitive.ByteArray

type Item ByteArray 
Instance details

Defined in Data.Primitive.ByteArray

pokeByteString :: ByteString -> Ptr Word8 -> IO (Ptr Word8) Source #

Copy bytestring to given pointer, returns new pointer

minusPtr :: Ptr a -> Ptr b -> Int #

Computes the offset required to get from the second to the first argument. We have

p2 == p1 `plusPtr` (p2 `minusPtr` p1)