module Flat.Instances.Vector
()
where
import Flat.Instances.Mono
import Flat.Instances.Util
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Storable as S
instance Flat a => Flat (V.Vector a) where
size :: Vector a -> NumBits -> NumBits
size = Vector a -> NumBits -> NumBits
forall mono.
(IsSequence mono, Flat (Element mono)) =>
mono -> NumBits -> NumBits
sizeSequence
encode :: Vector a -> Encoding
encode = Vector a -> Encoding
forall mono.
(Flat (Element mono), MonoFoldable mono) =>
mono -> Encoding
encodeSequence
decode :: Get (Vector a)
decode = Get (Vector a)
forall b. (Flat (Element b), IsSequence b) => Get b
decodeSequence
instance (U.Unbox a,Flat a) => Flat (U.Vector a) where
size :: Vector a -> NumBits -> NumBits
size = Vector a -> NumBits -> NumBits
forall mono.
(IsSequence mono, Flat (Element mono)) =>
mono -> NumBits -> NumBits
sizeSequence
encode :: Vector a -> Encoding
encode = Vector a -> Encoding
forall mono.
(Flat (Element mono), MonoFoldable mono) =>
mono -> Encoding
encodeSequence
decode :: Get (Vector a)
decode = Get (Vector a)
forall b. (Flat (Element b), IsSequence b) => Get b
decodeSequence
instance (S.Storable a,Flat a) => Flat (S.Vector a) where
size :: Vector a -> NumBits -> NumBits
size = Vector a -> NumBits -> NumBits
forall mono.
(IsSequence mono, Flat (Element mono)) =>
mono -> NumBits -> NumBits
sizeSequence
encode :: Vector a -> Encoding
encode = Vector a -> Encoding
forall mono.
(Flat (Element mono), MonoFoldable mono) =>
mono -> Encoding
encodeSequence
decode :: Get (Vector a)
decode = Get (Vector a)
forall b. (Flat (Element b), IsSequence b) => Get b
decodeSequence