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) Source #

Generic function for vector deserialization.

genericGetVectorWith Source #

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 Source #

Generic put for anything in the G.Vector class.

genericPutVectorWith Source #

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) Source # | Boxed, generic vectors.
Instance details Methods put :: Vector a -> Put Source # get :: Get (Vector a) Source # putList :: [Vector a] -> Put Source #
(Prim a, Binary a) => Binary (Vector a) Source # | Primitive vectors
Instance details Methods put :: Vector a -> Put Source # get :: Get (Vector a) Source # putList :: [Vector a] -> Put Source #
(Storable a, Binary a) => Binary (Vector a) Source # | Storable vectors
Instance details Methods put :: Vector a -> Put Source # get :: Get (Vector a) Source # putList :: [Vector a] -> Put Source #
(Unbox a, Binary a) => Binary (Vector a) Source # | Unboxed vectors
Instance details Methods put :: Vector a -> Put Source # get :: Get (Vector a) Source # putList :: [Vector a] -> Put Source #