n*:J      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                    ! " # $ % & ' ( ) * + , - . / 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 Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                                                                                                                    ! " # $ % & ' ( ) * + , - . / 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 Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                                   None-16FK2: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!None -;<=QSTVhx.O(1). Yield the length of the mutable vector as an .O(1)- Yield the length of the mutable vector as a . O(1)+ Check whether the mutable vector is empty. O(1)Z Yield a slice of the mutable vector without copying it with an inferred length argument. O(1)Z Yield a slice of the mutable vector without copying it with an explicit length argument. O(1)O Yield all but the last element of a non-empty mutable vector without copying. O(1)P Yield all but the first element of a non-empty mutable vector without copying.O(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.O(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.O(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.O(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.O(1) Yield the first ns elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type.O(1) Yield the first nw elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a  argument.O(1)$ Check whether two vectors overlap. CCreate a mutable vector where the length is inferred from the type.cCreate a mutable vector where the length is inferred from the type. The memory is not initialized.fCreate a mutable vector where the length is inferred from the type and fill it with an initial value.CCreate a mutable vector where the length is given explicitly as a , argument and fill it with an initial value.Create a mutable vector where the length is inferred from the type and fill it with values produced by repeatedly executing the monadic action.CCreate a mutable vector where the length is given explicitly as a W argument and fill it with values produced by repeatedly executing the monadic action."Create a copy of a mutable vector.9Grow a mutable vector by an amount given explicitly as a  argument.KGrow a mutable vector (from the front) by an amount given explicitly as a  argument.gReset all elements of the vector to some undefined value, clearing all references to external objects.O(1)7 Yield the element at a given type-safe position using . O(1)7 Yield the element at a given type-safe position using .!O(1) Yield the element at a given # position without bounds checking."O(1)9 Replace the element at a given type-safe position using .#O(1)9 Replace the element at a given type-safe position using .$O(1) Replace the element at a given # position without bounds checking.%O(1)8 Modify the element at a given type-safe position using .&O(1)8 Modify the element at a given type-safe position using .'O(1) Modify the element at a given # position without bounds checking.(O(1)6 Swap the elements at given type-safe positions using s.)O(1) Swap the elements at given $ positions without bounds checking.*O(1)V Replace the element at a given type-safe position and return the old element, using .+O(1)V Replace the element at a given type-safe position and return the old element, using .,O(1) Replace the element at a given F position and return the old element. No bounds checks are performed.-\Compute the next permutation (in lexicographic order) of a given vector in-place. Returns ( when the input is the last permutation..2Set all elements of the vector to the given value.//Copy a vector. The two vectors may not overlap.0DCopy a vector. The two vectors may not overlap. This is not checked.1ZMove 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.2 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   .3Takes a   ) and returns a continuation providing a   with a size parameter nH 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   .4 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 . starting index starting indexlength/targetsource0targetsource1targetsource/  !"#$%&'()*+,-./01234/  "#%&(*+!$'),-./10234None -13456;=FK52A 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!565656None%-3456;<=CFKQSTVdh˼3Internal existential wrapper used for implementing D pattern synonymDPattern 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 (D v) =  ( (+) v (cT 1)) -- ^ here, v is `Sized.Vector n Int`, and we have ` n` The np 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 D (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 (c 1)) =Remember that the type of final result of your function (the Int, here) must not depend on nK. 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 \Remember that the final type of the result of the do block ('()', here) must not depend on n. However, the \Also useful in ghci, where you can pattern match to get sized vectors from unsized vectors. nghci> 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 nW in scope in your ghci session using ScopedTypeVariables, like you can with do blocks)rYou 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).EO(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.FO(1)% Yield the length of the vector as a . This function doesn't doW anything; it merely allows the size parameter of the vector to be passed around as a .GO(1) Reveal a 8 instance for a vector's length, determined at runtime.HO(1) Reveal a  instance and / for a vector's length, determined at runtime.IO(1) Safe indexing using a .JO(1) Safe indexing using a .KO(1) Indexing using an  without bounds checking.LO(1)/ Yield the first element of a non-empty vector.MO(1). Yield the last element of a non-empty vector.NLens to access (O(1)) and update (O(n)$) an arbitrary element by its index.OLens to access (O(1)) and update (O(n)*) the first element of a non-empty vector.PLens to access (O(1)) and update (O(n))) the last element of a non-empty vector.QO(1) Safe indexing in a monad. xThe 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 Q/, copying can be implemented like this instead: Rcopy 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.RO(1)" Safe indexing in a monad using a . See the documentation for Q* for an explanation of why this is useful.SO(1)K Indexing using an Int without bounds checking. See the documentation for Q* for an explanation of why this is useful.TO(1)V Yield the first element of a non-empty vector in a monad. See the documentation for Q* for an explanation of why this is useful.UO(1)U Yield the last element of a non-empty vector in a monad. See the documentation for Q* for an explanation of why this is useful.VO(1)R Yield a slice of the vector without copying it with an inferred length argument.WO(1)R Yield a slice of the vector without copying it with an explicit length argument.XO(1)G Yield all but the last element of a non-empty vector without copying.YO(1)H Yield all but the first element of a non-empty vector without copying.ZO(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.[O(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.\O(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.]O(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.^O(1) Yield the first ns elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type._O(1) Yield the first nx elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a  argument.`O(1) Empty vector.aO(1)! Vector with exactly one element.bO(n), Construct a vector in a type-safe manner. j fromTuple (1,2) :: Vector v 2 Int fromTuple ("hey", "what's", "going", "on") :: Vector v 4 String cO(n)g Construct a vector with the same element in each position where the length is inferred from the type.dO(n)f Construct a vector with the same element in each position where the length is given explicitly as a  argument.eO(n){ Construct a vector of the given length by applying the function to each index where the length is inferred from the type.fO(n)z Construct a vector of the given length by applying the function to each index where the length is given explicitly as a  argument.gO(n) Apply the function n_ times to a value. Zeroth element is the original value. The length is inferred from the type.hO(n) Apply the function n^ times to a value. Zeroth element is the original value. The length is given explicitly as a  argument.iO(n) Execute the monadic action n0 times and store the results in a vector where n is inferred from the type.jO(n) Execute the monadic action n0 times and store the results in a vector where n is given explicitly as a  argument.kO(n) Construct a vector of length n5 by applying the monadic action to each index where n is inferred from the type.lO(n) Construct a vector of length n5 by applying the monadic action to each index where n is given explicitly as a  argument.mO(n)! Construct a vector with exactly nn elements by repeatedly applying the generator function to the a seed. The length is inferred from the type.nO(n)! Construct a vector with exactly nm elements by repeatedly applying the generator function to the a seed. The length is given explicitly as a  argument.oO(n) Yield a vector of length n containing the values x, x+1, ...  x + (n - 1)'. The length is inferred from the type.pO(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)% The length is given explicitly as a  argument.qO(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.rO(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.sO(n) Prepend an element.tO(n) Append an element.uO(m+n) Concatenate two vectors.vO(n)Y 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 <huge vector>)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.wO(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>xO(m+n) For each pair (i,a)O 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>yO(m+n) For each index i4 from the index vector and the corresponding value aO 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 5& that cannot store pairs. Otherwise, x is probably more convenient. update_ xs is ys = x xs ( is ys) z Same as (w) but without bounds checking.{Same as x but without bounds checking.|Same as y but without bounds checking.}O(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>~O(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. Daccumulate (+) <5,9,2> <(2,4),(1,6),(0,3),(1,7)> = <5+3, 9+6+7, 2+4>O(m+n) For each index i4 from the index vector and the corresponding value bT 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 5& that cannot store pairs. Otherwise, ~ is probably more convenient: accumulate_ f as is bs = ~ f as ( is bs) Same as } but without bounds checking.Same as ~ but without bounds checking.Same as  but without bounds checking.O(n) Reverse a vectorO(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 <a,b,c,d> <0,3,2,3,1,0> = <a,d,c,d,b,a>Same as  but without bounds checking.O(n). Pair each element in a vector with its index.O(n) Map a function over a vector.O(n)= Apply a function to every element of a vector and its index.O(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.O(n)W Apply the monadic action to all elements of the vector, yielding a vector of results.O(n)d Apply the monadic action to every element of a vector and its index, yielding a vector of results.O(n)N Apply the monadic action to all elements of a vector and ignore the results.O(n)\ Apply the monadic action to every element of a vector and its index, ignoring the results.O(n)e Apply the monadic action to all elements of the vector, yielding a vector of results. Equvalent to flip .O(n)] Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip .O(n)< Zip two vectors of the same length with the given function.*Zip three vectors with the given function.O(n)\ Zip two vectors of the same length with a function that also takes the elements' indices).O(n)# Zip two vectors of the same lengthO(n)_ Zip the two vectors of the same length with the monadic action and yield a vector of results.O(n)l Zip the two vectors with a monadic action that also takes the element index and yield a vector of results.O(n)D Zip the two vectors with the monadic action and ignore the results.O(n)e Zip the two vectors with a monadic action that also takes the element index and ignore the results. O(min(m,n)) Unzip a vector of pairs.O(n)) Check if the vector contains an element.O(n)= Check if the vector does not contain an element (inverse of ).O(n) Yield - the first element matching the predicate or  if no such element exists.O(n) Yield ; the index of the first element matching the predicate or  if no such element exists.O(n) Yield ; the index of the first occurence of the given element or O if the vector does not contain the element. This is a specialised version of .O(n) Left fold.O(n) Left fold on non-empty vectors.O(n)# Left fold with strict accumulator.O(n)8 Left fold on non-empty vectors with strict accumulator.O(n) Right fold.O(n)! Right fold on non-empty vectors.O(n)& Right fold with a strict accumulator.O(n)9 Right fold on non-empty vectors with strict accumulator.O(n)< Left fold (function applied to each element and its index).O(n)U Left fold with strict accumulator (function applied to each element and its index).O(n)= Right fold (function applied to each element and its index).O(n)V Right fold with strict accumulator (function applied to each element and its index).O(n)- Check if all elements satisfy the predicate.O(n). Check if any element satisfies the predicate.O(n) Check if all elements are O(n) Check if any element is O(n)! Compute the sum of the elements.O(n)% Compute the product of the elements.O(n)3 Yield the maximum element of the non-empty vector.O(n)_ Yield the maximum element of the non-empty vector according to the given comparison function.O(n)3 Yield the minimum element of the non-empty vector.O(n)_ Yield the minimum element of the non-empty vector according to the given comparison function.O(n)@ Yield the index of the maximum element of the non-empty vector.O(n)l Yield the index of the maximum element of the non-empty vector according to the given comparison function.O(n)@ Yield the index of the minimum element of the non-empty vector.O(n)l Yield the index of the minimum element of the non-empty vector according to the given comparison function.O(n) Monadic fold.O(n)= Monadic fold (action applied to each element and its index).O(n)% Monadic fold over non-empty vectors.O(n)& Monadic fold with strict accumulator.O(n)V Monadic fold with strict accumulator (action applied to each element and its index).O(n)= Monadic fold over non-empty vectors with strict accumulator.O(n)' Monadic fold that discards the result.O(n)W Monadic fold that discards the result (action applied to each element and its index).O(n)> Monadic fold over non-empty vectors that discards the result.O(n)? Monadic fold with strict accumulator that discards the result.O(n)o Monadic fold with strict accumulator that discards the result (action applied to each element and its index).O(n)U Monad fold over non-empty vectors with strict accumulator that discards the result.-Evaluate each action and collect the results.-Evaluate each action and discard the results.O(n) Prescan prescanl f z = X .  f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6>O(n)! Prescan with strict accumulator.O(n) ScanO(n) Scan with strict accumulator.O(n) Haskell-style scan.O(n), Haskell-style scan with strict accumulator.O(n) Scan over a non-empty vector.O(n)8 Scan over a non-empty vector with a strict accumulator.O(n) Right-to-left prescan.O(n)/ Right-to-left prescan with strict accumulator.O(n) Right-to-left scan.O(n), Right-to-left scan with strict accumulator.O(n)" Right-to-left Haskell-style scan.O(n): Right-to-left Haskell-style scan with strict accumulator.O(n), Right-to-left scan over a non-empty vector.O(n)G Right-to-left scan over a non-empty vector with a strict accumulator.O(n) Convert a vector to a list.O(n) Convert a list to a vector.O(n) Convert the first n_ elements of a list to a vector. The length of the resultant vector is inferred from the type.O(n) Convert the first n^ elements of a list to a vector. The length of the resultant vector is given explicitly as a  argument.O(n){ Takes a list and returns a continuation providing a vector with a size parameter corresponding to the length of the list.aEssentially converts a list into a vector with the proper size parameter, determined at runtime.See O(n) Convert different vector types.O(n)/ Yield an immutable copy of the mutable vector.O(1) Unsafely convert a mutable vector to an immutable one withouy copying. The mutable vector may not be used after this operation.O(n). Yield a mutable copy of the immutable vector.O(n) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation.O(n)- Copy an immutable vector into a mutable one. Convert a  into a 7 if it has the correct size, otherwise return Nothing.Takes a ) and returns a continuation providing a  with a size parameter nH that is determined at runtime based on the length of the input vector.Essentially converts a  into a " with the correct size parameter n.Apply a function on unsized vectors to a sized vector. The function must preserve the size of the vector, this is not checked.The E 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.The E 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.,Non-empty sized vectors are lawful comonads. is L[ 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]]  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".The E instance for sized vectors does not have the same behaviour as the 0 instance for the unsized vectors found in the vectorsC package. The instance defined here has the same behaviour as the  instance.Any sized vector containing  elements is itself .G-a vector of some (potentially unknown) length3a value that depends on knowing the vector's length"the value computed with the lengthH-a vector of some (potentially unknown) lengthIa value that depends on knowing the vector's length, which is given as a "the value computed with the lengthVstarting indexWstarting indexlengthwinitial vector (of length m)%list of index/value pairs (of length n)xinitial vector (of length m)'vector of index/value pairs (of length n)yinitial vector (of length m)index vector (of length n)value vector (of length n)zinitial vector (of length m)%list of index/value pairs (of length n){initial vector (of length m)'vector of index/value pairs (of length n)|initial vector (of length m)index vector (of length n)value vector (of length n)}accumulating function finitial vector (of length m)%list of index/value pairs (of length n)~accumulating function finitial vector (of length m)'vector of index/value pairs (of length n)accumulating function finitial vector (of length m)index vector (of length n)value vector (of length n)accumulating function finitial vector (of length m)%list of index/value pairs (of length n)accumulating function finitial vector (of length m)'vector of index/value pairs (of length n)accumulating function finitial vector (of length m)index vector (of length n)value vector (of length n)xs value vectoris index vector (of length n)xs value vectoris index vector (of length n)5DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~5DEFGHIJKLMQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~NOP5D44None-<QSTV#D/ specialized to use .O(1). Yield the length of the mutable vector as an .O(1)- Yield the length of the mutable vector as a .O(1)+ Check whether the mutable vector is empty.O(1)Z Yield a slice of the mutable vector without copying it with an inferred length argument. O(1)Z Yield a slice of the mutable vector without copying it with an explicit length argument. O(1)O Yield all but the last element of a non-empty mutable vector without copying. O(1)P Yield all but the first element of a non-empty mutable vector without copying. O(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. O(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.O(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.O(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.O(1) Yield the first ns elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type.O(1) Yield the first nx elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a  argument.O(1) Check if two vectors overlap. CCreate a mutable vector where the length is inferred from the type.cCreate a mutable vector where the length is inferred from the type. The memory is not initialized.fCreate a mutable vector where the length is inferred from the type and fill it with an initial value.CCreate a mutable vector where the length is given explicitly as a , argument and fill it with an initial value.Create a mutable vector where the length is inferred from the type and fill it with values produced by repeatedly executing the monadic action.CCreate a mutable vector where the length is given explicitly as a W argument and fill it with values produced by repeatedly executing the monadic action."Create a copy of a mutable vector.9Grow a mutable vector by an amount given explicitly as a  argument.KGrow a mutable vector (from the front) by an amount given explicitly as a  argument.gReset all elements of the vector to some undefined value, clearing all references to external objects.O(1)7 Yield the element at a given type-safe position using .O(1)7 Yield the element at a given type-safe position using .O(1) Yield the element at a given # position without bounds checking. O(1)9 Replace the element at a given type-safe position using .!O(1)9 Replace the element at a given type-safe position using ."O(1) Replace the element at a given # position without bounds checking.#O(1)8 Modify the element at a given type-safe position using .$O(1)8 Modify the element at a given type-safe position using .%O(1) Modify the element at a given # position without bounds checking.&O(1): Swap the elements at the given type-safe positions using s.'O(1) Swap the elements at the given $ positions without bounds checking.(O(1)V Replace the element at a given type-safe position and return the old element, using .)O(1)V Replace the element at a given type-safe position and return the old element, using .*O(1) Replace the element at a given F position and return the old element. No bounds checks are performed.+WCompute the next permutation (lexicographically) of a given vector in-place. Returns ( when the input is the last permutation.,2Set all elements of the vector to the given value.-/Copy a vector. The two vectors may not overlap..DCopy a vector. The two vectors may not overlap. This is not checked./ZMove 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.0 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   .1Takes a  ) and returns a continuation providing a  with a size parameter nH 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  .2 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 .starting index starting indexlength-targetsource.targetsource/targetsource/      !"#$%&'()*+,-./012/      !#$&()"%'*+,-/.012None -;<=QSTVdD3 specialized to use .4Pattern 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 (4 v) =  ( (+) v (ST 1)) -- ^ here, v is `Sized.Vector n Int`, and we have ` n` The np 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 4 (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 (S 1)) =Remember that the type of final result of your function (the Int, here) must not depend on nK. 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 \Remember that the final type of the result of the do block ('()', here) must not depend on n. However, the \Also useful in ghci, where you can pattern match to get sized vectors from unsized vectors. nghci> 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 nW in scope in your ghci session using ScopedTypeVariables, like you can with do blocks)rYou 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 5O(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.6O(1)% Yield the length of the vector as a . This function doesn't doW anything; it merely allows the size parameter of the vector to be passed around as a .7O(1) Reveal a 8 instance for a vector's length, determined at runtime.8O(1) Reveal a  instance and / for a vector's length, determined at runtime.9O(1) Safe indexing using a .:O(1) Safe indexing using a .;O(1) Indexing using an  without bounds checking.<O(1)/ Yield the first element of a non-empty vector.=O(1). Yield the last element of a non-empty vector.>Lens to access (O(1)) and update (O(n)$) an arbitrary element by its index.?Lens to access (O(1)) and update (O(n)*) the first element of a non-empty vector.@Lens to access (O(1)) and update (O(n))) the last element of a non-empty vector.AO(1)6 Safe indexing in a monad. See the documentation for * for an explanation of why this is useful.BO(1)" Safe indexing in a monad using a . See the documentation for * for an explanation of why this is useful.CO(1)K Indexing using an Int without bounds checking. See the documentation for * for an explanation of why this is useful.DO(1)V Yield the first element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful.EO(1)U Yield the last element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful.FO(1)R Yield a slice of the vector without copying it with an inferred length argument.GO(1)R Yield a slice of the vector without copying it with an explicit length argument.HO(1)G Yield all but the last element of a non-empty vector without copying.IO(1)H Yield all but the first element of a non-empty vector without copying.JO(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.KO(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.LO(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.MO(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.NO(1) Yield the first nv elements paired with the remainder without copying. The lengths of the resulting vectors are inferred from the type.OO(1) Yield the first nx elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a  argument.PO(1) Empty vector.QO(1)! Vector with exactly one element.RO(n), Construct a vector in a type safe manner. f fromTuple (1,2) :: Vector 2 Int fromTuple ("hey", "what's", "going", "on") :: Vector 4 String SO(n)g Construct a vector with the same element in each position where the length is inferred from the type.TO(n)f Construct a vector with the same element in each position where the length is given explicitly as a  argument.UO(n){ construct a vector of the given length by applying the function to each index where the length is inferred from the type.VO(n)z construct a vector of the given length by applying the function to each index where the length is given explicitly as a  argument.WO(n) Apply the function n[ times to a value. Zeroth element is original value. The length is inferred from the type.XO(n) Apply the function nZ times to a value. Zeroth element is original value. The length is given explicitly as a  argument.YO(n) Execute the monadic action n0 times and store the results in a vector where n is inferred from the type.ZO(n) Execute the monadic action n0 times and store the results in a vector where n is given explicitly as a  argument.[O(n) Construct a vector of length nQ by applying the monadic action to each index where n is inferred from the type.\O(n) Construct a vector of length nP by applying the monadic action to each index where n is given explicitly as a  argument.]O(n)! Construct a vector with exactly nn elements by repeatedly applying the generator function to the a seed. The length is inferred from the type.^O(n)! Construct a vector with exactly nm elements by repeatedly applying the generator function to the a seed. The length is given explicitly as a  argument._O(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)(. The length is inferred from the type.`O(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)&. The length is given explicitly as a  argument.aO(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.bO(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.cO(n) Prepend an element.dO(n) Append an element.eO(m+n) Concatenate two vectors.fO(n)Y 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 <huge vector>)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.gO(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>hO(m+n) For each pair (i,a)O 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>iO(m+n) For each index i4 from the index vector and the corresponding value aO 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 3& that cannot store pairs. Otherwise, h is probably more convenient. update_ xs is ys = h xs ( is ys) j Same as (g) but without bounds checking.kSame as h but without bounds checking.lSame as i but without bounds checking.mO(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>nO(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. Daccumulate (+) <5,9,2> <(2,4),(1,6),(0,3),(1,7)> = <5+3, 9+6+7, 2+4>oO(m+n) For each index i4 from the index vector and the corresponding value bT 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 3& that cannot store pairs. Otherwise, n is probably more convenient: accumulate_ f as is bs = n f as ( is bs) pSame as m but without bounds checking.qSame as n but without bounds checking.rSame as o but without bounds checking.sO(n) Reverse a vector.tO(n)5 Yield the vector obtained by replacing each element i of the index vector by xs!i. This is equivalent to w (xs!) is# but is often much more efficient. 3backpermute <a,b,c,d> <0,3,2,3,1,0> = <a,d,c,d,b,a>uSame as t but without bounds checking.vO(n). Pair each element in a vector with its index.wO(n) Map a function over a vector.xO(n)= Apply a function to every element of a vector and its index.yO(n*m)} Map a function over a vector and concatenate the results. The function is required to always return the same length vector.zO(n)W Apply the monadic action to all elements of the vector, yielding a vector of results.{O(n)d Apply the monadic action to every element of a vector and its index, yielding a vector of results.|O(n)N Apply the monadic action to all elements of a vector and ignore the results.}O(n)\ Apply the monadic action to every element of a vector and its index, ignoring the results.~O(n)e Apply the monadic action to all elements of the vector, yielding a vector of results. Equvalent to flip z.O(n)] Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip |.O(n)< Zip two vectors of the same length with the given function.*Zip three vectors with the given function.O(n)\ Zip two vectors of the same length with a function that also takes the elements' indices).O(n)$ Zip two vectors of the same length.O(n)_ Zip the two vectors of the same length with the monadic action and yield a vector of results.O(n)l Zip the two vectors with a monadic action that also takes the element index and yield a vector of results.O(n)D Zip the two vectors with the monadic action and ignore the results.O(n)e Zip the two vectors with a monadic action that also takes the element index and ignore the results. O(min(m,n)) Unzip a vector of pairs.O(n)) Check if the vector contains an element.O(n)= Check if the vector does not contain an element (inverse of ).O(n) Yield - the first element matching the predicate or  if no such element exists.O(n) Yield ; the index of the first element matching the predicate or  if no such element exists.O(n) Yield ; the index of the first occurence of the given element or O if the vector does not contain the element. This is a specialised version of .O(n) Left fold.O(n) Left fold on non-empty vectors.O(n)# Left fold with strict accumulator.O(n)8 Left fold on non-empty vectors with strict accumulator.O(n) Right fold.O(n)! Right fold on non-empty vectors.O(n)& Right fold with a strict accumulator.O(n)9 Right fold on non-empty vectors with strict accumulator.O(n)< Left fold (function applied to each element and its index).O(n)U Left fold with strict accumulator (function applied to each element and its index).O(n)= Right fold (function applied to each element and its index).O(n)V Right fold with strict accumulator (function applied to each element and its index).O(n)- Check if all elements satisfy the predicate.O(n). Check if any element satisfies the predicate.O(n) Check if all elements are .O(n) Check if any element is .O(n)! Compute the sum of the elements.O(n)% Compute the product of the elements.O(n)3 Yield the maximum element of the non-empty vector.O(n)_ Yield the maximum element of the non-empty vector according to the given comparison function.O(n)3 Yield the minimum element of the non-empty vector.O(n)_ Yield the minimum element of the non-empty vector according to the given comparison function.O(n)@ Yield the index of the maximum element of the non-empty vector.O(n)l Yield the index of the maximum element of the non-empty vector according to the given comparison function.O(n)@ Yield the index of the minimum element of the non-empty vector.O(n)l Yield the index of the minimum element of the non-empty vector according to the given comparison function.O(n) Monadic fold.O(n)= Monadic fold (action applied to each element and its index).O(n)% Monadic fold over non-empty vectors.O(n)& Monadic fold with strict accumulator.O(n)V Monadic fold with strict accumulator (action applied to each element and its index).O(n)= Monadic fold over non-empty vectors with strict accumulator.O(n)' Monadic fold that discards the result.O(n)W Monadic fold that discards the result (action applied to each element and its index).O(n)> Monadic fold over non-empty vectors that discards the result.O(n)? Monadic fold with strict accumulator that discards the result.O(n)o Monadic fold with strict accumulator that discards the result (action applied to each element and its index).O(n)U Monad fold over non-empty vectors with strict accumulator that discards the result.-Evaluate each action and collect the results.-Evaluate each action and discard the results.O(n) Prescan. prescanl f z = H .  f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6>O(n)! Prescan with strict accumulator.O(n) Scan.O(n) Scan with strict accumulator.O(n) Haskell-style scan.O(n), Haskell-style scan with strict accumulator.O(n) Scan over a non-empty vector.O(n)8 Scan over a non-empty vector with a strict accumulator.O(n) Right-to-left prescan.O(n)/ Right-to-left prescan with strict accumulator.O(n) Right-to-left scan.O(n), Right-to-left scan with strict accumulator.O(n)" Right-to-left Haskell-style scan.O(n): Right-to-left Haskell-style scan with strict accumulator.O(n), Right-to-left scan over a non-empty vector.O(n)G Right-to-left scan over a non-empty vector with a strict accumulator.O(n) Convert a vector to a list.O(n) Convert a list to a vector.O(n) Convert the first n_ elements of a list to a vector. The length of the resulting vector is inferred from the type.O(n) Convert the first n^ elements of a list to a vector. The length of the resulting vector is given explicitly as a  argument.O(n){ Takes a list and returns a continuation providing a vector with a size parameter corresponding to the length of the list.aEssentially converts a list into a vector with the proper size parameter, determined at runtime.See O(n)/ Yield an immutable copy of the mutable vector.O(1) Unsafely convert a mutable vector to an immutable one without copying. The mutable vector may not be used after this operation.O(n). Yield a mutable copy of the immutable vector.O(n) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation.O(n)- Copy an immutable vector into a mutable one. Convert a  into a / if it has the correct size, otherwise return .Takes a  ) and returns a continuation providing a 3 with a size parameter nH that is determined at runtime based on the length of the input vector.Essentially converts a   into a 3" with the correct size parameter n.Apply a function on unsized vectors to a sized vector. The function must preserve the size of the vector, this is not checked.7-a vector of some (potentially unknown) length3a value that depends on knowing the vector's length"the value computed with the length8-a vector of some (potentially unknown) lengthIa value that depends on knowing the vector's length, which is given as a "the value computed with the lengthFstarting indexGstarting indexlengthginitial vector (of length m)%list of index/value pairs (of length n)hinitial vector (of length m)'vector of index/value pairs (of length n)iinitial vector (of length m)index vector (of length n)value vector (of length n)jinitial vector (of length m)%list of index/value pairs (of length n)kinitial vector (of length m)'vector of index/value pairs (of length n)linitial vector (of length m)index vector (of length n)value vector (of length n)maccumulating function finitial vector (of length m)%list of index/value pairs (of length n)naccumulating function finitial vector (of length m)'vector of index/value pairs (of length n)oaccumulating function finitial vector (of length m)index vector (of length n)value vector (of length n)paccumulating function finitial vector (of length m)%list of index/value pairs (of length n)qaccumulating function finitial vector (of length m)'vector of index/value pairs (of length n)raccumulating function finitial vector (of length m)index vector (of length n)value vector (of length n)txs value vectoris index vector (of length n)uxs value vectoris index vector (of length n)3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~3456789:;<=ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu>?@vwxyz{|}~44None-<QSTV/ specialized to use .O(1). Yield the length of the mutable vector as an .O(1)- Yield the length of the mutable vector as a .O(1)+ Check whether the mutable vector is empty.O(1)Z Yield a slice of the mutable vector without copying it with an inferred length argument.O(1)Z Yield a slice of the mutable vector without copying it with an explicit length argument.O(1)O Yield all but the last element of a non-empty mutable vector without copying.O(1)P Yield all but the first element of a non-empty mutable vector without copying.O(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.O(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.O(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.O(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.O(1) Yield the first ns elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type.O(1) Yield the first nx elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a  argument.O(1) Check if two vectors overlap. CCreate a mutable vector where the length is inferred from the type.cCreate a mutable vector where the length is inferred from the type. The memory is not initialized.fCreate a mutable vector where the length is inferred from the type and fill it with an initial value.CCreate a mutable vector where the length is given explicitly as a , argument and fill it with an initial value.Create a mutable vector where the length is inferred from the type and fill it with values produced by repeatedly executing the monadic action.CCreate a mutable vector where the length is given explicitly as a W argument and fill it with values produced by repeatedly executing the monadic action."Create a copy of a mutable vector.9Grow a mutable vector by an amount given explicitly as a  argument.KGrow a mutable vector (from the front) by an amount given explicitly as a  argument.gReset all elements of the vector to some undefined value, clearing all references to external objects.O(1)7 Yield the element at a given type-safe position using .O(1)7 Yield the element at a given type-safe position using .O(1) Yield the element at a given # position without bounds checking.O(1)9 Replace the element at a given type-safe position using .O(1)9 Replace the element at a given type-safe position using .O(1) Replace the element at a given # position without bounds checking.O(1)8 Modify the element at a given type-safe position using .O(1)8 Modify the element at a given type-safe position using .O(1) Modify the element at a given # position without bounds checking.O(1): Swap the elements at the given type-safe positions using s.O(1) Swap the elements at the given $ positions without bounds checking.O(1)V Replace the element at a given type-safe position and return the old element, using .O(1)V Replace the element at a given type-safe position and return the old element, using . O(1) Replace the element at a given F position and return the old element. No bounds checks are performed. WCompute the next permutation (lexicographically) of a given vector in-place. Returns ( when the input is the last permutation. 2Set all elements of the vector to the given value. /Copy a vector. The two vectors may not overlap. DCopy a vector. The two vectors may not overlap. This is not checked.ZMove 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. 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  .Takes a  ) and returns a continuation providing a  with a size parameter nH 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  . 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 .starting indexstarting indexlength targetsource targetsourcetargetsource/     /      None -;<=FQSTVd( specialized to use  .Pattern 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 (2T 1)) -- ^ here, v is `Sized.Vector n Int`, and we have ` n` The np 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 (2 1)) =Remember that the type of final result of your function (the Int, here) must not depend on nK. 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 \Remember that the final type of the result of the do block ('()', here) must not depend on n. However, the \Also useful in ghci, where you can pattern match to get sized vectors from unsized vectors. nghci> 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 nW in scope in your ghci session using ScopedTypeVariables, like you can with do blocks)rYou 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 O(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.O(1)% Yield the length of the vector as a . This function doesn't doW anything; it merely allows the size parameter of the vector to be passed around as a .O(1) Reveal a 8 instance for a vector's length, determined at runtime.O(1) Reveal a  instance and / for a vector's length, determined at runtime.O(1) Safe indexing using a .O(1) Safe indexing using a .O(1) Indexing using an  without bounds checking.O(1)/ Yield the first element of a non-empty vector.O(1). Yield the last element of a non-empty vector.Lens to access (O(1)) and update (O(n)$) an arbitrary element by its index.Lens to access (O(1)) and update (O(n)*) the first element of a non-empty vector.Lens to access (O(1)) and update (O(n))) the last element of a non-empty vector. O(1)5 Safe indexing in a monad. See the documentation for + for an explanation of why this is useful.!O(1)" Safe indexing in a monad using a . See the documentation for * for an explanation of why this is useful."O(1) Indexing using an 5 without bounds checking. See the documentation for * for an explanation of why this is useful.#O(1)V Yield the first element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful.$O(1)U Yield the last element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful.%O(1)R Yield a slice of the vector without copying it with an inferred length argument.&O(1)R Yield a slice of the vector without copying it with an explicit length argument.'O(1)G Yield all but the last element of a non-empty vector without copying.(O(1)H Yield all but the first element of a non-empty vector without copying.)O(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.*O(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.+O(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.,O(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.-O(1) Yield the first ns elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type..O(1) Yield the first nz elements paired with the remainder without copying. The length of the first resulting vector is passed explicitly as a  argument./O(1) Empty vector.0O(1)! Vector with exactly one element.1O(n)+ Construct a vector in a type safe manner f fromTuple (1,2) :: Vector 2 Int fromTuple ("hey", "what's", "going", "on") :: Vector 4 String 2O(n)g Construct a vector with the same element in each position where the length is inferred from the type.3O(n)f Construct a vector with the same element in each position where the length is given explicitly as a  argument.4O(n){ construct a vector of the given length by applying the function to each index where the length is inferred from the type.5O(n)z construct a vector of the given length by applying the function to each index where the length is given explicitly as a  argument.6O(n) Apply function nY times to value. Zeroth element is original value. The length is inferred from the type.7O(n) Apply function nX times to value. Zeroth element is original value. The length is given explicitly as a  argument.8O(n) Execute the monadic action n0 times and store the results in a vector where n is inferred from the type.9O(n) Execute the monadic action n0 times and store the results in a vector where n is given explicitly as a  argument.:O(n) Construct a vector of length n5 by applying the monadic action to each index where n is inferred from the type.;O(n) Construct a vector of length n5 by applying the monadic action to each index where n is given explicitly as a  argument.<O(n)! Construct a vector with exactly nn elements by repeatedly applying the generator function to the a seed. The length is inferred from the type.=O(n)! Construct a vector with exactly nm elements by repeatedly applying the generator function to the a seed. The length is given explicitly as a  argument.>O(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)'. The length is inferred from the type.?O(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)&. The length is given explicitly as a  argument.@O(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.AO(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.BO(n) Prepend an element.CO(n) Append an element.DO(m+n) Concatenate two vectors.EO(n)Y 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 <huge vector>)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.FO(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>GO(m+n) For each pair (i,a)O 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>HO(m+n) For each index i4 from the index vector and the corresponding value aO 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, G is probably more convenient. update_ xs is ys = G xs (i is ys) I Same as (F) but without bounds checking.JSame as G but without bounds checking.KSame as H but without bounds checking.LO(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>MO(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. Daccumulate (+) <5,9,2> <(2,4),(1,6),(0,3),(1,7)> = <5+3, 9+6+7, 2+4>NO(m+n) For each index i4 from the index vector and the corresponding value bT 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, M is probably more convenient: accumulate_ f as is bs = M f as (i is bs) OSame as L but without bounds checking.PSame as M but without bounds checking.QSame as N but without bounds checking.RO(n) Reverse a vector.SO(n)5 Yield the vector obtained by replacing each element i of the index vector by xs!i. This is equivalent to V (xs!) is# but is often much more efficient. 3backpermute <a,b,c,d> <0,3,2,3,1,0> = <a,d,c,d,b,a>TSame as S but without bounds checking.UO(n). Pair each element in a vector with its index.VO(n) Map a function over a vector.WO(n)= Apply a function to every element of a vector and its index.XO(n*m)} Map a function over a vector and concatenate the results. The function is required to always return the same length vector.YO(n)W Apply the monadic action to all elements of the vector, yielding a vector of results.ZO(n)d Apply the monadic action to every element of a vector and its index, yielding a vector of results.[O(n)N Apply the monadic action to all elements of a vector and ignore the results.\O(n)\ Apply the monadic action to every element of a vector and its index, ignoring the results.]O(n)e Apply the monadic action to all elements of the vector, yielding a vector of results. Equvalent to flip Y.^O(n)] Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip [._O(n)< Zip two vectors of the same length with the given function.`*Zip three vectors with the given function.dO(n)\ Zip two vectors of the same length with a function that also takes the elements' indices).iO(n)$ Zip two vectors of the same length.nO(n)_ Zip the two vectors of the same length with the monadic action and yield a vector of results.oO(n)l Zip the two vectors with a monadic action that also takes the element index and yield a vector of results.pO(n)D Zip the two vectors with the monadic action and ignore the results.qO(n)e Zip the two vectors with a monadic action that also takes the element index and ignore the results.r O(min(m,n)) Unzip a vector of pairs.wO(n)) Check if the vector contains an element.xO(n)= Check if the vector does not contain an element (inverse of w).yO(n) Yield - the first element matching the predicate or  if no such element exists.zO(n) Yield ; the index of the first element matching the predicate or  if no such element exists.{O(n) Yield ; the index of the first occurence of the given element or O if the vector does not contain the element. This is a specialised version of z.|O(n) Left fold.}O(n) Left fold on non-empty vectors.~O(n)# Left fold with strict accumulator.O(n)8 Left fold on non-empty vectors with strict accumulator.O(n) Right fold.O(n)! Right fold on non-empty vectors.O(n)& Right fold with a strict accumulator.O(n)9 Right fold on non-empty vectors with strict accumulator.O(n)< Left fold (function applied to each element and its index).O(n)U Left fold with strict accumulator (function applied to each element and its index).O(n)= Right fold (function applied to each element and its index).O(n)V Right fold with strict accumulator (function applied to each element and its index).O(n)- Check if all elements satisfy the predicate.O(n). Check if any element satisfies the predicate.O(n) Check if all elements are O(n) Check if any element is O(n)! Compute the sum of the elements.O(n)% Compute the product of the elements.O(n)3 Yield the maximum element of the non-empty vector.O(n)_ Yield the maximum element of the non-empty vector according to the given comparison function.O(n)3 Yield the minimum element of the non-empty vector.O(n)_ Yield the minimum element of the non-empty vector according to the given comparison function.O(n)@ Yield the index of the maximum element of the non-empty vector.O(n)l Yield the index of the maximum element of the non-empty vector according to the given comparison function.O(n)@ Yield the index of the minimum element of the non-empty vector.O(n)l Yield the index of the minimum element of the non-empty vector according to the given comparison function.O(n) Monadic fold.O(n)= Monadic fold (action applied to each element and its index).O(n)% Monadic fold over non-empty vectors.O(n)& Monadic fold with strict accumulator.O(n)V Monadic fold with strict accumulator (action applied to each element and its index).O(n)= Monadic fold over non-empty vectors with strict accumulator.O(n)' Monadic fold that discards the result.O(n)W Monadic fold that discards the result (action applied to each element and its index).O(n)> Monadic fold over non-empty vectors that discards the result.O(n)? Monadic fold with strict accumulator that discards the result.O(n)o Monadic fold with strict accumulator that discards the result (action applied to each element and its index).O(n)U Monad fold over non-empty vectors with strict accumulator that discards the result.-Evaluate each action and collect the results.-Evaluate each action and discard the results.O(n) Prescan. prescanl f z = ' .  f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6>O(n)! Prescan with strict accumulator.O(n) Scan.O(n) Scan with strict accumulator.O(n) Haskell-style scan.O(n), Haskell-style scan with strict accumulator.O(n) Scan over a non-empty vector.O(n)8 Scan over a non-empty vector with a strict accumulator.O(n) Right-to-left prescan.O(n)/ Right-to-left prescan with strict accumulator.O(n) Right-to-left scan.O(n), Right-to-left scan with strict accumulator.O(n)" Right-to-left Haskell-style scan.O(n): Right-to-left Haskell-style scan with strict accumulator.O(n), Right-to-left scan over a non-empty vector.O(n)G Right-to-left scan over a non-empty vector with a strict accumulator.O(n) Convert a vector to a list.O(n) Convert a list to a vector.O(n) Convert the first n_ elements of a list to a vector. The length of the resulting vector is inferred from the type.O(n) Convert the first n^ elements of a list to a vector. The length of the resulting vector is given explicitly as a  argument.O(n){ Takes a list and returns a continuation providing a vector with a size parameter corresponding to the length of the list.aEssentially converts a list into a vector with the proper size parameter, determined at runtime.See O(n)/ Yield an immutable copy of the mutable vector.O(1) Unsafely convert a mutable vector to an immutable one withouy copying. The mutable vector may not be used after this operation.O(n). Yield a mutable copy of the immutable vector.O(n) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation.O(n)- Copy an immutable vector into a mutable one. Convert a  into a / if it has the correct size, otherwise return .Takes a ) and returns a continuation providing a  with a size parameter nH that is determined at runtime based on the length of the input vector.Essentially converts a  into a " with the correct size parameter n.Apply a function on unsized vectors to a sized vector. The function must preserve the size of the vector, this is not checked.-a vector of some (potentially unknown) length3a value that depends on knowing the vector's length"the value computed with the length-a vector of some (potentially unknown) lengthIa value that depends on knowing the vector's length, which is given as a "the value computed with the length%starting index&starting indexlengthFinitial vector (of length m)%list of index/value pairs (of length n)Ginitial vector (of length m)'vector of index/value pairs (of length n)Hinitial vector (of length m)index vector (of length n)value vector (of length n)Iinitial vector (of length m)%list of index/value pairs (of length n)Jinitial vector (of length m)'vector of index/value pairs (of length n)Kinitial vector (of length m)index vector (of length n)value vector (of length n)Laccumulating function finitial vector (of length m)%list of index/value pairs (of length n)Maccumulating function finitial vector (of length m)'vector of index/value pairs (of length n)Naccumulating function finitial vector (of length m)index vector (of length n)value vector (of length n)Oaccumulating function finitial vector (of length m)%list of index/value pairs (of length n)Paccumulating function finitial vector (of length m)'vector of index/value pairs (of length n)Qaccumulating function finitial vector (of length m)index vector (of length n)value vector (of length n)Sxs value vectoris index vector (of length n)Txs value vectoris index vector (of length n) !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~w4x4None-<QSTV/ specialized to use .O(1). Yield the length of the mutable vector as an .O(1)- Yield the length of the mutable vector as a .O(1)+ Check whether the mutable vector is empty.O(1)Z Yield a slice of the mutable vector without copying it with an inferred length argument.O(1)Z Yield a slice of the mutable vector without copying it with an explicit length argument.O(1)O Yield all but the last element of a non-empty mutable vector without copying.O(1)P Yield all but the first element of a non-empty mutable vector without copying.O(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.O(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.O(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.O(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.O(1) Yield the first ns elements, paired with the rest, without copying. The lengths of the resulting vectors are inferred from the type.O(1) Yield the first nx elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a  argument.O(1) Check if two vectors overlap. CCreate a mutable vector where the length is inferred from the type.cCreate a mutable vector where the length is inferred from the type. The memory is not initialized.fCreate a mutable vector where the length is inferred from the type and fill it with an initial value.CCreate a mutable vector where the length is given explicitly as a , argument and fill it with an initial value.Create a mutable vector where the length is inferred from the type and fill it with values produced by repeatedly executing the monadic action.CCreate a mutable vector where the length is given explicitly as a W argument and fill it with values produced by repeatedly executing the monadic action."Create a copy of a mutable vector.9Grow a mutable vector by an amount given explicitly as a  argument.KGrow a mutable vector (from the front) by an amount given explicitly as a  argument.gReset all elements of the vector to some undefined value, clearing all references to external objects.O(1)7 Yield the element at a given type-safe position using .O(1)7 Yield the element at a given type-safe position using .O(1) Yield the element at a given # position without bounds checking.O(1)9 Replace the element at a given type-safe position using .O(1)9 Replace the element at a given type-safe position using .O(1) Replace the element at a given # position without bounds checking.O(1)8 Modify the element at a given type-safe position using .O(1)8 Modify the element at a given type-safe position using .O(1) Modify the element at a given # position without bounds checking.O(1): Swap the elements at the given type-safe positions using s.O(1) Swap the elements at the given $ positions without bounds checking.O(1)V Replace the element at a given type-safe position and return the old element, using .O(1)V Replace the element at a given type-safe position and return the old element, using .O(1) Replace the element at a given F position and return the old element. No bounds checks are performed.WCompute the next permutation (lexicographically) of a given vector in-place. Returns ( when the input is the last permutation.2Set all elements of the vector to the given value./Copy a vector. The two vectors may not overlap.DCopy a vector. The two vectors may not overlap. This is not checked.ZMove 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. 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  .Takes a  ) and returns a continuation providing a   with a size parameter nH 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  . 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 .starting indexstarting indexlengthtargetsourcetargetsourcetargetsource00 None -;<=FQSTVd4 specialized to use  .Pattern 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) = k (> (+) v (T 1)) -- ^ here, v is `Sized.Vector n Int`, and we have ` n` The np 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 -> k (> (+) v ( 1)) =Remember that the type of final result of your function (the Int, here) must not depend on nK. 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 \Remember that the final type of the result of the do block ('()', here) must not depend on n. However, the \Also useful in ghci, where you can pattern match to get sized vectors from unsized vectors. nghci> 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 nW in scope in your ghci session using ScopedTypeVariables, like you can with do blocks)rYou 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 O(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.O(1)% Yield the length of the vector as a . This function doesn't doW anything; it merely allows the size parameter of the vector to be passed around as a .O(1) Reveal a 8 instance for a vector's length, determined at runtime.O(1) Reveal a  instance and / for a vector's length, determined at runtime.O(1) Safe indexing using a .O(1) Safe indexing using a .O(1) Indexing using an  without bounds checking.O(1)/ Yield the first element of a non-empty vector.O(1). Yield the last element of a non-empty vector.Lens to access (O(1)) and update (O(n)$) an arbitrary element by its index.Lens to access (O(1)) and update (O(n)*) the first element of a non-empty vector.Lens to access (O(1)) and update (O(n))) the last element of a non-empty vector.O(1)5 Safe indexing in a monad. See the documentation for + for an explanation of why this is useful.O(1)" Safe indexing in a monad using a . See the documentation for * for an explanation of why this is useful.O(1)K Indexing using an Int without bounds checking. See the documentation for * for an explanation of why this is useful.O(1)V Yield the first element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful.O(1)U Yield the last element of a non-empty vector in a monad. See the documentation for * for an explanation of why this is useful.O(1)R Yield a slice of the vector without copying it with an inferred length argument.O(1)R Yield a slice of the vector without copying it with an explicit length argument.O(1)G Yield all but the last element of a non-empty vector without copying.O(1)H Yield all but the first element of a non-empty vector without copying.O(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. O(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. O(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. O(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. O(1) Yield the first nr elements, paired with the rest, without copying. The lengths of the resulting vector are inferred from the type. O(1) Yield the first nx elements, paired with the rest, without copying. The length of the first resulting vector is passed explicitly as a  argument.O(1) Empty vector.O(1)! Vector with exactly one element.O(n)+ Construct a vector in a type safe manner f fromTuple (1,2) :: Vector 2 Int fromTuple ("hey", "what's", "going", "on") :: Vector 4 String O(n)g Construct a vector with the same element in each position where the length is inferred from the type.O(n)f Construct a vector with the same element in each position where the length is given explicitly as a  argument.O(n){ construct a vector of the given length by applying the function to each index where the length is inferred from the type.O(n)z construct a vector of the given length by applying the function to each index where the length is given explicitly as a  argument.O(n) Apply the function n[ times to a value. Zeroth element is original value. The length is inferred from the type.O(n) Apply the function nZ times to a value. Zeroth element is original value. The length is given explicitly as a  argument.O(n) Execute the monadic action n0 times and store the results in a vector where n is inferred from the type.O(n) Execute the monadic action n0 times and store the results in a vector where n is given explicitly as a  argument.O(n) Construct a vector of length n5 by applying the monadic action to each index where n is inferred from the type.O(n) Construct a vector of length n5 by applying the monadic action to each index where n is given explicitly as a  argument.O(n)! Construct a vector with exactly nn elements by repeatedly applying the generator function to the a seed. The length is inferred from the type.O(n)! Construct a vector with exactly nm elements by repeatedly applying the generator function to the a seed. The length is given explicitly as a  argument.O(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)'. The length is inferred from the type.O(n) Yield a vector of length n containing the values x, x+1, ...,  x + (n - 1)&. The length is given explicitly as a  argument.O(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. O(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.!O(n) Prepend an element."O(n) Append an element.#O(m+n) Concatenate two vectors.$O(n)Y 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 <huge vector>)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.%O(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>&O(m+n) For each pair (i,a)O 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>'O(m+n) For each index i4 from the index vector and the corresponding value aO 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 (H is ys) ( Same as (%) but without bounds checking.)Same as & but without bounds checking.*Same as ' but without bounds checking.+O(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>,O(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. Daccumulate (+) <5,9,2> <(2,4),(1,6),(0,3),(1,7)> = <5+3, 9+6+7, 2+4>-O(m+n) For each index i4 from the index vector and the corresponding value bT 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 (H is bs) .Same as + but without bounds checking./Same as , but without bounds checking.0Same as - but without bounds checking.1O(n) Reverse a vector.2O(n)5 Yield the vector obtained by replacing each element i of the index vector by xs!i. This is equivalent to 5 (xs!) is# but is often much more efficient. 3backpermute <a,b,c,d> <0,3,2,3,1,0> = <a,d,c,d,b,a>3Same as 2 but without bounds checking.4O(n). Pair each element in a vector with its index.5O(n) Map a function over a vector.6O(n)= Apply a function to every element of a vector and its index.7O(n*m)} Map a function over a vector and concatenate the results. The function is required to always return the same length vector.8O(n)W Apply the monadic action to all elements of the vector, yielding a vector of results.9O(n)d Apply the monadic action to every element of a vector and its index, yielding a vector of results.:O(n)N Apply the monadic action to all elements of a vector and ignore the results.;O(n)\ Apply the monadic action to every element of a vector and its index, ignoring the results.<O(n)e Apply the monadic action to all elements of the vector, yielding a vector of results. Equvalent to flip 8.=O(n)] Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip :.>O(n)< Zip two vectors of the same length with the given function.?*Zip three vectors with the given function.CO(n)\ Zip two vectors of the same length with a function that also takes the elements' indices).HO(n)$ Zip two vectors of the same length.MO(n)_ Zip the two vectors of the same length with the monadic action and yield a vector of results.NO(n)l Zip the two vectors with a monadic action that also takes the element index and yield a vector of results.OO(n)D Zip the two vectors with the monadic action and ignore the results.PO(n)e Zip the two vectors with a monadic action that also takes the element index and ignore the results.Q O(min(m,n)) Unzip a vector of pairs.VO(n)) Check if the vector contains an element.WO(n)= Check if the vector does not contain an element (inverse of V).XO(n) Yield - the first element matching the predicate or  if no such element exists.YO(n) Yield ; the index of the first element matching the predicate or  if no such element exists.ZO(n) Yield ; the index of the first occurence of the given element or O if the vector does not contain the element. This is a specialised version of Y.[O(n) Left fold.\O(n) Left fold on non-empty vectors.]O(n)# Left fold with strict accumulator.^O(n)8 Left fold on non-empty vectors with strict accumulator._O(n) Right fold.`O(n)! Right fold on non-empty vectors.aO(n)& Right fold with a strict accumulator.bO(n)9 Right fold on non-empty vectors with strict accumulator.cO(n)< Left fold (function applied to each element and its index).dO(n)U Left fold with strict accumulator (function applied to each element and its index).eO(n)= Right fold (function applied to each element and its index).fO(n)V Right fold with strict accumulator (function applied to each element and its index).gO(n)- Check if all elements satisfy the predicate.hO(n). Check if any element satisfies the predicate.iO(n) Check if all elements are .jO(n) Check if any element is .kO(n)! Compute the sum of the elements.lO(n)% Compute the product of the elements.mO(n)3 Yield the maximum element of the non-empty vector.nO(n)_ Yield the maximum element of the non-empty vector according to the given comparison function.oO(n)3 Yield the minimum element of the non-empty vector.pO(n)_ Yield the minimum element of the non-empty vector according to the given comparison function.qO(n)@ Yield the index of the maximum element of the non-empty vector.rO(n)l Yield the index of the maximum element of the non-empty vector according to the given comparison function.sO(n)@ Yield the index of the minimum element of the non-empty vector.tO(n)l Yield the index of the minimum element of the non-empty vector according to the given comparison function.uO(n) Monadic fold.vO(n)= Monadic fold (action applied to each element and its index).wO(n)% Monadic fold over non-empty vectors.xO(n)& Monadic fold with strict accumulator.yO(n)V Monadic fold with strict accumulator (action applied to each element and its index).zO(n)= Monadic fold over non-empty vectors with strict accumulator.{O(n)' Monadic fold that discards the result.|O(n)W Monadic fold that discards the result (action applied to each element and its index).}O(n)> Monadic fold over non-empty vectors that discards the result.~O(n)? Monadic fold with strict accumulator that discards the result.O(n)o Monadic fold with strict accumulator that discards the result (action applied to each element and its index).O(n)U Monad fold over non-empty vectors with strict accumulator that discards the result.-Evaluate each action and collect the results.-Evaluate each action and discard the results.O(n) Prescan. prescanl f z =  .  f z  Example: $prescanl (+) 0 <1,2,3,4> = <0,1,3,6>O(n)! Prescan with strict accumulator.O(n) Scan.O(n) Scan with strict accumulator.O(n) Haskell-style scan.O(n), Haskell-style scan with strict accumulator.O(n) Scan over a non-empty vector.O(n)8 Scan over a non-empty vector with a strict accumulator.O(n) Right-to-left prescan.O(n)/ Right-to-left prescan with strict accumulator.O(n) Right-to-left scan.O(n), Right-to-left scan with strict accumulator.O(n)" Right-to-left Haskell-style scan.O(n): Right-to-left Haskell-style scan with strict accumulator.O(n), Right-to-left scan over a non-empty vector.O(n)G Right-to-left scan over a non-empty vector with a strict accumulator.O(n) Convert a vector to a list.O(n) Convert a list to a vector.O(n) Convert the first n_ elements of a list to a vector. The length of the resulting vector is inferred from the type.O(n) Convert the first n^ elements of a list to a vector. The length of the resulting vector is given explicitly as a  argument.O(n){ Takes a list and returns a continuation providing a vector with a size parameter corresponding to the length of the list.aEssentially converts a list into a vector with the proper size parameter, determined at runtime.See O(n)/ Yield an immutable copy of the mutable vector.O(1) Unsafely convert a mutable vector to an immutable one withouy copying. The mutable vector may not be used after this operation.O(n). Yield a mutable copy of the immutable vector.O(n) Unsafely convert an immutable vector to a mutable one without copying. The immutable vector may not be used after this operation.O(n)- Copy an immutable vector into a mutable one. Convert a  into a / if it has the correct size, otherwise return .Takes a ) and returns a continuation providing a  with a size parameter nH that is determined at runtime based on the length of the input vector.Essentially converts a  into a " with the correct size parameter n.Apply a function on unsized vectors to a sized vector. The function must preserve the size of the vector, this is not checked.-a vector of some (potentially unknown) length3a value that depends on knowing the vector's length"the value computed with the length-a vector of some (potentially unknown) lengthIa value that depends on knowing the vector's length, which is given as a "the value computed with the lengthstarting indexstarting indexlength%initial vector (of length m)%list of index/value pairs (of length n)&initial vector (of length m)'vector of index/value pairs (of length n)'initial vector (of length m)index vector (of length n)value vector (of length n)(initial vector (of length m)%list of index/value pairs (of length n))initial vector (of length m)'vector of index/value pairs (of length n)*initial vector (of length m)index vector (of length n)value vector (of length n)+accumulating function finitial vector (of length m)%list of index/value pairs (of length n),accumulating function finitial vector (of length m)'vector of index/value pairs (of length n)-accumulating function finitial vector (of length m)index vector (of length n)value vector (of length n).accumulating function finitial vector (of length m)%list of index/value pairs (of length n)/accumulating function finitial vector (of length m)'vector of index/value pairs (of length n)0accumulating function finitial vector (of length m)index vector (of length n)value vector (of length n)2xs value vectoris index vector (of length n)3xs value vectoris index vector (of length n)      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~V4W4 !"  #$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a'bcdefghijklmno)*+,-./012pqr67stuv89wxyz{|}~NQRS    '()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSa'bcdefghijklmno)*+,-./012pqr67stuv89wxyz{|}~NQRS '()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS  a  ' b c d e f g h i j k  l m n o ) * + , - . / 0 1 2 p q r 6 7 s t u v 8 9 w x y z { | } ~  N Q R S  '()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS  a  ' b c d e f g h i j k  l m n o ) * + , - . / 0 1 2 p q r 6 7 s t u v 8 9 w x y z { | } ~  N Q R S        !"#$%#$&'()*+vector-sized-1.2.0.0-G8EvVpRQB1N8IEHkb0P4uU!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.SizedData.Vector.Sized"Data.Vector.Storable.Mutable.SizedData.Vector.Storable.SizedData.Vector.Unboxed.SizedData.Vector.Generic.MutableMVector Data.VectorlengthData.Vector.GenericVectorSizedControl.ApplicativeZipListData.Vector.StorableMutableData.Vector.MutableDataindexMData.Vector.Storable.MutableStorableData.Vector.UnboxData.Vector.Unbox.MutableData.Vector.Unbox.Mutable.SizedData.Vector.Unbox.SizedUnboxed&vector-0.12.0.1-JlawpRjIcMJIYPJVsWriIAData.Vector.Unboxed.BaseUnbox$fGenericMVector $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$fGenericVector $fShow1Vector $fEq1Vector $fOrd1Vector $fDataVector SomeSized knownLength knownLength'indexindex' unsafeIndexheadlastix_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 unsafeThawwithVectorUnsafe$fFloatingVector$fFractionalVector $fNumVector$fHashableVector$fHashableVector0$fHashableVector1$fRepresentableVector$fDistributiveVector$fMonoidVector$fSemigroupVector$fComonadApplyVector$fComonadVector $fMonadVector$fApplicativeVector$fStorableVector $fReadVectorghc-prim GHC.TypesIntbase Data.ProxyProxy.finite-typelits-0.1.4.2-D9mVZoe9l416E6kNhYLrOtData.Finite.InternalFiniteFalseSV_ GHC.TypeNatsKnownNat GHC.TypeLitsnatValGHC.BaseJustNothingTrueMonoidmemptyData.Semigroup Semigroup$comonad-5.0.4-4Pt2gQzcs3tBmazimVyK8EControl.Comonadextract duplicateMonad ApplicativeForeign.Storable