Data.Vector.Binary

vector-binary-instances-0.2.3.3: Instances of Data.Binary and Data.Serialize for vector

Copyright | (c) Don Stewart 2010-2012
Safe Haskell | None
Language | Haskell98

Data.Vector.Binary

Contents

- Orphan instances

Description

Synopsis

- genericGetVector :: (Vector v a, Binary a) => Get (v a)
- genericGetVectorWith :: (Vector v a, Binary a) => Get Int -> Get a -> Get (v a)
- genericPutVector :: (Vector v a, Binary a) => v a -> Put
- genericPutVectorWith :: (Vector v a, Binary a) => (Int -> Put) -> (a -> Put) -> v a -> Put

# Documentation

genericGetVector :: (Vector v a, Binary a) => Get (v a) #

Generic function for vector deserialization.

genericGetVectorWith #

Arguments

:: (Vector v a, Binary a) |
=> Get Int | Parser for vector size
-> Get a | Parser for vector's element
-> Get (v a) |

Deserialize vector using custom parsers.

genericPutVector :: (Vector v a, Binary a) => v a -> Put #

Generic put for anything in the G.Vector class.

genericPutVectorWith #

Arguments

:: (Vector v a, Binary a) |
=> (Int -> Put) | Encoder for vector size
-> (a -> Put) | Encoder for vector's element
-> v a |
-> Put |

Generic put for anything in the G.Vector class which uses custom encoders.

# Orphan instances

Binary a => Binary (Vector a) # | Boxed, generic vectors.
Methods put :: Vector a -> Put # get :: Get (Vector a) # putList :: [Vector a] -> Put #
(Unbox a, Binary a) => Binary (Vector a) # | Unboxed vectors
Methods put :: Vector a -> Put # get :: Get (Vector a) # putList :: [Vector a] -> Put #
(Storable a, Binary a) => Binary (Vector a) # | Storable vectors
Methods put :: Vector a -> Put # get :: Get (Vector a) # putList :: [Vector a] -> Put #
(Prim a, Binary a) => Binary (Vector a) # | Primitive vectors
Methods put :: Vector a -> Put # get :: Get (Vector a) # putList :: [Vector a] -> Put #