vector-static-0.3.0.1: Statically checked sizes on Data.Vector

Data.Vector.Generic.Static

Documentation

newtype Vec n v a Source

Constructors

Vec 

Fields

unVec :: v a
 

Instances

Eq (v a) => Eq (Vec n v a) 
Ord (v a) => Ord (Vec n v a) 
Show (v a) => Show (Vec n v a) 

length :: forall n v a. Reify n => Vec n v a -> Nat nSource

null :: forall n v a. Reify n => Vec n v a -> BoolSource

empty :: Vector v a => Vec Z v aSource

singleton :: Vector v a => a -> Vec (S Z) v aSource

cons :: Vector v a => a -> Vec n v a -> Vec (S n) v aSource

snoc :: Vector v a => Vec n v a -> a -> Vec (S n) v aSource

replicate :: forall a n v. (Vector v a, Reify n) => a -> Vec n v aSource

generate :: forall n v a. (Vector v a, Reify n) => (Fin n -> a) -> Vec n v aSource

(++) :: Vector v a => Vec m v a -> Vec n v a -> Vec (m :+: n) v aSource

copy :: Vector v a => Vec n v a -> Vec n v aSource

(!) :: Vector v a => Vec n v a -> Fin n -> aSource

head :: Vector v a => Vec (S n) v a -> aSource

last :: Vector v a => Vec (S n) v a -> aSource

indexM :: (Vector v a, Monad m) => Vec n v a -> Fin n -> m aSource

headM :: (Vector v a, Monad m) => Vec (S n) v a -> m aSource

lastM :: (Vector v a, Monad m) => Vec (S n) v a -> m aSource

slice :: forall n k v a. (Vector v a, Reify k) => Fin n -> Vec (n :+: k) v a -> Vec k v aSource

init :: Vector v a => Vec (S n) v a -> Vec n v aSource

tail :: Vector v a => Vec (S n) v a -> Vec n v aSource

take :: forall n k v a. (Vector v a, Reify k) => Vec (n :+: k) v a -> Vec k v aSource

drop :: forall n k v a. (Vector v a, Reify k) => Vec (n :+: k) v a -> Vec n v aSource

backpermute :: (Vector v a, Vector v Int) => Vec m v a -> Vec n v (Fin m) -> Vec n v aSource

reverse :: Vector v a => Vec n v a -> Vec n v aSource

map :: (Vector v a, Vector v b) => (a -> b) -> Vec n v a -> Vec n v bSource

imap :: (Vector v a, Vector v b) => (Fin n -> a -> b) -> Vec n v a -> Vec n v bSource

concatMap :: (Vector v a, Vector v b) => (a -> Vec n v b) -> Vec m v a -> Vec (m :*: n) v bSource

zipWith :: (Vector v a, Vector v b, Vector v c) => (a -> b -> c) -> Vec n v a -> Vec n v b -> Vec n v cSource

zipWith3 :: (Vector v a, Vector v b, Vector v c, Vector v d) => (a -> b -> c -> d) -> Vec n v a -> Vec n v b -> Vec n v c -> Vec n v dSource

zipWith4 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e) => (a -> b -> c -> d -> e) -> Vec n v a -> Vec n v b -> Vec n v c -> Vec n v d -> Vec n v eSource

zipWith5 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v f) => (a -> b -> c -> d -> e -> f) -> Vec n v a -> Vec n v b -> Vec n v c -> Vec n v d -> Vec n v e -> Vec n v fSource

zipWith6 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v f, Vector v g) => (a -> b -> c -> d -> e -> f -> g) -> Vec n v a -> Vec n v b -> Vec n v c -> Vec n v d -> Vec n v e -> Vec n v f -> Vec n v gSource

izipWith :: (Vector v a, Vector v b, Vector v c) => (Fin n -> a -> b -> c) -> Vec n v a -> Vec n v b -> Vec n v cSource

izipWith3 :: (Vector v a, Vector v b, Vector v c, Vector v d) => (Fin n -> a -> b -> c -> d) -> Vec n v a -> Vec n v b -> Vec n v c -> Vec n v dSource

izipWith4 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e) => (Fin n -> a -> b -> c -> d -> e) -> Vec n v a -> Vec n v b -> Vec n v c -> Vec n v d -> Vec n v eSource

izipWith5 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v f) => (Fin n -> a -> b -> c -> d -> e -> f) -> Vec n v a -> Vec n v b -> Vec n v c -> Vec n v d -> Vec n v e -> Vec n v fSource

izipWith6 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v f, Vector v g) => (Fin n -> a -> b -> c -> d -> e -> f -> g) -> Vec n v a -> Vec n v b -> Vec n v c -> Vec n v d -> Vec n v e -> Vec n v f -> Vec n v gSource

zip :: (Vector v a, Vector v b, Vector v (a, b)) => Vec n v a -> Vec n v b -> Vec n v (a, b)Source

zip3 :: (Vector v a, Vector v b, Vector v c, Vector v (a, b, c)) => Vec n v a -> Vec n v b -> Vec n v c -> Vec n v (a, b, c)Source

zip4 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v (a, b, c, d)) => Vec n v a -> Vec n v b -> Vec n v c -> Vec n v d -> Vec n v (a, b, c, d)Source

zip5 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v (a, b, c, d, e)) => Vec n v a -> Vec n v b -> Vec n v c -> Vec n v d -> Vec n v e -> Vec n v (a, b, c, d, e)Source

