flat-0.6: Principled and efficient bit-oriented binary serialization.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Flat.Instances.Vector

Description

Flat instances for the vector package.

Orphan instances

Flat a => Flat (Vector a) Source #

Vectors are encoded as arrays.

>>> tst (V.fromList [11::Word8,22,33])
(True,40,[3,11,22,33,0])

All Vectors are encoded in the same way:

>>> let l = [11::Word8,22,33] in all (tst (V.fromList l) ==) [tst (U.fromList l),tst (S.fromList l)]
True
Instance details

(Storable a, Flat a) => Flat (Vector a) Source # 
Instance details

(Unbox a, Flat a) => Flat (Vector a) Source # 
Instance details