h*       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    1.6.1  Safe-Inferred178 vector-sized:A wrapper to tag mutable vectors with a type level length.Be careful when using the constructor here to not construct sized vectors which have a different length than that specified in the type parameter! Safe-Inferred 10. vector-sizedO(1). Yield the length of the mutable vector as an  . vector-sizedO(1)- Yield the length of the mutable vector as a  . vector-sizedO(1)+ Check whether the mutable vector is empty.  vector-sizedO(1) Yield a slice of the mutable vector without copying it with an inferred length argument.  vector-sizedO(1) Yield a slice of the mutable vector without copying it with an explicit length argument.  vector-sizedO(1) Yield all but the last element of a non-empty mutable vector without copying.  vector-sizedO(1) Yield all but the first element of a non-empty mutable vector without copying.  vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a   argument. vector-sizedO(1)$ Check whether two vectors overlap.  vector-sizedCreate a mutable vector where the length is inferred from the type. vector-sizedCreate a mutable vector where the length is inferred from the type. The memory is not initialized. vector-sizedCreate a mutable vector where the length is inferred from the type and fill it with an initial value. vector-sizedCreate a mutable vector where the length is given explicitly as a  , argument and fill it with an initial value. vector-sizedCreate a mutable vector where the length is inferred from the type and fill it with values produced by repeatedly executing the monadic action. vector-sizedCreate a mutable vector where the length is given explicitly as a   argument and fill it with values produced by repeatedly executing the monadic action. vector-sized"Create a copy of a mutable vector. vector-sized9Grow a mutable vector by an amount given explicitly as a   argument. vector-sizedGrow a mutable vector (from the front) by an amount given explicitly as a   argument. vector-sizedReset all elements of the vector to some undefined value, clearing all references to external objects. vector-sizedO(1)7 Yield the element at a given type-safe position using  . vector-sizedO(1)7 Yield the element at a given type-safe position using  .  vector-sizedO(1) Yield the element at a given  # position without bounds checking.! vector-sizedO(1)9 Replace the element at a given type-safe position using  ." vector-sizedO(1)9 Replace the element at a given type-safe position using  .# vector-sizedO(1) Replace the element at a given  # position without bounds checking.$ vector-sizedO(1)8 Modify the element at a given type-safe position using  .% vector-sizedO(1)8 Modify the element at a given type-safe position using  .& vector-sizedO(1) Modify the element at a given  # position without bounds checking.' vector-sizedO(1)6 Swap the elements at given type-safe positions using  s.( vector-sizedO(1) Swap the elements at given  $ positions without bounds checking.) vector-sizedO(1) Replace the element at a given type-safe position and return the old element, using  .* vector-sizedO(1) Replace the element at a given type-safe position and return the old element, using  .+ vector-sizedO(1) Replace the element at a given   position and return the old element. No bounds checks are performed., vector-sizedCompute the next permutation (in lexicographic order) of a given vector in-place. Returns  ( when the input is the last permutation.- vector-sized2Set all elements of the vector to the given value.. vector-sized/Copy a vector. The two vectors may not overlap./ vector-sizedCopy a vector. The two vectors may not overlap. This is not checked.0 vector-sizedMove the contents of a vector. If the two vectors do not overlap, this is equivalent to .. Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector.1 vector-sized Convert a  into a 7 if it has the correct size, otherwise return Nothing.-Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given .2 vector-sizedTakes a ) and returns a continuation providing a  with a size parameter n that is determined at runtime based on the length of the input vector.Essentially converts a  into a " with the correct size parameter n.-Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given .3 vector-sized Convert a  into a ..Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given .  vector-sizedstarting index  vector-sizedstarting index vector-sizedlength. vector-sizedtarget vector-sizedsource/ vector-sizedtarget vector-sizedsource0 vector-sizedtarget vector-sizedsource/ !"$%')* #&(+,-.0/123/ !"$%')* #&(+,-.0/123 Safe-Inferred 179:;2C4 vector-sized2A wrapper to tag vectors with a type level length.Be careful when using the constructor here to not construct sized vectors which have a different length than that specified in the type parameter!4545 Safe-Inferred()*16f  vector-sized3Internal existential wrapper used for implementing E pattern synonymB vector-sizedC vector-sizedD vector-sizedE vector-sizedPattern synonym that lets you treat an unsized vector as if it "contained" a sized vector. If you pattern match on an unsized vector, its contents will be the sized vector counterpart. 0testFunc :: Unsized.Vector Int -> Int testFunc (E v) =  ( (+) v (f 1)) -- ^ here, v is `Sized.Vector n Int`, and we have `  n` The n type variable will be properly instantiated to whatever the length of the vector is, and you will also have a   n# instance available. You can get n= in scope by turning on ScopedTypeVariables and matching on E (v :: Sized.Vector n Int)..Without this, you would otherwise have to use  to do the same thing: 3testFunc :: Unsized.Vector Int -> Int testFunc u =  u $ \v ->  ( (+) v (f 1)) =Remember that the type of final result of your function (the Int, here) must not depend on n. However, the types of the intermediate values are allowed to depend on n.This is  especially useful in do blocks, where you can pattern match on the unsized results of actions, to use the sized vector in the rest of the do block. You also get a   n/ constraint for the remainder of the do block. -- If you had: getAVector :: IO (Unsized.Vector Int) main :: IO () main = do SomeSized v <- getAVector -- v is `Sized.Vector n Int` print v -- alternatively, get n in scope SomeSized (v2 :: Sized.Vector n Int) <- getAVector print v2  SomeSized v <- pure (myUnsizedVector :: Unsized.Vector Int) -- ^ v is `Sized.Vector n Int` This enables interactive exploration with sized vectors in ghci, and is useful for using with other libraries and functions that expect sized vectors in an interactive setting.-(Note that as of GHC 8.6, you cannot get the n in scope in your ghci session using ScopedTypeVariables, like you can with do blocks)You can also use this as a constructor, to take a sized vector and "hide" the size, to produce an unsized vector: 2SomeSized :: Sized.Vector n a -> Unsized.Vector a Note that due to quirks in GHC pattern synonym completeness checking, you will get incomplete pattern matches if you use this polymorphically over different vector types, or you use any vector type other than the three supported by this library (normal, storable, unboxed).F vector-sizedO(n) Construct a vector in a type-safe manner using a sized linked list.  Build (1 :< 2 :< 3 :< Nil) :: Vector v 3 Int Build ("not" :< "much" :< Nil) :: Vector v 2 String  Can also be used as a pattern.G vector-sizedO(1)& Yield the length of the vector as an  . This is more like   than  , extracting the value from the  0 instance and not looking at the vector itself.H vector-sizedO(1)% Yield the length of the vector as a  . This function doesn't do anything; it merely allows the size parameter of the vector to be passed around as a  .I vector-sizedO(1) Reveal a  8 instance for a vector's length, determined at runtime.J vector-sizedO(1) Reveal a   instance and  / for a vector's length, determined at runtime.K vector-sizedO(1) Safe indexing using a  .L vector-sizedO(1) Safe indexing using a  .M vector-sizedO(1) Indexing using an   without bounds checking.N vector-sizedO(1)/ Yield the first element of a non-empty vector.O vector-sizedO(1). Yield the last element of a non-empty vector.P vector-sizedLens to access (O(1)) and update (O(n)$) an arbitrary element by its index.Q vector-sizedType-safe lens to access (O(1)) and update (O(n)) an arbitrary element by its index which should be supplied via TypeApplications.R vector-sizedLens to access (O(1)) and update (O(n)*) the first element of a non-empty vector.S vector-sizedLens to access (O(1)) and update (O(n))) the last element of a non-empty vector.T vector-sizedO(1) Safe indexing in a monad.The monad allows operations to be strict in the vector when necessary. Suppose vector copying is implemented like this: 'copy mv v = ... write mv i (v ! i) ... For lazy vectors, v ! i* would not be evaluated, which means that mv, would unnecessarily retain a reference to v in each element when written.With T/, copying can be implemented like this instead: copy mv v = ... do x <- indexM v i write mv i x Here, no references to v% are retained, because indexing (but not& the elements) are evaluated eagerly.U vector-sizedO(1)" Safe indexing in a monad using a  . See the documentation for T* for an explanation of why this is useful.V vector-sizedO(1) Indexing using an Int without bounds checking. See the documentation for T* for an explanation of why this is useful.W vector-sizedO(1) Yield the first element of a non-empty vector in a monad. See the documentation for T* for an explanation of why this is useful.X vector-sizedO(1) Yield the last element of a non-empty vector in a monad. See the documentation for T* for an explanation of why this is useful.Y vector-sizedO(1) Yield a slice of the vector without copying it with an inferred length argument.Z vector-sizedO(1) Yield a slice of the vector without copying it with an explicit length argument.[ vector-sizedO(1) Yield all but the last element of a non-empty vector without copying.\ vector-sizedO(1) Yield all but the first element of a non-empty vector without copying.] vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is inferred from the type.^ vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is given explicitly as a   argument._ vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is inferred from the type.` vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is givel explicitly as a   argument.a vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type.b vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a   argument.c vector-sizedO(1) Empty vector.d vector-sizedO(1)! Vector with exactly one element.e vector-sizedO(n): Construct a vector in a type-safe manner using a tuple.  fromTuple (1,2) :: Vector v 2 Int fromTuple ("hey", "what's", "going", "on") :: Vector v 4 String f vector-sizedO(n) Construct a vector with the same element in each position where the length is inferred from the type.g vector-sizedO(n) Construct a vector with the same element in each position where the length is given explicitly as a   argument.h vector-sizedO(n) Construct a vector of the given length by applying the function to each index where the length is inferred from the type.i vector-sizedO(n) Construct a vector of the given length by applying the function to each index where the length is given explicitly as a   argument.j vector-sizedO(n) Apply the function n times to a value. Zeroth element is the original value. The length is inferred from the type.k vector-sizedO(n) Apply the function n times to a value. Zeroth element is the original value. The length is given explicitly as a   argument.l vector-sizedO(n) Execute the monadic action n0 times and store the results in a vector where n is inferred from the type.m vector-sizedO(n) Execute the monadic action n0 times and store the results in a vector where n is given explicitly as a   argument.n vector-sizedO(n) Construct a vector of length n5 by applying the monadic action to each index where n is inferred from the type.o vector-sizedO(n) Construct a vector of length n5 by applying the monadic action to each index where n is given explicitly as a   argument.p vector-sizedO(n)! Construct a vector with exactly n elements by repeatedly applying the generator function to the a seed. The length is inferred from the type.q vector-sizedO(n)! Construct a vector with exactly n elements by repeatedly applying the generator function to the a seed. The length is given explicitly as a   argument.r vector-sizedO(n) Yield a vector of length n containing the values x, x+1, ...  x + (n - 1)'. The length is inferred from the type.s vector-sizedO(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)% The length is given explicitly as a   argument.t vector-sizedO(n): Yield a vector of the given length containing the values x, x+y, x+2y, ...  x + (n - 1)y'. The length is inferred from the type.u vector-sizedO(n): Yield a vector of the given length containing the values x, x+y, x+2y, ...,  x + (n - 1)y&. The length is given explicitly as a   argument.v vector-sizedO(n) Prepend an element.w vector-sizedO(n) Append an element.x vector-sizedO(m+n) Concatenate two vectors.y vector-sizedO(n) Yield the argument but force it not to retain any extra memory, possibly by copying it.This is especially useful when dealing with slices. For example: force (slice 0 2 )Here, the slice retains a reference to the huge vector. Forcing it creates a copy of just the elements that belong to the slice and allows the huge vector to be garbage collected.z vector-sizedO(m+n) For each pair (i,a)8 from the list, replace the vector element at position i by a. ,<5,9,2,7> // [(2,1),(0,3),(2,8)] = <3,9,8,7>{ vector-sizedO(m+n) For each pair (i,a) from the vector of index/value pairs, replace the vector element at position i by a. 0update <5,9,2,7> <(2,1),(0,3),(2,8)> = <3,9,8,7>| vector-sizedO(m+n) For each index i4 from the index vector and the corresponding value a from the value vector, replace the element of the initial vector at position i by a. .update_ <5,9,2,7> <2,0,2> <1,3,8> = <3,9,8,7>)This function is useful for instances of 4& that cannot store pairs. Otherwise, { is probably more convenient. update_ xs is ys = { xs ( is ys) } vector-sized Same as (z) but without bounds checking.~ vector-sizedSame as { but without bounds checking. vector-sizedSame as | but without bounds checking. vector-sizedO(m+n) For each pair (i,b), from the list, replace the vector element a at position i by f a b. ?accum (+) <5,9,2> [(2,4),(1,6),(0,3),(1,7)] = <5+3, 9+6+7, 2+4> vector-sizedO(m+n) For each pair (i,b)7 from the vector of pairs, replace the vector element a at position i by f a b. accumulate (+) <5,9,2> <(2,4),(1,6),(0,3),(1,7)> = <5+3, 9+6+7, 2+4> vector-sizedO(m+n) For each index i4 from the index vector and the corresponding value b from the the value vector, replace the element of the initial vector at position i by f a b. ?accumulate_ (+) <5,9,2> <2,1,0,1> <4,6,3,7> = <5+3, 9+6+7, 2+4>)This function is useful for instances of 4& that cannot store pairs. Otherwise,  is probably more convenient: accumulate_ f as is bs =  f as ( is bs)  vector-sizedSame as  but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedO(n) Reverse a vector vector-sizedO(n)5 Yield the vector obtained by replacing each element i of the index vector by xs!i. This is equivalent to  (xs!) is# but is often much more efficient. 3backpermute <0,3,2,3,1,0> =  vector-sizedSame as  but without bounds checking. vector-sizedO(n). Pair each element in a vector with its index. vector-sizedO(n) Map a function over a vector. vector-sizedO(n)= Apply a function to every element of a vector and its index. vector-sizedO(n*m) Map a function over a vector and concatenate the results. The function is required to always return a vector of the same length. vector-sizedO(n) Apply the monadic action to all elements of the vector, yielding a vector of results. vector-sizedO(n) Apply the monadic action to every element of a vector and its index, yielding a vector of results. vector-sizedO(n) Apply the monadic action to all elements of a vector and ignore the results. vector-sizedO(n) Apply the monadic action to every element of a vector and its index, ignoring the results. vector-sizedO(n) Apply the monadic action to all elements of the vector, yielding a vector of results. Equvalent to flip . vector-sizedO(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip . vector-sizedO(n)< Zip two vectors of the same length with the given function. vector-sized*Zip three vectors with the given function. vector-sizedO(n) Zip two vectors of the same length with a function that also takes the elements' indices). vector-sizedO(n)# Zip two vectors of the same length vector-sizedO(n) Zip the two vectors of the same length with the monadic action and yield a vector of results. vector-sizedO(n) Zip the two vectors with a monadic action that also takes the element index and yield a vector of results. vector-sizedO(n) Zip the two vectors with the monadic action and ignore the results. vector-sizedO(n) Zip the two vectors with a monadic action that also takes the element index and ignore the results. vector-sized O(min(m,n)) Unzip a vector of pairs. vector-sizedO(n)) Check if the vector contains an element. vector-sizedO(n)= Check if the vector does not contain an element (inverse of ). vector-sizedO(n) Yield  - the first element matching the predicate or   if no such element exists. vector-sizedO(n) Yield  ; the index of the first element matching the predicate or   if no such element exists. vector-sizedO(n) Yield  ; the index of the first occurence of the given element or   if the vector does not contain the element. This is a specialised version of . vector-sizedO(n) Left fold. vector-sizedO(n) Left fold on non-empty vectors. vector-sizedO(n)# Left fold with strict accumulator. vector-sizedO(n)8 Left fold on non-empty vectors with strict accumulator. vector-sizedO(n) Right fold. vector-sizedO(n)! Right fold on non-empty vectors. vector-sizedO(n)& Right fold with a strict accumulator. vector-sizedO(n)9 Right fold on non-empty vectors with strict accumulator. vector-sizedO(n)< Left fold (function applied to each element and its index). vector-sizedO(n) Left fold with strict accumulator (function applied to each element and its index). vector-sizedO(n)= Right fold (function applied to each element and its index). vector-sizedO(n) Right fold with strict accumulator (function applied to each element and its index). vector-sizedO(n)- Check if all elements satisfy the predicate. vector-sizedO(n). Check if any element satisfies the predicate. vector-sizedO(n) Check if all elements are   vector-sizedO(n) Check if any element is   vector-sizedO(n)! Compute the sum of the elements. vector-sizedO(n)% Compute the product of the elements. vector-sizedO(n)3 Yield the maximum element of the non-empty vector. vector-sizedO(n) Yield the maximum element of the non-empty vector according to the given comparison function. vector-sizedO(n)3 Yield the minimum element of the non-empty vector. vector-sizedO(n) Yield the minimum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Yield the index of the maximum element of the non-empty vector. vector-sizedO(n) Yield the index of the maximum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Yield the index of the minimum element of the non-empty vector. vector-sizedO(n) Yield the index of the minimum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Monadic fold. vector-sizedO(n)= Monadic fold (action applied to each element and its index). vector-sizedO(n)% Monadic fold over non-empty vectors. vector-sizedO(n)& Monadic fold with strict accumulator. vector-sizedO(n) Monadic fold with strict accumulator (action applied to each element and its index). vector-sizedO(n)= Monadic fold over non-empty vectors with strict accumulator. vector-sizedO(n)' Monadic fold that discards the result. vector-sizedO(n) Monadic fold that discards the result (action applied to each element and its index). vector-sizedO(n)> Monadic fold over non-empty vectors that discards the result. vector-sizedO(n)? Monadic fold with strict accumulator that discards the result. vector-sizedO(n) Monadic fold with strict accumulator that discards the result (action applied to each element and its index). vector-sizedO(n) Monad fold over non-empty vectors with strict accumulator that discards the result. vector-sized-Evaluate each action and collect the results. vector-sized-Evaluate each action and discard the results. vector-sizedO(n) Prescan prescanl f z = [ .  f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6> vector-sizedO(n)! Prescan with strict accumulator. vector-sizedO(n) Scan vector-sizedO(n) Scan with strict accumulator. vector-sizedO(n) Haskell-style scan. vector-sizedO(n), Haskell-style scan with strict accumulator. vector-sizedO(n) Scan over a non-empty vector. vector-sizedO(n)8 Scan over a non-empty vector with a strict accumulator. vector-sizedO(n) Right-to-left prescan. vector-sizedO(n)/ Right-to-left prescan with strict accumulator. vector-sizedO(n) Right-to-left scan. vector-sizedO(n), Right-to-left scan with strict accumulator. vector-sizedO(n)" Right-to-left Haskell-style scan. vector-sizedO(n): Right-to-left Haskell-style scan with strict accumulator. vector-sizedO(n), Right-to-left scan over a non-empty vector. vector-sizedO(n) Right-to-left scan over a non-empty vector with a strict accumulator. vector-sizedO(n) Convert a vector to a list. vector-sizedO(n) Convert a list to a vector. vector-sizedO(n) Convert the first n elements of a list to a vector. The length of the resultant vector is inferred from the type. vector-sizedO(n) Convert the first n elements of a list to a vector. The length of the resultant vector is given explicitly as a   argument. vector-sizedO(n) Takes a list and returns a continuation providing a vector with a size parameter corresponding to the length of the list.Essentially converts a list into a vector with the proper size parameter, determined at runtime.See  vector-sizedO(n) Convert different vector types. vector-sizedO(n)/ Yield an immutable copy of the mutable vector. vector-sizedO(1) Unsafely convert a mutable vector to an immutable one withouy copying. The mutable vector may not be used after this operation. vector-sizedO(n). Yield a mutable copy of the immutable vector. vector-sizedO(n) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation. vector-sizedO(n)- Copy an immutable vector into a mutable one. vector-sized Convert a  into a 7 if it has the correct size, otherwise return Nothing. vector-sizedTakes a ) and returns a continuation providing a  with a size parameter n that is determined at runtime based on the length of the input vector.Essentially converts a  into a " with the correct size parameter n. vector-sizedApply a function on unsized vectors to a sized vector. The function must preserve the size of the vector, this is not checked. vector-sizedApply a function on two unsized vectors to sized vectors. The function must preserve the size of the vectors, this is not checked. vector-sized vector-sized vector-sized vector-sizedTreats a bit vector as n times the size of the stored bits, reflecting the   instance; does not necessarily reflect exact in-memory representation. See   instance to get information on the actual in-memry representation. vector-sizedOnly usable if v a is itself an instance of  ,, like in the case with the bitvec library Bit type for unboxed vectors. vector-sizedThe   instance for sized vectors does not have the same behaviour as the  0 instance for the unsized vectors found in the vectors package. This instance has mempty = replicate mempty and mappend = zipWith mappend , where the vectors3 instance uses the empty vector and concatenation.If   is not necessary, using the   instance over this   will dodge the   constraint. vector-sizedThe   instance for sized vectors does not have the same behaviour as the  0 instance for the unsized vectors found in the vectors package. This instance has (<>) = zipWith (<>), but vectors uses concatentation. vector-sized,Non-empty sized vectors are lawful comonads.  is N  generates all unique sequences of a vector with the same length as it, using wrap-around.e.g.  duplicate [1,2,3,4,5] = [[1,2,3,4,5], [2,3,4,5,1], [3,4,5,1,2], [4,5,1,2,3], [5,1,2,3,4]]  vector-sized Treats a   n a as, essentially, a   n -> a, and emulates the   instance for that function.join' :: Vector n (Vector n a) -> Vector n a gets the diagonal from a square "matrix". vector-sizedThe   instance for sized vectors does not have the same behaviour as the  0 instance for the unsized vectors found in the vectors package. The instance defined here has the same behaviour as the  instance. vector-sizedAny sized vector containing   elements is itself  . vector-sizedI vector-sized-a vector of some (potentially unknown) length vector-sized3a value that depends on knowing the vector's length vector-sized"the value computed with the lengthJ vector-sized-a vector of some (potentially unknown) length vector-sizeda value that depends on knowing the vector's length, which is given as a   vector-sized"the value computed with the lengthY vector-sizedstarting indexZ vector-sizedstarting index vector-sizedlengthz vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n){ vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n)| vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n)} vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n)~ vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedxs value vector vector-sizedis index vector (of length n) vector-sizedxs value vector vector-sizedis index vector (of length n)4EGHIJKLMNOTUVWXYZ[\]^_`abcdeBCDFfghijklmnopqrstuvwxyz{|}~PQRS4EEGHIJKLMNOTUVWXYZ[\]^_`abcdeBCDFfghijklmnopqrstuvwxyz{|}~PQRSD544 Safe-Inferred1/ vector-sized specialized to use . vector-sizedO(1). Yield the length of the mutable vector as an  . vector-sizedO(1)- Yield the length of the mutable vector as a  . vector-sizedO(1)+ Check whether the mutable vector is empty. vector-sizedO(1) Yield a slice of the mutable vector without copying it with an inferred length argument. vector-sizedO(1) Yield a slice of the mutable vector without copying it with an explicit length argument. vector-sizedO(1) Yield all but the last element of a non-empty mutable vector without copying. vector-sizedO(1) Yield all but the first element of a non-empty mutable vector without copying. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a   argument. vector-sizedO(1) Check if two vectors overlap.  vector-sizedCreate a mutable vector where the length is inferred from the type. vector-sizedCreate a mutable vector where the length is inferred from the type. The memory is not initialized. vector-sizedCreate a mutable vector where the length is inferred from the type and fill it with an initial value. vector-sizedCreate a mutable vector where the length is given explicitly as a  , argument and fill it with an initial value. vector-sizedCreate a mutable vector where the length is inferred from the type and fill it with values produced by repeatedly executing the monadic action. vector-sizedCreate a mutable vector where the length is given explicitly as a   argument and fill it with values produced by repeatedly executing the monadic action. vector-sized"Create a copy of a mutable vector. vector-sized9Grow a mutable vector by an amount given explicitly as a   argument. vector-sizedGrow a mutable vector (from the front) by an amount given explicitly as a   argument. vector-sizedReset all elements of the vector to some undefined value, clearing all references to external objects. vector-sizedO(1)7 Yield the element at a given type-safe position using  . vector-sizedO(1)7 Yield the element at a given type-safe position using  . vector-sizedO(1) Yield the element at a given  # position without bounds checking. vector-sizedO(1)9 Replace the element at a given type-safe position using  . vector-sizedO(1)9 Replace the element at a given type-safe position using  . vector-sizedO(1) Replace the element at a given  # position without bounds checking. vector-sizedO(1)8 Modify the element at a given type-safe position using  . vector-sizedO(1)8 Modify the element at a given type-safe position using  . vector-sizedO(1) Modify the element at a given  # position without bounds checking. vector-sizedO(1): Swap the elements at the given type-safe positions using  s. vector-sizedO(1) Swap the elements at the given  $ positions without bounds checking. vector-sizedO(1) Replace the element at a given type-safe position and return the old element, using  . vector-sizedO(1) Replace the element at a given type-safe position and return the old element, using  . vector-sizedO(1) Replace the element at a given   position and return the old element. No bounds checks are performed. vector-sizedCompute the next permutation (lexicographically) of a given vector in-place. Returns  ( when the input is the last permutation. vector-sized2Set all elements of the vector to the given value. vector-sized/Copy a vector. The two vectors may not overlap. vector-sizedCopy a vector. The two vectors may not overlap. This is not checked. vector-sizedMove the contents of a vector. If the two vectors do not overlap, this is equivalent to . Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector. vector-sized Convert a  into a / if it has the correct size, otherwise return  .-Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given . vector-sizedTakes a ) and returns a continuation providing a  with a size parameter n that is determined at runtime based on the length of the input vector.Essentially converts a  into a  " with the correct size parameter n.-Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given . vector-sized Convert a  into a ..Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given . vector-sizedstarting index vector-sizedstarting index vector-sizedlength vector-sizedtarget vector-sizedsource vector-sizedtarget vector-sizedsource vector-sizedtarget vector-sizedsource// Safe-Inferred1ԕ/ vector-sized specialized to use . vector-sizedO(1). Yield the length of the mutable vector as an  . vector-sizedO(1)- Yield the length of the mutable vector as a  . vector-sizedO(1)+ Check whether the mutable vector is empty. vector-sizedO(1) Yield a slice of the mutable vector without copying it with an inferred length argument. vector-sizedO(1) Yield a slice of the mutable vector without copying it with an explicit length argument. vector-sizedO(1) Yield all but the last element of a non-empty mutable vector without copying. vector-sizedO(1) Yield all but the first element of a non-empty mutable vector without copying. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is givel explicitly as a   argument. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a   argument. vector-sizedO(1) Check if two vectors overlap. vector-sizedCreate a mutable vector where the length is inferred from the type. vector-sizedCreate a mutable vector where the length is inferred from the type. The memory is not initialized. vector-sizedCreate a mutable vector where the length is inferred from the type and fill it with an initial value. vector-sizedCreate a mutable vector where the length is given explicitly as a  , argument and fill it with an initial value. vector-sizedCreate a mutable vector where the length is inferred from the type and fill it with values produced by repeatedly executing the monadic action. vector-sizedCreate a mutable vector where the length is given explicitly as a   argument and fill it with values produced by repeatedly executing the monadic action. vector-sized"Create a copy of a mutable vector. vector-sized9Grow a mutable vector by an amount given explicitly as a   argument. vector-sizedGrow a mutable vector (from the front) by an amount given explicitly as a   argument. vector-sizedReset all elements of the vector to some undefined value, clearing all references to external objects. vector-sizedO(1)7 Yield the element at a given type-safe position using  . vector-sizedO(1)7 Yield the element at a given type-safe position using  . vector-sizedO(1) Yield the element at a given  # position without bounds checking. vector-sizedO(1)9 Replace the element at a given type-safe position using  . vector-sizedO(1)9 Replace the element at a given type-safe position using  . vector-sizedO(1) Replace the element at a given  # position without bounds checking. vector-sizedO(1)8 Modify the element at a given type-safe position using  . vector-sizedO(1)8 Modify the element at a given type-safe position using  . vector-sizedO(1) Modify the element at a given  # position without bounds checking. vector-sizedO(1): Swap the elements at the given type-safe positions using  s. vector-sizedO(1) Swap the elements at the given  $ positions without bounds checking. vector-sizedO(1) Replace the element at a given type-safe position and return the old element, using  . vector-sizedO(1) Replace the element at a given type-safe position and return the old element, using  . vector-sizedO(1) Replace the element at a given   position and return the old element. No bounds checks are performed. vector-sizedCompute the next permutation (lexicographically) of a given vector in-place. Returns  ( when the input is the last permutation. vector-sized2Set all elements of the vector to the given value. vector-sized/Copy a vector. The two vectors may not overlap. vector-sizedCopy a vector. The two vectors may not overlap. This is not checked. vector-sizedMove the contents of a vector. If the two vectors do not overlap, this is equivalent to . Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector. vector-sized Convert a  into a 7 if it has the correct size, otherwise return Nothing.-Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given . vector-sizedTakes a ) and returns a continuation providing a  with a size parameter n that is determined at runtime based on the length of the input vector.Essentially converts a  into a " with the correct size parameter n.-Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given . vector-sized Convert a  into a ..Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given . vector-sizedstarting index vector-sizedstarting index vector-sizedlength vector-sizedtarget vector-sizedsource vector-sizedtarget vector-sizedsource vector-sizedtarget vector-sizedsource// Safe-Inferred 1,  vector-sized specialized to use . vector-sizedPattern synonym that lets you treat an unsized vector as if it "contained" a sized vector. If you pattern match on an unsized vector, its contents will be the sized vector counterpart. 0testFunc :: Unsized.Vector Int -> Int testFunc ( v) =  ( (+) v ( 1)) -- ^ here, v is `Sized.Vector n Int`, and we have `  n` The n type variable will be properly instantiated to whatever the length of the vector is, and you will also have a   n# instance available. You can get n= in scope by turning on ScopedTypeVariables and matching on  (v :: Sized.Vector n Int)..Without this, you would otherwise have to use  to do the same thing: 3testFunc :: Unsized.Vector Int -> Int testFunc u =  u $ \v ->  ( (+) v ( 1)) =Remember that the type of final result of your function (the Int, here) must not depend on n. However, the types of the intermediate values are allowed to depend on n.This is  especially useful in do blocks, where you can pattern match on the unsized results of actions, to use the sized vector in the rest of the do block. You also get a   n/ constraint for the remainder of the do block. -- If you had: getAVector :: IO (Unsized.Vector Int) main :: IO () main = do SomeSized v <- getAVector -- v is `Sized.Vector n Int` -- get n in scope SomeSized (v :: Sized.Vector n Int) <- getAVector print v  SomeSized v <- pure (myUnsizedVector :: Unsized.Vector Int) -- ^ v is `Sized.Vector n Int` This enables interactive exploration with sized vectors in ghci, and is useful for using with other libraries and functions that expect sized vectors in an interactive setting.-(Note that as of GHC 8.6, you cannot get the n in scope in your ghci session using ScopedTypeVariables, like you can with do blocks)You can also use this as a constructor, to take a sized vector and "hide" the size, to produce an unsized vector: 2SomeSized :: Sized.Vector n a -> Unsized.Vector a  vector-sizedO(1)& Yield the length of the vector as an  . This is more like   than  , extracting the value from the  0 instance and not looking at the vector itself. vector-sizedO(1)% Yield the length of the vector as a  . This function doesn't do anything; it merely allows the size parameter of the vector to be passed around as a  . vector-sizedO(1) Reveal a  8 instance for a vector's length, determined at runtime. vector-sizedO(1) Reveal a   instance and  / for a vector's length, determined at runtime. vector-sizedO(1) Safe indexing using a  . vector-sizedO(1) Safe indexing using a  . vector-sizedO(1) Indexing using an   without bounds checking. vector-sizedO(1)/ Yield the first element of a non-empty vector. vector-sizedO(1). Yield the last element of a non-empty vector. vector-sizedLens to access (O(1)) and update (O(n)$) an arbitrary element by its index. vector-sizedLens to access (O(1)) and update (O(n)*) the first element of a non-empty vector. vector-sizedLens to access (O(1)) and update (O(n))) the last element of a non-empty vector. vector-sizedO(1)5 Safe indexing in a monad. See the documentation for + for an explanation of why this is useful. vector-sizedO(1)" Safe indexing in a monad using a  . See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Indexing using an  5 without bounds checking. See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Yield the first element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Yield the last element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Yield a slice of the vector without copying it with an inferred length argument. vector-sizedO(1) Yield a slice of the vector without copying it with an explicit length argument. vector-sizedO(1) Yield all but the last element of a non-empty vector without copying. vector-sizedO(1) Yield all but the first element of a non-empty vector without copying. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is givel explicitly as a   argument. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type. vector-sizedO(1) Yield the first n elements paired with the remainder without copying. The length of the first resulting vector is passed explicitly as a   argument. vector-sizedO(1) Empty vector. vector-sizedO(1)! Vector with exactly one element. vector-sizedO(n)+ Construct a vector in a type safe manner  fromTuple (1,2) :: Vector 2 Int fromTuple ("hey", "what's", "going", "on") :: Vector 4 String  vector-sizedO(n) Construct a vector with the same element in each position where the length is inferred from the type. vector-sizedO(n) Construct a vector with the same element in each position where the length is given explicitly as a   argument. vector-sizedO(n) construct a vector of the given length by applying the function to each index where the length is inferred from the type. vector-sizedO(n) construct a vector of the given length by applying the function to each index where the length is given explicitly as a   argument. vector-sizedO(n) Apply function n times to value. Zeroth element is original value. The length is inferred from the type. vector-sizedO(n) Apply function n times to value. Zeroth element is original value. The length is given explicitly as a   argument. vector-sizedO(n) Execute the monadic action n0 times and store the results in a vector where n is inferred from the type. vector-sizedO(n) Execute the monadic action n0 times and store the results in a vector where n is given explicitly as a   argument. vector-sizedO(n) Construct a vector of length n5 by applying the monadic action to each index where n is inferred from the type. vector-sizedO(n) Construct a vector of length n5 by applying the monadic action to each index where n is given explicitly as a   argument. vector-sizedO(n)! Construct a vector with exactly n elements by repeatedly applying the generator function to the a seed. The length is inferred from the type. vector-sizedO(n)! Construct a vector with exactly n elements by repeatedly applying the generator function to the a seed. The length is given explicitly as a   argument. vector-sizedO(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)'. The length is inferred from the type. vector-sizedO(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)&. The length is given explicitly as a   argument. vector-sizedO(n): Yield a vector of the given length containing the values x, x+y, x+2y, ...,  x + (n - 1)y'. The length is inferred from the type. vector-sizedO(n): Yield a vector of the given length containing the values x, x+y, x+2y, ...,  x + (n - 1)y&. The length is given explicitly as a   argument. vector-sizedO(n) Prepend an element. vector-sizedO(n) Append an element. vector-sizedO(m+n) Concatenate two vectors. vector-sizedO(n) Yield the argument but force it not to retain any extra memory, possibly by copying it.This is especially useful when dealing with slices. For example: force (slice 0 2 )Here, the slice retains a reference to the huge vector. Forcing it creates a copy of just the elements that belong to the slice and allows the huge vector to be garbage collected. vector-sizedO(m+n) For each pair (i,a)8 from the list, replace the vector element at position i by a. ,<5,9,2,7> // [(2,1),(0,3),(2,8)] = <3,9,8,7> vector-sizedO(m+n) For each index i4 from the index vector and the corresponding value a from the value vector, replace the element of the initial vector at position i by a. .update_ <5,9,2,7> <2,0,2> <1,3,8> = <3,9,8,7>)This function is useful for instances of & that cannot store pairs. Otherwise, update is probably more convenient. update_ xs is ys = update xs (zip is ys)  vector-sized Same as () but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedO(m+n) For each pair (i,b), from the list, replace the vector element a at position i by f a b. ?accum (+) <5,9,2> [(2,4),(1,6),(0,3),(1,7)] = <5+3, 9+6+7, 2+4> vector-sizedO(m+n) For each index i4 from the index vector and the corresponding value b from the the value vector, replace the element of the initial vector at position i by f a b. ?accumulate_ (+) <5,9,2> <2,1,0,1> <4,6,3,7> = <5+3, 9+6+7, 2+4>)This function is useful for instances of & that cannot store pairs. Otherwise,  accumulate is probably more convenient: accumulate_ f as is bs =  accumulate f as (zip is bs)  vector-sizedSame as  but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedO(n) Reverse a vector. vector-sizedO(n)5 Yield the vector obtained by replacing each element i of the index vector by xs!i. This is equivalent to  (xs!) is# but is often much more efficient. 3backpermute <0,3,2,3,1,0> =  vector-sizedSame as  but without bounds checking. vector-sizedO(n) Map a function over a vector. vector-sizedO(n)= Apply a function to every element of a vector and its index. vector-sizedO(n*m) Map a function over a vector and concatenate the results. The function is required to always return the same length vector. vector-sizedO(n) Apply the monadic action to all elements of the vector, yielding a vector of results. vector-sizedO(n) Apply the monadic action to every element of a vector and its index, yielding a vector of results. vector-sizedO(n) Apply the monadic action to all elements of a vector and ignore the results. vector-sizedO(n) Apply the monadic action to every element of a vector and its index, ignoring the results. vector-sizedO(n) Apply the monadic action to all elements of the vector, yielding a vector of results. Equvalent to flip . vector-sizedO(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip . vector-sizedO(n)< Zip two vectors of the same length with the given function. vector-sized*Zip three vectors with the given function. vector-sizedO(n) Zip two vectors of the same length with a function that also takes the elements' indices). vector-sizedO(n) Zip the two vectors of the same length with the monadic action and yield a vector of results. vector-sizedO(n) Zip the two vectors with a monadic action that also takes the element index and yield a vector of results. vector-sizedO(n) Zip the two vectors with the monadic action and ignore the results. vector-sizedO(n) Zip the two vectors with a monadic action that also takes the element index and ignore the results. vector-sizedO(n)) Check if the vector contains an element. vector-sizedO(n)= Check if the vector does not contain an element (inverse of ). vector-sizedO(n) Yield  - the first element matching the predicate or   if no such element exists. vector-sizedO(n) Yield  ; the index of the first element matching the predicate or   if no such element exists. vector-sizedO(n) Yield  ; the index of the first occurence of the given element or   if the vector does not contain the element. This is a specialised version of . vector-sizedO(n) Left fold. vector-sizedO(n) Left fold on non-empty vectors. vector-sizedO(n)# Left fold with strict accumulator. vector-sizedO(n)8 Left fold on non-empty vectors with strict accumulator. vector-sizedO(n) Right fold. vector-sizedO(n)! Right fold on non-empty vectors. vector-sizedO(n)& Right fold with a strict accumulator. vector-sizedO(n)9 Right fold on non-empty vectors with strict accumulator. vector-sizedO(n)< Left fold (function applied to each element and its index). vector-sizedO(n) Left fold with strict accumulator (function applied to each element and its index). vector-sizedO(n)= Right fold (function applied to each element and its index). vector-sizedO(n) Right fold with strict accumulator (function applied to each element and its index). vector-sizedO(n)- Check if all elements satisfy the predicate. vector-sizedO(n). Check if any element satisfies the predicate. vector-sizedO(n)! Compute the sum of the elements. vector-sizedO(n)% Compute the product of the elements. vector-sizedO(n)3 Yield the maximum element of the non-empty vector. vector-sizedO(n) Yield the maximum element of the non-empty vector according to the given comparison function. vector-sizedO(n)3 Yield the minimum element of the non-empty vector. vector-sizedO(n) Yield the minimum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Yield the index of the maximum element of the non-empty vector. vector-sizedO(n) Yield the index of the maximum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Yield the index of the minimum element of the non-empty vector. vector-sizedO(n) Yield the index of the minimum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Monadic fold. vector-sizedO(n)= Monadic fold (action applied to each element and its index). vector-sizedO(n)% Monadic fold over non-empty vectors. vector-sizedO(n)& Monadic fold with strict accumulator. vector-sizedO(n) Monadic fold with strict accumulator (action applied to each element and its index). vector-sizedO(n)= Monadic fold over non-empty vectors with strict accumulator. vector-sizedO(n)' Monadic fold that discards the result. vector-sizedO(n) Monadic fold that discards the result (action applied to each element and its index). vector-sizedO(n)> Monadic fold over non-empty vectors that discards the result. vector-sizedO(n)? Monadic fold with strict accumulator that discards the result. vector-sizedO(n) Monadic fold with strict accumulator that discards the result (action applied to each element and its index). vector-sizedO(n) Monad fold over non-empty vectors with strict accumulator that discards the result. vector-sizedO(n) Prescan. prescanl f z =  .  f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6> vector-sizedO(n)! Prescan with strict accumulator. vector-sizedO(n) Scan. vector-sizedO(n) Scan with strict accumulator. vector-sizedO(n) Haskell-style scan. vector-sizedO(n), Haskell-style scan with strict accumulator. vector-sizedO(n) Scan over a non-empty vector. vector-sizedO(n)8 Scan over a non-empty vector with a strict accumulator. vector-sizedO(n) Right-to-left prescan. vector-sizedO(n)/ Right-to-left prescan with strict accumulator. vector-sizedO(n) Right-to-left scan. vector-sizedO(n), Right-to-left scan with strict accumulator. vector-sizedO(n)" Right-to-left Haskell-style scan. vector-sizedO(n): Right-to-left Haskell-style scan with strict accumulator. vector-sizedO(n), Right-to-left scan over a non-empty vector. vector-sizedO(n) Right-to-left scan over a non-empty vector with a strict accumulator. vector-sizedO(n) Convert a vector to a list. vector-sizedO(n) Convert a list to a vector. vector-sizedO(n) Convert the first n elements of a list to a vector. The length of the resulting vector is inferred from the type. vector-sizedO(n) Convert the first n elements of a list to a vector. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(n) Takes a list and returns a continuation providing a vector with a size parameter corresponding to the length of the list.Essentially converts a list into a vector with the proper size parameter, determined at runtime.See  vector-sizedO(n)/ Yield an immutable copy of the mutable vector. vector-sizedO(1) Unsafely convert a mutable vector to an immutable one withouy copying. The mutable vector may not be used after this operation. vector-sizedO(n). Yield a mutable copy of the immutable vector. vector-sizedO(n) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation. vector-sizedO(n)- Copy an immutable vector into a mutable one. vector-sized Convert a  into a / if it has the correct size, otherwise return  . vector-sizedTakes a ) and returns a continuation providing a  with a size parameter n that is determined at runtime based on the length of the input vector.Essentially converts a  into a " with the correct size parameter n. vector-sizedApply a function on unsized vectors to a sized vector. The function must preserve the size of the vector, this is not checked. vector-sized-a vector of some (potentially unknown) length vector-sized3a value that depends on knowing the vector's length vector-sized"the value computed with the length vector-sized-a vector of some (potentially unknown) length vector-sizeda value that depends on knowing the vector's length, which is given as a   vector-sized"the value computed with the length vector-sizedstarting index vector-sizedstarting index vector-sizedlength vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedxs value vector vector-sizedis index vector (of length n) vector-sizedxs value vector vector-sizedis index vector (of length n)44  Safe-Inferred)*1ģ vector-sized specialized to use . vector-sizedPattern synonym that lets you treat an unsized vector as if it "contained" a sized vector. If you pattern match on an unsized vector, its contents will be the sized vector counterpart. 0testFunc :: Unsized.Vector Int -> Int testFunc ( v) =  ( (+) v ( 1)) -- ^ here, v is `Sized.Vector n Int`, and we have `  n` The n type variable will be properly instantiated to whatever the length of the vector is, and you will also have a   n# instance available. You can get n= in scope by turning on ScopedTypeVariables and matching on  (v :: Sized.Vector n Int)..Without this, you would otherwise have to use  to do the same thing: 3testFunc :: Unsized.Vector Int -> Int testFunc u =  u $ \v ->  ( (+) v ( 1)) =Remember that the type of final result of your function (the Int, here) must not depend on n. However, the types of the intermediate values are allowed to depend on n.This is  especially useful in do blocks, where you can pattern match on the unsized results of actions, to use the sized vector in the rest of the do block. You also get a   n/ constraint for the remainder of the do block. -- If you had: getAVector :: IO (Unsized.Vector Int) main :: IO () main = do SomeSized v <- getAVector -- v is `Sized.Vector n Int` -- get n in scope SomeSized (v :: Sized.Vector n Int) <- getAVector print v  SomeSized v <- pure (myUnsizedVector :: Unsized.Vector Int) -- ^ v is `Sized.Vector n Int` This enables interactive exploration with sized vectors in ghci, and is useful for using with other libraries and functions that expect sized vectors in an interactive setting.-(Note that as of GHC 8.6, you cannot get the n in scope in your ghci session using ScopedTypeVariables, like you can with do blocks)You can also use this as a constructor, to take a sized vector and "hide" the size, to produce an unsized vector: 2SomeSized :: Sized.Vector n a -> Unsized.Vector a  vector-sizedO(n) Construct a vector in a type-safe manner using a sized linked list.  Build (1 :< 2 :< 3 :< Nil) :: Vector 3 Int Build ("not" :< "much" :< Nil) :: Vector 2 String  Can also be used as a pattern. vector-sizedO(1)& Yield the length of the vector as an  . This is more like   than  , extracting the value from the  0 instance and not looking at the vector itself. vector-sizedO(1)% Yield the length of the vector as a  . This function doesn't do anything; it merely allows the size parameter of the vector to be passed around as a  . vector-sizedO(1) Reveal a  8 instance for a vector's length, determined at runtime. vector-sizedO(1) Reveal a   instance and  / for a vector's length, determined at runtime. vector-sizedO(1) Safe indexing using a  . vector-sizedO(1) Safe indexing using a  . vector-sizedO(1) Indexing using an   without bounds checking. vector-sizedO(1)/ Yield the first element of a non-empty vector. vector-sizedO(1). Yield the last element of a non-empty vector. vector-sizedLens to access (O(1)) and update (O(n)$) an arbitrary element by its index. vector-sizedType-safe lens to access (O(1)) and update (O(n)) an arbitrary element by its index which should be supplied via TypeApplications. vector-sizedLens to access (O(1)) and update (O(n)*) the first element of a non-empty vector. vector-sizedLens to access (O(1)) and update (O(n))) the last element of a non-empty vector. vector-sizedO(1)6 Safe indexing in a monad. See the documentation for * for an explanation of why this is useful. vector-sizedO(1)" Safe indexing in a monad using a  . See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Indexing using an Int without bounds checking. See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Yield the first element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Yield the last element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Yield a slice of the vector without copying it with an inferred length argument. vector-sizedO(1) Yield a slice of the vector without copying it with an explicit length argument. vector-sizedO(1) Yield all but the last element of a non-empty vector without copying. vector-sizedO(1) Yield all but the first element of a non-empty vector without copying. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is givel explicitly as a   argument. vector-sizedO(1) Yield the first n elements paired with the remainder without copying. The lengths of the resulting vectors are inferred from the type. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a   argument. vector-sizedO(1) Empty vector. vector-sizedO(1)! Vector with exactly one element. vector-sizedO(n): Construct a vector in a type safe manner using a tuple.  fromTuple (1,2) :: Vector 2 Int fromTuple ("hey", "what's", "going", "on") :: Vector 4 String  vector-sizedO(n) Construct a vector with the same element in each position where the length is inferred from the type. vector-sizedO(n) Construct a vector with the same element in each position where the length is given explicitly as a   argument. vector-sizedO(n) construct a vector of the given length by applying the function to each index where the length is inferred from the type. vector-sizedO(n) construct a vector of the given length by applying the function to each index where the length is given explicitly as a   argument. vector-sizedO(n) Apply the function n times to a value. Zeroth element is original value. The length is inferred from the type. vector-sizedO(n) Apply the function n times to a value. Zeroth element is original value. The length is given explicitly as a   argument. vector-sizedO(n) Execute the monadic action n0 times and store the results in a vector where n is inferred from the type. vector-sizedO(n) Execute the monadic action n0 times and store the results in a vector where n is given explicitly as a   argument. vector-sizedO(n) Construct a vector of length n by applying the monadic action to each index where n is inferred from the type. vector-sizedO(n) Construct a vector of length n by applying the monadic action to each index where n is given explicitly as a   argument. vector-sizedO(n)! Construct a vector with exactly n elements by repeatedly applying the generator function to the a seed. The length is inferred from the type. vector-sizedO(n)! Construct a vector with exactly n elements by repeatedly applying the generator function to the a seed. The length is given explicitly as a   argument. vector-sizedO(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)(. The length is inferred from the type. vector-sizedO(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)&. The length is given explicitly as a   argument. vector-sizedO(n): Yield a vector of the given length containing the values x, x+y, x+2y, ... ,  x + (n - 1)y'. The length is inferred from the type. vector-sizedO(n): Yield a vector of the given length containing the values x, x+y, x+2y, ... ,  x + (n - 1)y&. The length is given explicitly as a   argument. vector-sizedO(n) Prepend an element. vector-sizedO(n) Append an element. vector-sizedO(m+n) Concatenate two vectors. vector-sizedO(n) Yield the argument but force it not to retain any extra memory, possibly by copying it.This is especially useful when dealing with slices. For example: force (slice 0 2 )Here, the slice retains a reference to the huge vector. Forcing it creates a copy of just the elements that belong to the slice and allows the huge vector to be garbage collected. vector-sizedO(m+n) For each pair (i,a)8 from the list, replace the vector element at position i by a. ,<5,9,2,7> // [(2,1),(0,3),(2,8)] = <3,9,8,7> vector-sizedO(m+n) For each pair (i,a) from the vector of index/value pairs, replace the vector element at position i by a. 0update <5,9,2,7> <(2,1),(0,3),(2,8)> = <3,9,8,7> vector-sizedO(m+n) For each index i4 from the index vector and the corresponding value a from the value vector, replace the element of the initial vector at position i by a. .update_ <5,9,2,7> <2,0,2> <1,3,8> = <3,9,8,7>)This function is useful for instances of & that cannot store pairs. Otherwise,  is probably more convenient. update_ xs is ys =  xs ( is ys)  vector-sized Same as () but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedO(m+n) For each pair (i,b), from the list, replace the vector element a at position i by f a b. ?accum (+) <5,9,2> [(2,4),(1,6),(0,3),(1,7)] = <5+3, 9+6+7, 2+4> vector-sizedO(m+n) For each pair (i,b)7 from the vector of pairs, replace the vector element a at position i by f a b. accumulate (+) <5,9,2> <(2,4),(1,6),(0,3),(1,7)> = <5+3, 9+6+7, 2+4> vector-sizedO(m+n) For each index i4 from the index vector and the corresponding value b from the the value vector, replace the element of the initial vector at position i by f a b. ?accumulate_ (+) <5,9,2> <2,1,0,1> <4,6,3,7> = <5+3, 9+6+7, 2+4>)This function is useful for instances of & that cannot store pairs. Otherwise,  is probably more convenient: accumulate_ f as is bs =  f as ( is bs)  vector-sizedSame as  but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedO(n) Reverse a vector. vector-sizedO(n)5 Yield the vector obtained by replacing each element i of the index vector by xs!i. This is equivalent to  (xs!) is# but is often much more efficient. 3backpermute <0,3,2,3,1,0> =  vector-sizedSame as  but without bounds checking. vector-sizedO(n). Pair each element in a vector with its index. vector-sizedO(n) Map a function over a vector. vector-sizedO(n)= Apply a function to every element of a vector and its index. vector-sizedO(n*m) Map a function over a vector and concatenate the results. The function is required to always return the same length vector. vector-sizedO(n) Apply the monadic action to all elements of the vector, yielding a vector of results. vector-sizedO(n) Apply the monadic action to every element of a vector and its index, yielding a vector of results. vector-sizedO(n) Apply the monadic action to all elements of a vector and ignore the results. vector-sizedO(n) Apply the monadic action to every element of a vector and its index, ignoring the results. vector-sizedO(n) Apply the monadic action to all elements of the vector, yielding a vector of results. Equvalent to flip . vector-sizedO(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip . vector-sizedO(n)< Zip two vectors of the same length with the given function. vector-sized*Zip three vectors with the given function. vector-sizedO(n) Zip two vectors of the same length with a function that also takes the elements' indices). vector-sizedO(n)$ Zip two vectors of the same length. vector-sizedO(n) Zip the two vectors of the same length with the monadic action and yield a vector of results. vector-sizedO(n) Zip the two vectors with a monadic action that also takes the element index and yield a vector of results. vector-sizedO(n) Zip the two vectors with the monadic action and ignore the results. vector-sizedO(n) Zip the two vectors with a monadic action that also takes the element index and ignore the results. vector-sized O(min(m,n)) Unzip a vector of pairs. vector-sizedO(n)) Check if the vector contains an element. vector-sizedO(n)= Check if the vector does not contain an element (inverse of ). vector-sizedO(n) Yield  - the first element matching the predicate or   if no such element exists. vector-sizedO(n) Yield  ; the index of the first element matching the predicate or   if no such element exists. vector-sizedO(n) Yield  ; the index of the first occurence of the given element or   if the vector does not contain the element. This is a specialised version of . vector-sizedO(n) Left fold. vector-sizedO(n) Left fold on non-empty vectors. vector-sizedO(n)# Left fold with strict accumulator. vector-sizedO(n)8 Left fold on non-empty vectors with strict accumulator. vector-sizedO(n) Right fold. vector-sizedO(n)! Right fold on non-empty vectors. vector-sizedO(n)& Right fold with a strict accumulator. vector-sizedO(n)9 Right fold on non-empty vectors with strict accumulator. vector-sizedO(n)< Left fold (function applied to each element and its index). vector-sizedO(n) Left fold with strict accumulator (function applied to each element and its index). vector-sizedO(n)= Right fold (function applied to each element and its index). vector-sizedO(n) Right fold with strict accumulator (function applied to each element and its index). vector-sizedO(n)- Check if all elements satisfy the predicate. vector-sizedO(n). Check if any element satisfies the predicate. vector-sizedO(n) Check if all elements are  . vector-sizedO(n) Check if any element is  . vector-sizedO(n)! Compute the sum of the elements. vector-sizedO(n)% Compute the product of the elements. vector-sizedO(n)3 Yield the maximum element of the non-empty vector. vector-sizedO(n) Yield the maximum element of the non-empty vector according to the given comparison function. vector-sizedO(n)3 Yield the minimum element of the non-empty vector. vector-sizedO(n) Yield the minimum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Yield the index of the maximum element of the non-empty vector. vector-sizedO(n) Yield the index of the maximum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Yield the index of the minimum element of the non-empty vector. vector-sizedO(n) Yield the index of the minimum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Monadic fold. vector-sizedO(n)= Monadic fold (action applied to each element and its index). vector-sizedO(n)% Monadic fold over non-empty vectors. vector-sizedO(n)& Monadic fold with strict accumulator. vector-sizedO(n) Monadic fold with strict accumulator (action applied to each element and its index). vector-sizedO(n)= Monadic fold over non-empty vectors with strict accumulator. vector-sizedO(n)' Monadic fold that discards the result. vector-sizedO(n) Monadic fold that discards the result (action applied to each element and its index). vector-sizedO(n)> Monadic fold over non-empty vectors that discards the result. vector-sizedO(n)? Monadic fold with strict accumulator that discards the result. vector-sizedO(n) Monadic fold with strict accumulator that discards the result (action applied to each element and its index). vector-sizedO(n) Monad fold over non-empty vectors with strict accumulator that discards the result. vector-sized-Evaluate each action and collect the results. vector-sized-Evaluate each action and discard the results. vector-sizedO(n) Prescan. prescanl f z =  .  f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6> vector-sizedO(n)! Prescan with strict accumulator. vector-sizedO(n) Scan. vector-sizedO(n) Scan with strict accumulator. vector-sizedO(n) Haskell-style scan. vector-sizedO(n), Haskell-style scan with strict accumulator. vector-sizedO(n) Scan over a non-empty vector. vector-sizedO(n)8 Scan over a non-empty vector with a strict accumulator. vector-sizedO(n) Right-to-left prescan. vector-sizedO(n)/ Right-to-left prescan with strict accumulator. vector-sizedO(n) Right-to-left scan. vector-sizedO(n), Right-to-left scan with strict accumulator. vector-sizedO(n)" Right-to-left Haskell-style scan. vector-sizedO(n): Right-to-left Haskell-style scan with strict accumulator. vector-sizedO(n), Right-to-left scan over a non-empty vector. vector-sizedO(n) Right-to-left scan over a non-empty vector with a strict accumulator. vector-sizedO(n) Convert a vector to a list. vector-sizedO(n) Convert a list to a vector. vector-sizedO(n) Convert the first n elements of a list to a vector. The length of the resulting vector is inferred from the type. vector-sizedO(n) Convert the first n elements of a list to a vector. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(n) Takes a list and returns a continuation providing a vector with a size parameter corresponding to the length of the list.Essentially converts a list into a vector with the proper size parameter, determined at runtime.See  vector-sizedO(n)/ Yield an immutable copy of the mutable vector. vector-sizedO(1) Unsafely convert a mutable vector to an immutable one without copying. The mutable vector may not be used after this operation. vector-sizedO(n). Yield a mutable copy of the immutable vector. vector-sizedO(n) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation. vector-sizedO(n)- Copy an immutable vector into a mutable one. vector-sized Convert a  into a / if it has the correct size, otherwise return  . vector-sizedTakes a ) and returns a continuation providing a  with a size parameter n that is determined at runtime based on the length of the input vector.Essentially converts a  into a " with the correct size parameter n. vector-sizedApply a function on unsized vectors to a sized vector. The function must preserve the size of the vector, this is not checked. vector-sizedApply a function on two unsized vectors to sized vectors. The function must preserve the size of the vectors, this is not checked. vector-sized-a vector of some (potentially unknown) length vector-sized3a value that depends on knowing the vector's length vector-sized"the value computed with the length vector-sized-a vector of some (potentially unknown) length vector-sizeda value that depends on knowing the vector's length, which is given as a   vector-sized"the value computed with the length vector-sizedstarting index vector-sizedstarting index vector-sizedlength vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedxs value vector vector-sizedis index vector (of length n) vector-sizedxs value vector vector-sizedis index vector (of length n)BCDBCD44  Safe-Inferred1/ vector-sized specialized to use . vector-sizedO(1). Yield the length of the mutable vector as an  . vector-sizedO(1)- Yield the length of the mutable vector as a  . vector-sizedO(1)+ Check whether the mutable vector is empty. vector-sizedO(1) Yield a slice of the mutable vector without copying it with an inferred length argument. vector-sizedO(1) Yield a slice of the mutable vector without copying it with an explicit length argument. vector-sizedO(1) Yield all but the last element of a non-empty mutable vector without copying. vector-sizedO(1) Yield all but the first element of a non-empty mutable vector without copying. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is givel explicitly as a   argument. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a   argument. vector-sizedO(1) Check if two vectors overlap.  vector-sizedCreate a mutable vector where the length is inferred from the type. vector-sizedCreate a mutable vector where the length is inferred from the type. The memory is not initialized. vector-sizedCreate a mutable vector where the length is inferred from the type and fill it with an initial value. vector-sizedCreate a mutable vector where the length is given explicitly as a  , argument and fill it with an initial value. vector-sizedCreate a mutable vector where the length is inferred from the type and fill it with values produced by repeatedly executing the monadic action. vector-sizedCreate a mutable vector where the length is given explicitly as a   argument and fill it with values produced by repeatedly executing the monadic action. vector-sized"Create a copy of a mutable vector. vector-sized9Grow a mutable vector by an amount given explicitly as a   argument. vector-sizedGrow a mutable vector (from the front) by an amount given explicitly as a   argument. vector-sizedReset all elements of the vector to some undefined value, clearing all references to external objects. vector-sizedO(1)7 Yield the element at a given type-safe position using  . vector-sizedO(1)7 Yield the element at a given type-safe position using  . vector-sizedO(1) Yield the element at a given  # position without bounds checking. vector-sizedO(1)9 Replace the element at a given type-safe position using  . vector-sizedO(1)9 Replace the element at a given type-safe position using  . vector-sizedO(1) Replace the element at a given  # position without bounds checking. vector-sizedO(1)8 Modify the element at a given type-safe position using  . vector-sizedO(1)8 Modify the element at a given type-safe position using  . vector-sizedO(1) Modify the element at a given  # position without bounds checking. vector-sizedO(1): Swap the elements at the given type-safe positions using  s. vector-sizedO(1) Swap the elements at the given  $ positions without bounds checking. vector-sizedO(1) Replace the element at a given type-safe position and return the old element, using  . vector-sizedO(1) Replace the element at a given type-safe position and return the old element, using  . vector-sizedO(1) Replace the element at a given   position and return the old element. No bounds checks are performed. vector-sizedCompute the next permutation (lexicographically) of a given vector in-place. Returns  ( when the input is the last permutation. vector-sized2Set all elements of the vector to the given value. vector-sized/Copy a vector. The two vectors may not overlap. vector-sizedCopy a vector. The two vectors may not overlap. This is not checked. vector-sizedMove the contents of a vector. If the two vectors do not overlap, this is equivalent to . Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector. vector-sized Convert a  into a 7 if it has the correct size, otherwise return Nothing.-Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given . vector-sizedTakes a ) and returns a continuation providing a  with a size parameter n that is determined at runtime based on the length of the input vector.Essentially converts a  into a  " with the correct size parameter n.-Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given . vector-sized Convert a  into a ..Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given . vector-sizedstarting index vector-sizedstarting index vector-sizedlength vector-sizedtarget vector-sizedsource vector-sizedtarget vector-sizedsource vector-sizedtarget vector-sizedsource//  Safe-Inferred)*1  vector-sized specialized to use  . vector-sizedPattern synonym that lets you treat an unsized vector as if it "contained" a sized vector. If you pattern match on an unsized vector, its contents will be the sized vector counterpart. 0testFunc :: Unsized.Vector Int -> Int testFunc ( v) =  ( (+) v ( 1)) -- ^ here, v is `Sized.Vector n Int`, and we have `  n` The n type variable will be properly instantiated to whatever the length of the vector is, and you will also have a   n# instance available. You can get n= in scope by turning on ScopedTypeVariables and matching on  (v :: Sized.Vector n Int)..Without this, you would otherwise have to use  to do the same thing: 3testFunc :: Unsized.Vector Int -> Int testFunc u =  u $ \v ->  ( (+) v ( 1)) =Remember that the type of final result of your function (the Int, here) must not depend on n. However, the types of the intermediate values are allowed to depend on n.This is  especially useful in do blocks, where you can pattern match on the unsized results of actions, to use the sized vector in the rest of the do block. You also get a   n/ constraint for the remainder of the do block. -- If you had: getAVector :: IO (Unsized.Vector Int) main :: IO () main = do SomeSized v <- getAVector -- v is `Sized.Vector n Int` -- get n in scope SomeSized (v :: Sized.Vector n Int) <- getAVector print v  SomeSized v <- pure (myUnsizedVector :: Unsized.Vector Int) -- ^ v is `Sized.Vector n Int` This enables interactive exploration with sized vectors in ghci, and is useful for using with other libraries and functions that expect sized vectors in an interactive setting.-(Note that as of GHC 8.6, you cannot get the n in scope in your ghci session using ScopedTypeVariables, like you can with do blocks)You can also use this as a constructor, to take a sized vector and "hide" the size, to produce an unsized vector: 2SomeSized :: Sized.Vector n a -> Unsized.Vector a  vector-sizedO(n) Construct a vector in a type-safe manner using a sized linked list.  Build (1 :< 2 :< 3 :< Nil) :: Vector 3 Int Build ("not" :< "much" :< Nil) :: Vector 2 String  Can also be used as a pattern. vector-sizedO(1)& Yield the length of the vector as an  . This is more like   than  , extracting the value from the  0 instance and not looking at the vector itself. vector-sizedO(1)% Yield the length of the vector as a  . This function doesn't do anything; it merely allows the size parameter of the vector to be passed around as a  . vector-sizedO(1) Reveal a  8 instance for a vector's length, determined at runtime. vector-sizedO(1) Reveal a   instance and  / for a vector's length, determined at runtime. vector-sizedO(1) Safe indexing using a  . vector-sizedO(1) Safe indexing using a  . vector-sizedO(1) Indexing using an   without bounds checking. vector-sizedO(1)/ Yield the first element of a non-empty vector. vector-sizedO(1). Yield the last element of a non-empty vector. vector-sizedLens to access (O(1)) and update (O(n)$) an arbitrary element by its index. vector-sizedType-safe lens to access (O(1)) and update (O(n)) an arbitrary element by its index which should be supplied via TypeApplications. vector-sizedLens to access (O(1)) and update (O(n)*) the first element of a non-empty vector. vector-sizedLens to access (O(1)) and update (O(n))) the last element of a non-empty vector. vector-sizedO(1)5 Safe indexing in a monad. See the documentation for + for an explanation of why this is useful. vector-sizedO(1)" Safe indexing in a monad using a  . See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Indexing using an  5 without bounds checking. See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Yield the first element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Yield the last element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Yield a slice of the vector without copying it with an inferred length argument. vector-sizedO(1) Yield a slice of the vector without copying it with an explicit length argument. vector-sizedO(1) Yield all but the last element of a non-empty vector without copying. vector-sizedO(1) Yield all but the first element of a non-empty vector without copying. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is givel explicitly as a   argument. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type. vector-sizedO(1) Yield the first n elements paired with the remainder without copying. The length of the first resulting vector is passed explicitly as a   argument. vector-sizedO(1) Empty vector. vector-sizedO(1)! Vector with exactly one element. vector-sizedO(n): Construct a vector in a type safe manner using a tuple.  fromTuple (1,2) :: Vector 2 Int fromTuple ("hey", "what's", "going", "on") :: Vector 4 String  vector-sizedO(n) Construct a vector with the same element in each position where the length is inferred from the type. vector-sizedO(n) Construct a vector with the same element in each position where the length is given explicitly as a   argument. vector-sizedO(n) construct a vector of the given length by applying the function to each index where the length is inferred from the type. vector-sizedO(n) construct a vector of the given length by applying the function to each index where the length is given explicitly as a   argument. vector-sizedO(n) Apply function n times to value. Zeroth element is original value. The length is inferred from the type. vector-sizedO(n) Apply function n times to value. Zeroth element is original value. The length is given explicitly as a   argument. vector-sizedO(n) Execute the monadic action n0 times and store the results in a vector where n is inferred from the type. vector-sizedO(n) Execute the monadic action n0 times and store the results in a vector where n is given explicitly as a   argument. vector-sizedO(n) Construct a vector of length n5 by applying the monadic action to each index where n is inferred from the type. vector-sizedO(n) Construct a vector of length n5 by applying the monadic action to each index where n is given explicitly as a   argument. vector-sizedO(n)! Construct a vector with exactly n elements by repeatedly applying the generator function to the a seed. The length is inferred from the type. vector-sizedO(n)! Construct a vector with exactly n elements by repeatedly applying the generator function to the a seed. The length is given explicitly as a   argument. vector-sizedO(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)'. The length is inferred from the type. vector-sizedO(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)&. The length is given explicitly as a   argument. vector-sizedO(n): Yield a vector of the given length containing the values x, x+y, x+2y, ...,  x + (n - 1)y'. The length is inferred from the type. vector-sizedO(n): Yield a vector of the given length containing the values x, x+y, x+2y, ...,  x + (n - 1)y&. The length is given explicitly as a   argument. vector-sizedO(n) Prepend an element. vector-sizedO(n) Append an element. vector-sizedO(m+n) Concatenate two vectors. vector-sizedO(n) Yield the argument but force it not to retain any extra memory, possibly by copying it.This is especially useful when dealing with slices. For example: force (slice 0 2 )Here, the slice retains a reference to the huge vector. Forcing it creates a copy of just the elements that belong to the slice and allows the huge vector to be garbage collected. vector-sizedO(m+n) For each pair (i,a)8 from the list, replace the vector element at position i by a. ,<5,9,2,7> // [(2,1),(0,3),(2,8)] = <3,9,8,7> vector-sizedO(m+n) For each pair (i,a) from the vector of index/value pairs, replace the vector element at position i by a. 0update <5,9,2,7> <(2,1),(0,3),(2,8)> = <3,9,8,7> vector-sizedO(m+n) For each index i4 from the index vector and the corresponding value a from the value vector, replace the element of the initial vector at position i by a. .update_ <5,9,2,7> <2,0,2> <1,3,8> = <3,9,8,7>)This function is useful for instances of & that cannot store pairs. Otherwise,  is probably more convenient. update_ xs is ys =  xs ( is ys)  vector-sized Same as () but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedO(m+n) For each pair (i,b), from the list, replace the vector element a at position i by f a b. ?accum (+) <5,9,2> [(2,4),(1,6),(0,3),(1,7)] = <5+3, 9+6+7, 2+4> vector-sizedO(m+n) For each pair (i,b)7 from the vector of pairs, replace the vector element a at position i by f a b. accumulate (+) <5,9,2> <(2,4),(1,6),(0,3),(1,7)> = <5+3, 9+6+7, 2+4> vector-sizedO(m+n) For each index i4 from the index vector and the corresponding value b from the the value vector, replace the element of the initial vector at position i by f a b. ?accumulate_ (+) <5,9,2> <2,1,0,1> <4,6,3,7> = <5+3, 9+6+7, 2+4>)This function is useful for instances of & that cannot store pairs. Otherwise,  is probably more convenient: accumulate_ f as is bs =  f as ( is bs)  vector-sizedSame as  but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedO(n) Reverse a vector. vector-sizedO(n)5 Yield the vector obtained by replacing each element i of the index vector by xs!i. This is equivalent to  (xs!) is# but is often much more efficient. 3backpermute <0,3,2,3,1,0> =  vector-sizedSame as  but without bounds checking. vector-sizedO(n). Pair each element in a vector with its index. vector-sizedO(n) Map a function over a vector. vector-sizedO(n)= Apply a function to every element of a vector and its index. vector-sizedO(n*m) Map a function over a vector and concatenate the results. The function is required to always return the same length vector. vector-sizedO(n) Apply the monadic action to all elements of the vector, yielding a vector of results. vector-sizedO(n) Apply the monadic action to every element of a vector and its index, yielding a vector of results. vector-sizedO(n) Apply the monadic action to all elements of a vector and ignore the results. vector-sizedO(n) Apply the monadic action to every element of a vector and its index, ignoring the results. vector-sizedO(n) Apply the monadic action to all elements of the vector, yielding a vector of results. Equvalent to flip . vector-sizedO(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip . vector-sizedO(n)< Zip two vectors of the same length with the given function. vector-sized*Zip three vectors with the given function. vector-sizedO(n) Zip two vectors of the same length with a function that also takes the elements' indices). vector-sizedO(n)$ Zip two vectors of the same length. vector-sizedO(n) Zip the two vectors of the same length with the monadic action and yield a vector of results. vector-sizedO(n) Zip the two vectors with a monadic action that also takes the element index and yield a vector of results. vector-sizedO(n) Zip the two vectors with the monadic action and ignore the results. vector-sizedO(n) Zip the two vectors with a monadic action that also takes the element index and ignore the results. vector-sized O(min(m,n)) Unzip a vector of pairs. vector-sizedO(n)) Check if the vector contains an element. vector-sizedO(n)= Check if the vector does not contain an element (inverse of ). vector-sizedO(n) Yield  - the first element matching the predicate or   if no such element exists. vector-sizedO(n) Yield  ; the index of the first element matching the predicate or   if no such element exists. vector-sizedO(n) Yield  ; the index of the first occurence of the given element or   if the vector does not contain the element. This is a specialised version of . vector-sizedO(n) Left fold. vector-sizedO(n) Left fold on non-empty vectors. vector-sizedO(n)# Left fold with strict accumulator. vector-sizedO(n)8 Left fold on non-empty vectors with strict accumulator. vector-sizedO(n) Right fold. vector-sizedO(n)! Right fold on non-empty vectors. vector-sizedO(n)& Right fold with a strict accumulator. vector-sizedO(n)9 Right fold on non-empty vectors with strict accumulator. vector-sizedO(n)< Left fold (function applied to each element and its index). vector-sizedO(n) Left fold with strict accumulator (function applied to each element and its index). vector-sizedO(n)= Right fold (function applied to each element and its index). vector-sizedO(n) Right fold with strict accumulator (function applied to each element and its index). vector-sizedO(n)- Check if all elements satisfy the predicate. vector-sizedO(n). Check if any element satisfies the predicate. vector-sizedO(n) Check if all elements are   vector-sizedO(n) Check if any element is   vector-sizedO(n)! Compute the sum of the elements. vector-sizedO(n)% Compute the product of the elements. vector-sizedO(n)3 Yield the maximum element of the non-empty vector. vector-sizedO(n) Yield the maximum element of the non-empty vector according to the given comparison function. vector-sizedO(n)3 Yield the minimum element of the non-empty vector. vector-sizedO(n) Yield the minimum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Yield the index of the maximum element of the non-empty vector. vector-sizedO(n) Yield the index of the maximum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Yield the index of the minimum element of the non-empty vector. vector-sizedO(n) Yield the index of the minimum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Monadic fold. vector-sizedO(n)= Monadic fold (action applied to each element and its index). vector-sizedO(n)% Monadic fold over non-empty vectors. vector-sizedO(n)& Monadic fold with strict accumulator. vector-sizedO(n) Monadic fold with strict accumulator (action applied to each element and its index). vector-sizedO(n)= Monadic fold over non-empty vectors with strict accumulator. vector-sizedO(n)' Monadic fold that discards the result. vector-sizedO(n) Monadic fold that discards the result (action applied to each element and its index). vector-sizedO(n)> Monadic fold over non-empty vectors that discards the result. vector-sizedO(n)? Monadic fold with strict accumulator that discards the result. vector-sizedO(n) Monadic fold with strict accumulator that discards the result (action applied to each element and its index). vector-sizedO(n) Monad fold over non-empty vectors with strict accumulator that discards the result. vector-sized-Evaluate each action and collect the results. vector-sized-Evaluate each action and discard the results. vector-sizedO(n) Prescan. prescanl f z =  .  f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6> vector-sizedO(n)! Prescan with strict accumulator. vector-sizedO(n) Scan. vector-sizedO(n) Scan with strict accumulator. vector-sizedO(n) Haskell-style scan. vector-sizedO(n), Haskell-style scan with strict accumulator. vector-sizedO(n) Scan over a non-empty vector. vector-sizedO(n)8 Scan over a non-empty vector with a strict accumulator. vector-sizedO(n) Right-to-left prescan. vector-sizedO(n)/ Right-to-left prescan with strict accumulator. vector-sizedO(n) Right-to-left scan. vector-sizedO(n), Right-to-left scan with strict accumulator. vector-sizedO(n)" Right-to-left Haskell-style scan. vector-sizedO(n): Right-to-left Haskell-style scan with strict accumulator. vector-sizedO(n), Right-to-left scan over a non-empty vector. vector-sizedO(n) Right-to-left scan over a non-empty vector with a strict accumulator. vector-sizedO(n) Convert a vector to a list. vector-sizedO(n) Convert a list to a vector. vector-sizedO(n) Convert the first n elements of a list to a vector. The length of the resulting vector is inferred from the type. vector-sizedO(n) Convert the first n elements of a list to a vector. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(n) Takes a list and returns a continuation providing a vector with a size parameter corresponding to the length of the list.Essentially converts a list into a vector with the proper size parameter, determined at runtime.See  vector-sizedO(n)/ Yield an immutable copy of the mutable vector. vector-sizedO(1) Unsafely convert a mutable vector to an immutable one withouy copying. The mutable vector may not be used after this operation. vector-sizedO(n). Yield a mutable copy of the immutable vector. vector-sizedO(n) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation. vector-sizedO(n)- Copy an immutable vector into a mutable one. vector-sized Convert a  into a / if it has the correct size, otherwise return  . vector-sizedTakes a ) and returns a continuation providing a  with a size parameter n that is determined at runtime based on the length of the input vector.Essentially converts a  into a " with the correct size parameter n. vector-sizedApply a function on unsized vectors to a sized vector. The function must preserve the size of the vector, this is not checked. vector-sizedApply a function on two unsized vectors to sized vectors. The function must preserve the size of the vectors, this is not checked. vector-sized-a vector of some (potentially unknown) length vector-sized3a value that depends on knowing the vector's length vector-sized"the value computed with the length vector-sized-a vector of some (potentially unknown) length vector-sizeda value that depends on knowing the vector's length, which is given as a   vector-sized"the value computed with the length vector-sizedstarting index vector-sizedstarting index vector-sizedlength vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedxs value vector vector-sizedis index vector (of length n) vector-sizedxs value vector vector-sizedis index vector (of length n)44 Safe-Inferred01(>0 vector-sized specialized to use !. vector-sizedO(1). Yield the length of the mutable vector as an  . vector-sizedO(1)- Yield the length of the mutable vector as a  . vector-sizedO(1)+ Check whether the mutable vector is empty. vector-sizedO(1) Yield a slice of the mutable vector without copying it with an inferred length argument. vector-sizedO(1) Yield a slice of the mutable vector without copying it with an explicit length argument. vector-sizedO(1) Yield all but the last element of a non-empty mutable vector without copying. vector-sizedO(1) Yield all but the first element of a non-empty mutable vector without copying. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is givel explicitly as a   argument. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a   argument. vector-sizedO(1) Check if two vectors overlap.  vector-sizedCreate a mutable vector where the length is inferred from the type. vector-sizedCreate a mutable vector where the length is inferred from the type. The memory is not initialized. vector-sizedCreate a mutable vector where the length is inferred from the type and fill it with an initial value. vector-sizedCreate a mutable vector where the length is given explicitly as a  , argument and fill it with an initial value. vector-sizedCreate a mutable vector where the length is inferred from the type and fill it with values produced by repeatedly executing the monadic action. vector-sizedCreate a mutable vector where the length is given explicitly as a   argument and fill it with values produced by repeatedly executing the monadic action. vector-sized"Create a copy of a mutable vector. vector-sized9Grow a mutable vector by an amount given explicitly as a   argument. vector-sizedGrow a mutable vector (from the front) by an amount given explicitly as a   argument. vector-sizedReset all elements of the vector to some undefined value, clearing all references to external objects. vector-sizedO(1)7 Yield the element at a given type-safe position using  . vector-sizedO(1)7 Yield the element at a given type-safe position using  . vector-sizedO(1) Yield the element at a given  # position without bounds checking. vector-sizedO(1)9 Replace the element at a given type-safe position using  . vector-sizedO(1)9 Replace the element at a given type-safe position using  . vector-sizedO(1) Replace the element at a given  # position without bounds checking. vector-sizedO(1)8 Modify the element at a given type-safe position using  . vector-sizedO(1)8 Modify the element at a given type-safe position using  . vector-sizedO(1) Modify the element at a given  # position without bounds checking. vector-sizedO(1): Swap the elements at the given type-safe positions using  s. vector-sizedO(1) Swap the elements at the given  $ positions without bounds checking. vector-sizedO(1) Replace the element at a given type-safe position and return the old element, using  . vector-sizedO(1) Replace the element at a given type-safe position and return the old element, using  . vector-sizedO(1) Replace the element at a given   position and return the old element. No bounds checks are performed. vector-sizedCompute the next permutation (lexicographically) of a given vector in-place. Returns  ( when the input is the last permutation. vector-sized2Set all elements of the vector to the given value. vector-sized/Copy a vector. The two vectors may not overlap. vector-sizedCopy a vector. The two vectors may not overlap. This is not checked. vector-sizedMove the contents of a vector. If the two vectors do not overlap, this is equivalent to . Otherwise, the copying is performed as if the source vector were copied to a temporary vector and then the temporary vector was copied to the target vector. vector-sized Convert a " into a #7 if it has the correct size, otherwise return Nothing.-Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given ". vector-sizedTakes a ") and returns a continuation providing a # with a size parameter n that is determined at runtime based on the length of the input vector.Essentially converts a " into a $" with the correct size parameter n.-Note that this does no copying; the returned  is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given ". vector-sized Convert a # into a "..Note that this does no copying; the returned " is a reference to the exact same vector in memory as the given one, and any modifications to it are also reflected in the given . vector-sizedThis instance allows to define sized matrices and tensors backed by continuous memory segments, which reduces memory allocations and relaxes pressure on garbage collector. vector-sizedstarting index vector-sizedstarting index vector-sizedlength vector-sizedtarget vector-sizedsource vector-sizedtarget vector-sizedsource vector-sizedtarget vector-sizedsource00  Safe-Inferred)*16 vector-sized specialized to use %. vector-sizedPattern synonym that lets you treat an unsized vector as if it "contained" a sized vector. If you pattern match on an unsized vector, its contents will be the sized vector counterpart. 0testFunc :: Unsized.Vector Int -> Int testFunc ( v) =  ( (+) v ( 1)) -- ^ here, v is `Sized.Vector n Int`, and we have `  n` The n type variable will be properly instantiated to whatever the length of the vector is, and you will also have a   n# instance available. You can get n= in scope by turning on ScopedTypeVariables and matching on  (v :: Sized.Vector n Int)..Without this, you would otherwise have to use   to do the same thing: 3testFunc :: Unsized.Vector Int -> Int testFunc u =   u $ \v ->  ( (+) v ( 1)) =Remember that the type of final result of your function (the Int, here) must not depend on n. However, the types of the intermediate values are allowed to depend on n.This is  especially useful in do blocks, where you can pattern match on the unsized results of actions, to use the sized vector in the rest of the do block. You also get a   n/ constraint for the remainder of the do block. -- If you had: getAVector :: IO (Unsized.Vector Int) main :: IO () main = do SomeSized v <- getAVector -- v is `Sized.Vector n Int` -- get n in scope SomeSized (v :: Sized.Vector n Int) <- getAVector print v  SomeSized v <- pure (myUnsizedVector :: Unsized.Vector Int) -- ^ v is `Sized.Vector n Int` This enables interactive exploration with sized vectors in ghci, and is useful for using with other libraries and functions that expect sized vectors in an interactive setting.-(Note that as of GHC 8.6, you cannot get the n in scope in your ghci session using ScopedTypeVariables, like you can with do blocks)You can also use this as a constructor, to take a sized vector and "hide" the size, to produce an unsized vector: 2SomeSized :: Sized.Vector n a -> Unsized.Vector a  vector-sizedO(n) Construct a vector in a type-safe manner using a sized linked list.  Build (1 :< 2 :< 3 :< Nil) :: Vector 3 Int Build ("not" :< "much" :< Nil) :: Vector 2 String  Can also be used as a pattern. vector-sizedO(1)& Yield the length of the vector as an  . This is more like   than  , extracting the value from the  0 instance and not looking at the vector itself. vector-sizedO(1)% Yield the length of the vector as a  . This function doesn't do anything; it merely allows the size parameter of the vector to be passed around as a  . vector-sizedO(1) Reveal a  8 instance for a vector's length, determined at runtime. vector-sizedO(1) Reveal a   instance and  / for a vector's length, determined at runtime. vector-sizedO(1) Safe indexing using a  . vector-sizedO(1) Safe indexing using a  . vector-sizedO(1) Indexing using an   without bounds checking. vector-sizedO(1)/ Yield the first element of a non-empty vector. vector-sizedO(1). Yield the last element of a non-empty vector. vector-sizedLens to access (O(1)) and update (O(n)$) an arbitrary element by its index. vector-sizedType-safe lens to access (O(1)) and update (O(n)) an arbitrary element by its index which should be supplied via TypeApplications. vector-sizedLens to access (O(1)) and update (O(n)*) the first element of a non-empty vector. vector-sizedLens to access (O(1)) and update (O(n))) the last element of a non-empty vector. vector-sizedO(1)5 Safe indexing in a monad. See the documentation for + for an explanation of why this is useful. vector-sizedO(1)" Safe indexing in a monad using a  . See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Indexing using an Int without bounds checking. See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Yield the first element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Yield the last element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful. vector-sizedO(1) Yield a slice of the vector without copying it with an inferred length argument. vector-sizedO(1) Yield a slice of the vector without copying it with an explicit length argument. vector-sizedO(1) Yield all but the last element of a non-empty vector without copying. vector-sizedO(1) Yield all but the first element of a non-empty vector without copying. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield the first n elements. The resulting vector always contains this many elements. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is inferred from the type. vector-sizedO(1) Yield all but the the first n elements. The given vector must contain at least this many elements. The length of the resulting vector is givel explicitly as a   argument. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The lengths of the resulting vector are inferred from the type. vector-sizedO(1) Yield the first n elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a   argument. vector-sizedO(1) Empty vector. vector-sizedO(1)! Vector with exactly one element. vector-sizedO(n): Construct a vector in a type safe manner using a tuple.  fromTuple (1,2) :: Vector 2 Int fromTuple ("hey", "what's", "going", "on") :: Vector 4 String  vector-sizedO(n) Construct a vector with the same element in each position where the length is inferred from the type. vector-sizedO(n) Construct a vector with the same element in each position where the length is given explicitly as a   argument. vector-sizedO(n) construct a vector of the given length by applying the function to each index where the length is inferred from the type. vector-sizedO(n) construct a vector of the given length by applying the function to each index where the length is given explicitly as a   argument. vector-sizedO(n) Apply the function n times to a value. Zeroth element is original value. The length is inferred from the type. vector-sizedO(n) Apply the function n times to a value. Zeroth element is original value. The length is given explicitly as a   argument. vector-sizedO(n) Execute the monadic action n0 times and store the results in a vector where n is inferred from the type. vector-sizedO(n) Execute the monadic action n0 times and store the results in a vector where n is given explicitly as a   argument. vector-sizedO(n) Construct a vector of length n5 by applying the monadic action to each index where n is inferred from the type. vector-sizedO(n) Construct a vector of length n5 by applying the monadic action to each index where n is given explicitly as a   argument. vector-sizedO(n)! Construct a vector with exactly n elements by repeatedly applying the generator function to the a seed. The length is inferred from the type. vector-sizedO(n)! Construct a vector with exactly n elements by repeatedly applying the generator function to the a seed. The length is given explicitly as a   argument. vector-sizedO(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)'. The length is inferred from the type. vector-sizedO(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)&. The length is given explicitly as a   argument. vector-sizedO(n): Yield a vector of the given length containing the values x, x+y, x+2y, ...,  x + (n - 1)y'. The length is inferred from the type. vector-sizedO(n): Yield a vector of the given length containing the values x, x+y, x+2y, ...,  x + (n - 1)y&. The length is given explicitly as a   argument. vector-sizedO(n) Prepend an element. vector-sizedO(n) Append an element. vector-sizedO(m+n) Concatenate two vectors. vector-sizedO(n) Yield the argument but force it not to retain any extra memory, possibly by copying it.This is especially useful when dealing with slices. For example: force (slice 0 2 )Here, the slice retains a reference to the huge vector. Forcing it creates a copy of just the elements that belong to the slice and allows the huge vector to be garbage collected. vector-sizedO(m+n) For each pair (i,a)8 from the list, replace the vector element at position i by a. ,<5,9,2,7> // [(2,1),(0,3),(2,8)] = <3,9,8,7> vector-sizedO(m+n) For each pair (i,a) from the vector of index/value pairs, replace the vector element at position i by a. 0update <5,9,2,7> <(2,1),(0,3),(2,8)> = <3,9,8,7> vector-sizedO(m+n) For each index i4 from the index vector and the corresponding value a from the value vector, replace the element of the initial vector at position i by a. .update_ <5,9,2,7> <2,0,2> <1,3,8> = <3,9,8,7>)This function is useful for instances of & that cannot store pairs. Otherwise,  is probably more convenient. update_ xs is ys =  xs ( is ys)  vector-sized Same as () but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedO(m+n) For each pair (i,b), from the list, replace the vector element a at position i by f a b. ?accum (+) <5,9,2> [(2,4),(1,6),(0,3),(1,7)] = <5+3, 9+6+7, 2+4> vector-sizedO(m+n) For each pair (i,b)7 from the vector of pairs, replace the vector element a at position i by f a b. accumulate (+) <5,9,2> <(2,4),(1,6),(0,3),(1,7)> = <5+3, 9+6+7, 2+4> vector-sizedO(m+n) For each index i4 from the index vector and the corresponding value b from the the value vector, replace the element of the initial vector at position i by f a b. ?accumulate_ (+) <5,9,2> <2,1,0,1> <4,6,3,7> = <5+3, 9+6+7, 2+4>)This function is useful for instances of & that cannot store pairs. Otherwise,  is probably more convenient: accumulate_ f as is bs =  f as ( is bs)  vector-sizedSame as  but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedSame as  but without bounds checking. vector-sizedO(n) Reverse a vector. vector-sizedO(n)5 Yield the vector obtained by replacing each element i of the index vector by xs!i. This is equivalent to  (xs!) is# but is often much more efficient. 3backpermute <0,3,2,3,1,0> =  vector-sizedSame as  but without bounds checking. vector-sizedO(n). Pair each element in a vector with its index. vector-sizedO(n) Map a function over a vector. vector-sizedO(n)= Apply a function to every element of a vector and its index. vector-sizedO(n*m) Map a function over a vector and concatenate the results. The function is required to always return the same length vector. vector-sizedO(n) Apply the monadic action to all elements of the vector, yielding a vector of results. vector-sizedO(n) Apply the monadic action to every element of a vector and its index, yielding a vector of results. vector-sizedO(n) Apply the monadic action to all elements of a vector and ignore the results. vector-sizedO(n) Apply the monadic action to every element of a vector and its index, ignoring the results. vector-sizedO(n) Apply the monadic action to all elements of the vector, yielding a vector of results. Equvalent to flip . vector-sizedO(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip . vector-sizedO(n)< Zip two vectors of the same length with the given function. vector-sized*Zip three vectors with the given function. vector-sizedO(n) Zip two vectors of the same length with a function that also takes the elements' indices). vector-sizedO(n)$ Zip two vectors of the same length. vector-sizedO(n) Zip the two vectors of the same length with the monadic action and yield a vector of results. vector-sizedO(n) Zip the two vectors with a monadic action that also takes the element index and yield a vector of results. vector-sizedO(n) Zip the two vectors with the monadic action and ignore the results. vector-sizedO(n) Zip the two vectors with a monadic action that also takes the element index and ignore the results. vector-sized O(min(m,n)) Unzip a vector of pairs. vector-sizedO(n)) Check if the vector contains an element. vector-sizedO(n)= Check if the vector does not contain an element (inverse of ). vector-sizedO(n) Yield  - the first element matching the predicate or   if no such element exists. vector-sizedO(n) Yield  ; the index of the first element matching the predicate or   if no such element exists. vector-sizedO(n) Yield  ; the index of the first occurence of the given element or   if the vector does not contain the element. This is a specialised version of . vector-sizedO(n) Left fold. vector-sizedO(n) Left fold on non-empty vectors. vector-sizedO(n)# Left fold with strict accumulator. vector-sizedO(n)8 Left fold on non-empty vectors with strict accumulator. vector-sizedO(n) Right fold. vector-sizedO(n)! Right fold on non-empty vectors. vector-sizedO(n)& Right fold with a strict accumulator. vector-sizedO(n)9 Right fold on non-empty vectors with strict accumulator. vector-sizedO(n)< Left fold (function applied to each element and its index). vector-sizedO(n) Left fold with strict accumulator (function applied to each element and its index). vector-sizedO(n)= Right fold (function applied to each element and its index). vector-sizedO(n) Right fold with strict accumulator (function applied to each element and its index). vector-sizedO(n)- Check if all elements satisfy the predicate. vector-sizedO(n). Check if any element satisfies the predicate. vector-sizedO(n) Check if all elements are  . vector-sizedO(n) Check if any element is  . vector-sizedO(n)! Compute the sum of the elements. vector-sizedO(n)% Compute the product of the elements. vector-sizedO(n)3 Yield the maximum element of the non-empty vector. vector-sizedO(n) Yield the maximum element of the non-empty vector according to the given comparison function. vector-sizedO(n)3 Yield the minimum element of the non-empty vector. vector-sizedO(n) Yield the minimum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Yield the index of the maximum element of the non-empty vector. vector-sizedO(n) Yield the index of the maximum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Yield the index of the minimum element of the non-empty vector. vector-sizedO(n) Yield the index of the minimum element of the non-empty vector according to the given comparison function. vector-sizedO(n) Monadic fold. vector-sizedO(n)= Monadic fold (action applied to each element and its index). vector-sizedO(n)% Monadic fold over non-empty vectors. vector-sizedO(n)& Monadic fold with strict accumulator. vector-sizedO(n) Monadic fold with strict accumulator (action applied to each element and its index). vector-sizedO(n)= Monadic fold over non-empty vectors with strict accumulator. vector-sizedO(n)' Monadic fold that discards the result. vector-sizedO(n) Monadic fold that discards the result (action applied to each element and its index). vector-sizedO(n)> Monadic fold over non-empty vectors that discards the result. vector-sizedO(n)? Monadic fold with strict accumulator that discards the result. vector-sizedO(n) Monadic fold with strict accumulator that discards the result (action applied to each element and its index). vector-sizedO(n) Monad fold over non-empty vectors with strict accumulator that discards the result. vector-sized-Evaluate each action and collect the results. vector-sized-Evaluate each action and discard the results. vector-sizedO(n) Prescan. prescanl f z =  .  f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6> vector-sizedO(n)! Prescan with strict accumulator. vector-sizedO(n) Scan. vector-sizedO(n) Scan with strict accumulator. vector-sizedO(n) Haskell-style scan. vector-sizedO(n), Haskell-style scan with strict accumulator. vector-sizedO(n) Scan over a non-empty vector. vector-sizedO(n)8 Scan over a non-empty vector with a strict accumulator. vector-sizedO(n) Right-to-left prescan. vector-sizedO(n)/ Right-to-left prescan with strict accumulator. vector-sizedO(n) Right-to-left scan. vector-sizedO(n), Right-to-left scan with strict accumulator. vector-sizedO(n)" Right-to-left Haskell-style scan. vector-sizedO(n): Right-to-left Haskell-style scan with strict accumulator. vector-sizedO(n), Right-to-left scan over a non-empty vector. vector-sizedO(n) Right-to-left scan over a non-empty vector with a strict accumulator. vector-sizedO(n) Convert a vector to a list. vector-sizedO(n) Convert a list to a vector. vector-sizedO(n) Convert the first n elements of a list to a vector. The length of the resulting vector is inferred from the type. vector-sizedO(n) Convert the first n elements of a list to a vector. The length of the resulting vector is given explicitly as a   argument. vector-sizedO(n) Takes a list and returns a continuation providing a vector with a size parameter corresponding to the length of the list.Essentially converts a list into a vector with the proper size parameter, determined at runtime.See   vector-sizedO(n)/ Yield an immutable copy of the mutable vector. vector-sizedO(1) Unsafely convert a mutable vector to an immutable one withouy copying. The mutable vector may not be used after this operation. vector-sizedO(n). Yield a mutable copy of the immutable vector. vector-sizedO(n) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation. vector-sizedO(n)- Copy an immutable vector into a mutable one. vector-sized Convert a  into a / if it has the correct size, otherwise return  .  vector-sizedTakes a !) and returns a continuation providing a $ with a size parameter n that is determined at runtime based on the length of the input vector.Essentially converts a ! into a $" with the correct size parameter n.  vector-sizedApply a function on unsized vectors to a sized vector. The function must preserve the size of the vector, this is not checked.  vector-sizedApply a function on two unsized vectors to sized vectors. The function must preserve the size of the vectors, this is not checked. vector-sized-a vector of some (potentially unknown) length vector-sized3a value that depends on knowing the vector's length vector-sized"the value computed with the length vector-sized-a vector of some (potentially unknown) length vector-sizeda value that depends on knowing the vector's length, which is given as a   vector-sized"the value computed with the length vector-sizedstarting index vector-sizedstarting index vector-sizedlength vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized%list of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sized'vector of index/value pairs (of length n) vector-sizedaccumulating function f vector-sizedinitial vector (of length m) vector-sizedindex vector (of length n) vector-sizedvalue vector (of length n) vector-sizedxs value vector vector-sizedis index vector (of length n) vector-sizedxs value vector vector-sizedis index vector (of length n)  44 &'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi,jklmnopqrstuvwx./01234567yz{;<|}~=>SVWX,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXh,jklmnopqstuvwx./01234567yz{;<|}~=>SVWX  h i  , j k l m n o p q r s t  u v w x . / 0 1 2 3 4 5 6 7 y z { ; < | } ~  = >                                                                                                                                    S V W X     , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X  h i  , j k l m n o p q r s t  u v w x . / 0 1 2 3 4 5 6 7 y z { ; < | } ~  = >                                                                                                                                    S V W X  ,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX  h i  , j k l m n o p q r s t  u v w x . / 0 1 2 3 4 5 6 7 y z { ; < | } ~  = >                                                                                                                                    S V W X   vector-sized-1.6.1-inplace!Data.Vector.Unboxed.Mutable.Sized!Data.Vector.Generic.Mutable.Sized*Data.Vector.Generic.Mutable.Sized.InternalData.Vector.Generic.Sized"Data.Vector.Generic.Sized.InternalData.Vector.Mutable.Sized#Data.Vector.Primitive.Mutable.SizedData.Vector.Primitive.SizedData.Vector.Sized"Data.Vector.Storable.Mutable.SizedData.Vector.Storable.SizedData.Vector.Unboxed.Sized vector-sizedData.Vector.Generic.MutableMVector Data.VectorlengthData.Vector.GenericVectorSizedControl.ApplicativeZipListData.Vector.StorableMutableData.Vector.MutableData.Vector.PrimitiveData.Vector.Primitive.Mutable PrimitiveindexMDataData.Vector.Storable.MutableStorableData.Vector.UnboxData.Vector.Unbox.MutableData.Vector.Unbox.Mutable.SizedData.Vector.Unbox.SizedUnboxedvector-0.13.1.0-cdc703180793fa203ea0fd99e6424de939d1ea4ba445f27833426bbd8b09488cData.Vector.Unboxed.BaseUnbox $fDataMVector$fStorableMVector$fNFDataMVectorlength'nullsliceslice'inittailtaketake'dropdrop'splitAtsplitAt'overlapsnew unsafeNew replicate replicate' replicateM replicateM'clonegrow growFrontclearreadread' unsafeReadwritewrite' unsafeWritemodifymodify' unsafeModifyswap unsafeSwapexchange exchange'unsafeExchangenextPermutationsetcopy unsafeCopymovetoSized withSized fromSized $fIxVector $fShowVector $fEqVector $fOrdVector$fFunctorVector$fFoldableVector$fTraversableVector$fNFDataVector $fShow1Vector $fEq1Vector $fOrd1Vector $fDataVector BuildVectorNil:< SomeSizedBuild knownLength knownLength'indexindex' unsafeIndexheadlastixix'_head_lastindexM' unsafeIndexMheadMlastMempty singleton fromTuplegenerate generate'iterateN iterateN' generateM generateM'unfoldrN unfoldrN' enumFromN enumFromN' enumFromStepNenumFromStepN'conssnoc++force//updateupdate_ unsafeUpd unsafeUpdate unsafeUpdate_accum accumulate accumulate_ unsafeAccumunsafeAccumulateunsafeAccumulate_reverse backpermuteunsafeBackpermuteindexedmapimap concatMapmapMimapMmapM_imapM_forMforM_zipWithzipWith3zipWith4zipWith5zipWith6izipWith izipWith3 izipWith4 izipWith5 izipWith6zipzip3zip4zip5zip6zipWithM izipWithM zipWithM_ izipWithM_unzipunzip3unzip4unzip5unzip6elemnotElemfind findIndex elemIndexfoldlfoldl1foldl'foldl1'foldrfoldr1foldr'foldr1'ifoldlifoldl'ifoldrifoldr'allanyandorsumproductmaximum maximumByminimum minimumBymaxIndex maxIndexByminIndex minIndexByfoldMifoldMfold1MfoldM'ifoldM'fold1M'foldM_ifoldM_fold1M_foldM'_ifoldM'_fold1M'_sequence sequence_prescanl prescanl' postscanl postscanl'scanlscanl'scanl1scanl1'prescanr prescanr' postscanr postscanr'scanrscanr'scanr1scanr1'toListfromList fromListN fromListN' withSizedListconvertfreeze unsafeFreezethaw unsafeThawwithVectorUnsafezipVectorsUnsafe"$fTraversableWithIndexFiniteVector$fFoldableWithIndexFiniteVector$fFunctorWithIndexFiniteVector$fFiniteBitsVector $fBitsVector$fBinaryVector$fFloatingVector$fFractionalVector $fNumVector$fHashableVector$fHashableVector0$fHashableVector1$fRepresentableVector$fDistributiveVector$fMonoidVector$fSemigroupVector$fComonadApplyVector$fComonadVector $fMonadVector$fApplicativeVector$fStorableVector $fReadVector$fShowBuildVector$fVectorVectorVector$fMVectorMVectorVector $fUnboxVectorghc-prim GHC.TypesIntbase Data.ProxyProxyfinite-typelits-0.1.6.0-58c8225fc45b7b9c573738817da5bc86286089fc1f38eec8bcdb453ae1b19f50Data.Finite.InternalFiniteFalseSV_ GHC.TypeNatsKnownNat GHC.TypeLitsnatVal GHC.MaybeJustNothingTrueGHC.BitsBitsForeign.StorableGHC.BaseMonoidmempty Semigroupcomonad-5.0.8-832c3c93d298240b8e3bad62fc8b35667d45e1ac851a523649cf825193fd9862Control.Comonadextract duplicateMonad Applicative