Data.Vector.Binary

vector-binary-instances-0.2.5.2: Instances of Data.Binary for vector

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

Data.Vector.Binary

Contents

- Orphan instances

Description

Synopsis

- genericGetVector :: (Vector v a, Binary a) => Get (v a)
- genericGetVectorWith :: Vector v a => Get Int -> Get a -> Get (v a)
- genericPutVector :: (Vector v a, Binary a) => v a -> Put
- genericPutVectorWith :: Vector v 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 |
=> 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 |
=> (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.
Instance details Methods put :: Vector a -> Put # get :: Get (Vector a) # putList :: [Vector a] -> Put #
(Prim a, Binary a) => Binary (Vector a) # | Primitive vectors
Instance details Methods put :: Vector a -> Put # get :: Get (Vector a) # putList :: [Vector a] -> Put #
(Storable a, Binary a) => Binary (Vector a) # | Storable vectors
Instance details Methods put :: Vector a -> Put # get :: Get (Vector a) # putList :: [Vector a] -> Put #
(Unbox a, Binary a) => Binary (Vector a) # | Unboxed vectors
Instance details Methods put :: Vector a -> Put # get :: Get (Vector a) # putList :: [Vector a] -> Put #