zip6 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v f, Vector v (a, b, c, d, e, f)) => Vec n v a -> Vec n v b -> Vec n v c -> Vec n v d -> Vec n v e -> Vec n v f -> Vec n v (a, b, c, d, e, f)Source

unzip :: (Vector v a, Vector v b, Vector v (a, b)) => Vec n v (a, b) -> (Vec n v a, Vec n v b)Source

unzip3 :: (Vector v a, Vector v b, Vector v c, Vector v (a, b, c)) => Vec n v (a, b, c) -> (Vec n v a, Vec n v b, Vec n v c)Source

unzip4 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v (a, b, c, d)) => Vec n v (a, b, c, d) -> (Vec n v a, Vec n v b, Vec n v c, Vec n v d)Source

unzip5 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v (a, b, c, d, e)) => Vec n v (a, b, c, d, e) -> (Vec n v a, Vec n v b, Vec n v c, Vec n v d, Vec n v e)Source

unzip6 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v f, Vector v (a, b, c, d, e, f)) => Vec n v (a, b, c, d, e, f) -> (Vec n v a, Vec n v b, Vec n v c, Vec n v d, Vec n v e, Vec n v f)Source

elem :: (Vector v a, Eq a) => a -> Vec n v a -> BoolSource

notElem :: (Vector v a, Eq a) => a -> Vec n v a -> BoolSource

find :: (Vector v a, Eq a) => (a -> Bool) -> Vec n v a -> Maybe aSource

findIndex :: Vector v a => (a -> Bool) -> Vec n v a -> Maybe (Fin n)Source

elemIndex :: Vector v a => Eq a => a -> Vec n v a -> Maybe (Fin n)Source

foldl :: Vector v b => (a -> b -> a) -> a -> Vec n v b -> aSource

foldl1 :: Vector v a => (a -> a -> a) -> Vec (S n) v a -> aSource

foldl' :: Vector v b => (a -> b -> a) -> a -> Vec n v b -> aSource

foldl1' :: Vector v a => (a -> a -> a) -> Vec (S n) v a -> aSource

foldr :: Vector v a => (a -> b -> b) -> b -> Vec n v a -> bSource

foldr1 :: Vector v a => (a -> a -> a) -> Vec (S n) v a -> aSource

foldr' :: Vector v a => (a -> b -> b) -> b -> Vec n v a -> bSource

foldr1' :: Vector v a => (a -> a -> a) -> Vec (S n) v a -> aSource

ifoldl :: Vector v b => (a -> Fin n -> b -> a) -> a -> Vec n v b -> aSource

ifoldl' :: Vector v b => (a -> Fin n -> b -> a) -> a -> Vec n v b -> aSource

ifoldr :: Vector v a => (Fin n -> a -> b -> b) -> b -> Vec n v a -> bSource

ifoldr' :: Vector v a => (Fin n -> a -> b -> b) -> b -> Vec n v a -> bSource

all :: Vector v a => (a -> Bool) -> Vec n v a -> BoolSource

any :: Vector v a => (a -> Bool) -> Vec n v a -> BoolSource

and :: Vector v Bool => Vec n v Bool -> BoolSource

or :: Vector v Bool => Vec n v Bool -> BoolSource

sum :: (Vector v a, Num a) => Vec n v a -> aSource

product :: (Vector v a, Num a) => Vec n v a -> aSource

minimum :: (Ord a, Vector v a) => Vec (S n) v a -> aSource

minimumBy :: Vector v a => (a -> a -> Ordering) -> Vec (S n) v a -> aSource

minIndex :: (Ord a, Vector v a) => Vec (S n) v a -> Fin (S n)Source

minIndexBy :: Vector v a => (a -> a -> Ordering) -> Vec (S n) v a -> Fin (S n)Source

maximum :: (Ord a, Vector v a) => Vec (S n) v a -> aSource

maximumBy :: Vector v a => (a -> a -> Ordering) -> Vec (S n) v a -> aSource

maxIndex :: (Ord a, Vector v a) => Vec (S n) v a -> Fin (S n)Source

maxIndexBy :: Vector v a => (a -> a -> Ordering) -> Vec (S n) v a -> Fin (S n)Source

unfoldr :: Vector v a => (b -> Maybe (a, b)) -> b -> (forall n. Vec n v a -> r) -> rSource

enumFromN :: forall v a n. (Vector v a, Num a, Reify n) => a -> Vec n v aSource

enumFromStepN :: forall v a n. (Vector v a, Num a, Reify n) => a -> a -> Vec n v aSource

toList :: Vector v a => Vec n v a -> [a]Source

fromList :: Vector v a => [a] -> (forall n. Vec n v a -> r) -> rSource

stream :: Vector v a => Vec n v a -> Stream aSource

unstream :: Vector v a => Stream a -> (forall n. Vec n v a -> r) -> rSource

streamR :: Vector v a => Vec n v a -> Stream aSource

unstreamR :: Vector v a => Stream a -> (forall n. Vec n v a -> r) -> rSource

new :: Vector v a => New a -> (forall n. Vec n v a -> r) -> rSource

allFin :: forall n v. (Vector v (Fin n), Reify n) => Vec n v (Fin n)Source

indexed :: (Vector v a, Vector v (Fin n, a)) => Vec n v a -> Vec n v (Fin n, a)Source