˚ H      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[ \ ] ^ _ ` 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 { | } ~         !"#$%&'()*+,-./0123456789:;<=>?@ A B C D E F G 8 Safe-Inferred  &)*123468:;<=FHJKMCommon display formats. &How a given value should be displayed. %Display a string with the given mode.4Examine a string to decide how we should display it.6Left justify some text in a column of the given width.7Right justify some text in a column of the given width.  H      H Safe-Inferred  &)*123468:;<=FHJKM.Unpack the pieces of a structure into a tuple.bThis is used in a low-level fusion optimisation to ensure that intermediate values are unboxed.! Safe-Inferred  &)*123468:;<=FHJKM1Our index type, used for both shapes and indices.An index of dimension zero<Class of types that can be used as array shapes and indices.(Get the number of dimensions in a shape. GThe shape of an array of size zero, with a particular dimensionality.!IThe shape of an array with size one, with a particular dimensionality."'Compute the intersection of two shapes.#/Add the coordinates of two shapes componentwise$=Get the total number of elements in an array with this shape.%LGiven a starting and ending index, check if some index is with that range.&,Convert a shape into its list of dimensions.''Convert a list of dimensions to a shape(HGiven an array shape and index, check whether the index is in the shape.)!Nicely format a shape as a string !"#$%&'()*+,-./IJK !"#$%&'()*+,-./  !"#$%&'()*+,-./IJK" Safe-Inferred  &)*123468:;<=FHJKM1BA layout provides a total order on the elements of an index space._We can talk about the n-th element of an array, independent of its shape and dimensionality.2NShort name for a layout which does not include details of the exact extent.3*Type used to index into this array layout.4 O(1). Proxy for the layout name.52O(1). Create a default layout of the given extent.6%O(1). Yield the extent of the layout.72O(1). Convert a polymorphic index to a linear one.82O(1). Convert a linear index to a polymorphic one. 012345678 012345678012345678 Safe-Inferred  &)*123468:;<=FHJKM% !"#$%&'()*+,-./012345678% !"#$%&'()*+,-./123456780 Safe-Inferred  &)*123468:;<=FHJKM9,Class of index types that can map to slices.:9Map an index of a full shape onto an index of some slice.;8Map an index of a slice onto an index of the full shape.<RMap the type of an index in the slice, to the type of the index in the full shape.=QMap a type of the index in the full shape, to the type of the index in the slice.>$Place holder for any possible shape.@)Select all indices at a certain position.9:;<=>?@ALMNOPQRSTUVW 9:;<=>?@A @A>?=<9:;9:;<=>?@ALMNOPQRSTUVW# Safe-Inferred  &)*123468:;<=FHJKM XYZ[\]^_`XYZ[\]^XYZ[\]^_`$ Safe-Inferred  &)*123468:;<=FHJKM B8Constraint synonym that requires an integer index space.C]Class of array representations that we can read elements from in a random-access manner. D%An Array supplies an element of type a? to each position in the index space associated with layout l.E!O(1). Get the layout of an array.FO(1). Get an element from an array. If the provided index is outside the extent of the array then the result depends on the layout.GO(1). Alias for F.H-O(1). Get the number of elements in an array.IConvert an array to a list.a%Convert a nested array to some lists.b6Convert a triply nested array to a triply nested list. BCDEFGHIa Source array. Result list.b Source array. Result list. BCDEFGHIabBCDEFGHIab Safe-Inferred  &)*123468:;<=FHJKMJ=Class of array representations that can be windowed directly.qThe underlying representation can encode the window, without needing to add a wrapper to the existing layout.Q&Wrap a window around an exiting array.RHWrap a window around an existing array that encompases the entire array.S$O(1). Take the tail of an array, or c if it's empty.T0O(1). Take the initial elements of an array, or c if it's empty.dWindows are windowable.eWindowed arrays.fWindowed arrays.JKLMNOPghQRSTdiejf DJKLMNOPgQRST LMNOPJKQRST JKLMNOPQRSTdeigfjhNone  &)*123468:;<=FHJKMU"Layout for Foreign Strided arrays.UNSAFE: indexing into foreign strided arrays is not bounds checked. You may want to wrap this with a Checked layout as well.X<O(1). Cast a foreign array from one element type to another.Y O(1). Wrap a  ForeignPtr as a strided array.ZO(1). Unwrap a  ForeignPtr from a strided array.UVWklmnopXYStarting position in bytes.(Stride to get to next element, in bytes.Length of array in elements. ForeignPtr holding the data.Zqrstuv2DgUVWklmnopXYZUVWXYZUVWXYZqrtsklmnovup None  &)*123468:;<=FHJKM`WA row-wise layout that maps higher rank indices to linear ones in a row-major order.HIndices are ordered so the inner-most coordinate varies most frequently: > Prelude.map (fromIndex (RowWise (ish2 2 3))) [0..5] [(Z :. 0) :. 0, (Z :. 0) :. 1, (Z :. 0) :. 2, (Z :. 1) :. 0, (Z :. 1) :. 1, (Z :. 1) :. 2]aIndexing is not bounds checked. Indexing outside the extent yields the corresponding index.cUConstruct a rowWise array that produces the corresponding index for every element. > toList $ rowWise (ish2 3 2) [(Z :. 0) :. 0, (Z :. 0) :. 1, (Z :. 1) :. 0, (Z :. 1) :. 1, (Z :. 2) :. 0, (Z :. 2) :. 1]wRow-wise arrays.[\]^_`abxyzcdefgh{w|}~2D[\]^_`abxyzcdefgh`abc_^]\[defgh[\]^_`abcdefghw{x}|y~z  Safe-Inferred  &)*123468:;<=FHJKMi6A linear layout with the elements indexed by integers.`Indexing is not bounds checked. Indexing outside the extent yields the corresponding index.lTConstruct a linear array that produces the corresponding index for every element. 6> toList $ linear 10 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]Linear arrays.Linear layout. ijkl2Dijklijklijkl%None  &)*123468:;<=FHJKMm8Constraint synonym that requires an integer index space.n]Class of manifest array representations that can be constructed in a random-access manner.o-Mutable buffer for some array representation.p3Allocate a new mutable buffer for the given layout.>UNSAFE: The integer must be positive, but this is not checked.q(Read an element from the mutable buffer.)UNSAFE: The index bounds are not checked.r)Write an element into the mutable buffer.)UNSAFE: The index bounds are not checked.sVO(n). Copy the contents of a buffer that is larger by the given number of elements.>UNSAFE: The integer must be positive, but this is not checked.t2O(1). Yield a slice of the buffer without copying.UNSAFE: The given starting position and length must be within the bounds of the of the source buffer, but this is not checked.u;O(1). Freeze a mutable buffer into an immutable Repa array.UNSAFE: If the buffer is mutated further then the result of reading from the returned array will be non-deterministic.v*O(1). Thaw an Array into a mutable buffer.+UNSAFE: The Array is no longer safe to use.w{Ensure the array is still live at this point. Sometimes needed when the mutable buffer is a ForeignPtr with a finalizer.x#O(1). Get the layout from a Buffer.y@O(length src). Construct a linear array from a list of elements.z^O(length src). Construct an array from a list of elements, and give it the provided layout.The B of the provided shape must match the length of the list, else c.mnopqrstuvwxyzmnopqrstuvwxyzmn opqrstuvwxyz&None  &)*123468:;<=FHJKM{fCompute all elements defined by a delayed array and write them to a manifest target representation.The instances of this class require that the source array has a delayed representation. If you want to use a pre-existing manifest array as the source then delay it first.|"Fill an entire array sequentially.}!Fill an entire array in parallel.{|}{|}{|} None  &)*123468:;<=FHJKM~1Sequential computation of delayed array elements.nElements of the source array are computed sequentially and written to a new array of the specified layout.Like ~( but use the provided desination layout.TThe size of the destination layout must match the size of the source array, else c.~{|}~{|}~~ None  &)*123468:;<=FHJKMmnopqrstuvwxyznopqrstuvwxmyz'None  &)*123468:;<=FHJKM=Keep the elements of an array that match the given predicate. None  &)*123468:;<=FHJKM1Layout an array as flat vector of boxed elements.|UNSAFE: Indexing into raw material arrays is not bounds checked. You may want to wrap this with a Checked layout as well.&O(1). Wrap a boxed vector as an array.*O(1). Unwrap a boxed vector from an array.Scan through an array from front to back. For pairs of successive elements, drop the second one when the given predicate returns true.CThis function can be used to remove duplicates from a sorted array.&TODO: generalise to other array types.Boxed buffers.Boxed windows. Boxed arrays. Boxed arrays. 2Dgo None  &)*123468:;<=FHJKMrDelayed arrays wrap functions from an index to element value. The index space is specified by an inner layout, l.XEvery time you index into a delayed array the element at that position is recomputed.#Wrap a function as a delayed array. S> toList $ fromFunction (Linear 10) (* 2) = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]SProduce the extent of an array, and a function to retrieve an arbitrary element.(Wrap an existing array in a delayed one.bApply a worker function to each element of an array, yielding a new array with the same extent.qThe resulting array is delayed, meaning every time you index into it the element at that index is recomputed. 5O(1). View the elements of a vector in reverse order. H> toList $ reverse $ fromList U [0..10 :: Int] [10,9,8,7,6,5,4,3,2,1,0] Delayed arrays.Delayed arrays. D (None  &)*123468:;<=FHJKM  Layout for dense Foreign arrays.|UNSAFE: Indexing into raw material arrays is not bounds checked. You may want to wrap this with a Checked layout as well.<O(1). Cast a foreign array from one element type to another. O(1). Wrap a  as an array.O(1). Unwrap a  from an array.,O(1). Convert a foreign array to a storable Vector.O(1). Convert a storable Vector to a foreign DO(1). Convert a foreign Vector to a .O(1). Convert a  to an foreign D.Unpack Foreign buffersForeign buffersWindowing Foreign arrays.Foreign arrays.Foreign arrays.2DgoNone  &)*123468:;<=FHJKM5Layout an array as a flat vector of unboxed elements.=This is the most efficient representation for numerical data.The implementation uses Data.Vector.Unboxed which picks an efficient, specialised representation for every element type. In particular, unboxed vectors of pairs are represented as pairs of unboxed vectors.|UNSAFE: Indexing into raw material arrays is not bounds checked. You may want to wrap this with a Checked layout as well.)O(1). Wrap an unboxed vector as an array.-O(1). Unwrap an unboxed vector from an array.Unboxed buffers.Windowing Unboxed arrays.Unboxed arrays.Unboxed arrays.2Dgo )None  &)*123468:;<=FHJKM/Dictionaries needed to perform a concatenation.(O(len result) Concatenate nested arrays. > import Data.Repa.Array.Material > let arrs = fromList B [fromList U [1, 2, 3], fromList U [5, 6, 7 :: Int]] > toList $ concat U arrs [1,2,3,5,6,7] O(len result) Concatenate the elements of some nested vector, inserting a copy of the provided separator array between each element. > import Data.Repa.Array.Material > let sep = fromList U [0, 0, 0] > let arrs = fromList B [fromList U [1, 2, 3], fromList U [5, 6, 7 :: Int]] > toList $ concatWith U sep arrs [1,2,3,0,0,0,5,6,7,0,0,0] O(len result). Perform a ?, adding a newline character to the end of each inner array.tO(len result) Insert a copy of the separator array between the elements of the second and concatenate the result. > import Data.Repa.Array.Material > let sep = fromList U [0, 0, 0] > let arrs = fromList B [fromList U [1, 2, 3], fromList U [5, 6, 7 :: Int]] > toList $ intercalate U sep arrs [1,2,3,0,0,0,5,6,7] Layout for destination.Arrays to concatenate.Result representation.Separator array.Arrays to concatenate.Result representation.Arrays to concatenate.Result representation.Separator array.Arrays to concatenate.None  &)*123468:;<=FHJKM Produce a Stream% for the elements of the given array.Compute the elements of a pure Stream#, writing them into a new array D.Compute the elements of an  Stream, writing them to a new D.*None  &)*123468:;<=FHJKMCombination of fold and . |We walk over the stream front to back, maintaining an accumulator. At each point we can chose to emit an element (or not)Like r but use the first value of the stream as the initial state, and add the final state to the end of the output.+None  &)*123468:;<=FHJKM#Merge two sorted key-value streams.Like E, but only produce the elements where the worker functions return .Name of destination layout.%Combine two values with the same key.*Handle a left value without a right value.*Handle a right value without a left value.Array of keys and left values.Array of keys and right values.Array of keys and results.%Combine two values with the same key.*Handle a left value without a right value.*Handle a right value without a left value.Array of keys and left values.Array of keys and right values.Array of keys and results.None  &)*123468:;<=FHJKMA delayed array formed from two source arrays. The source arrays can have different layouts but must have the same extent.,Wrap two existing arrays in a delayed array.@Combine two arrays element-wise using the given worker function.6The two source arrays must have the same extent, else c.Delayed arrays.Delayed arrays. DNone  &)*123468:;<=FHJKM[The Dense layout maps a higher-ranked index space to some underlying linear index space.oFor example, we can create a dense 2D row-wise array where the elements are stored in a flat unboxed vector: > import Data.Repa.Array.Material > let Just arr = fromListInto (matrix U 10 10) [1000..1099 :: Float] > :type arr arr :: Array (E U (RW DIM2) Float > arr ! (Z :. 5 :. 4) > 1054.0 6Yield a layout for a dense vector of the given length.\The first argument is the name of the underlying linear layout which stores the elements.IYield a layout for a matrix with the given number of rows and columns.PYield a layout for a cube with the given number of planes, rows, and columns.Dense buffers. Dense arrays. Dense arrays.2DxyzoNone  &)*123468:;<=FHJKMYTupled arrays where the components are unpacked and can have separate representations.(Tuple two arrays into an array of pairs.The two argument arrays must have the same index type, but can have different extents. The extent of the result is the intersection of the extents of the two argument arrays.3Untuple an array of tuples in to a tuple of arrays.The two returned components may have different extents, though they are guaranteed to be at least as big as the argument array. This is the key property that makes  different from unzip.Tupled buffers.Tupled windows.Tupled arrays. 2Dgo,None  &)*123468:;<=FHJKM>Insert elements produced by the given function in to an array.Name of destination layout."Produce an element for this index.Array of source elements.-None  &)*123468:;<=FHJKM4Left fold of all elements in an array, sequentially.*Yield the sum of the elements of an array..Yield the product of the elements of an array.1Yield the mean value of the elements of an array.8Yield the standard deviation of the elements of an array.Compute the Pearson correlation of two arrays.LIf the arrays differ in length then only the common prefix is correlated.None  &)*123468:;<=FHJKM Produce a  for the elements of the given array. The order in which the elements appear in the chain is determined by the layout of the array.%Lift a pure chain to a monadic chain.Compute the elements of a pure #, writing them into a new array D.Compute the elements of an  , writing them to a new D..None  &)*123468:;<=FHJKM.Dictionaries need to perform a segmented fold.@Segmented fold over vectors of segment lengths and input values.lThe total lengths of all segments need not match the length of the input elements vector. The returned  state can be inspected to determine whether all segments were completely folded, or the vector of segment lengths or elements was too short relative to the other. > import Data.Repa.Array.Material > import Data.Repa.Nice > let segs = fromList B [("red", 3), ("green", 5)] > let vals = fromList U [0..100 :: Int] > nice $ fst $ folds B U (+) 0 segs vals [("red",3),("green",25)] Like 2, but take an initial state for the first segment. > import Data.Repa.Array.Material > import Data.Repa.Nice > let state = Just ("white", 4, 100) > let segs = fromList B [("red", 3), ("green", 5)] > let vals = fromList U [0..100 :: Int] > nice $ fst $ foldsWith B U (+) 0 state segs vals [("white",106),("red",15),("green",45)] Layout for group names.Layout for fold results.Worker function.$Initial state when folding segments.Segment names and lengths. Elements.Layout for group names.Layout for fold results.Worker function.$Initial state when folding segments.1Name, length and initial state for first segment.Segment names and lengths. Elements. /None  &)*123468:;<=FHJKM(Dictionaries need to perform a grouping.xFrom a stream of values which has consecutive runs of idential values, produce a stream of the lengths of these runs. j> import Data.Repa.Array.Material > import Data.Repa.Nice > nice $ groups U U (fromList U "waaabllle") ([(w,1),(a,3),(b,1),(l ,3)],Just (e,1)) Like , but use the given function to determine whether two consecutive elements should be in the same group. Also take an initial starting group and count. ^> import Data.Repa.Array.Material > import Data.Repa.Nice > nice $ groupsWith U U (==) (Just (w", 5)) (fromList U "waaabllle") ([(w,6),(a,3),(b,1),(l ,3)],Just (e,1)) Layout for group names.Layout gor group lengths.Input elements.Layout for group names.Layout for group lengths.Comparison function.Starting element and count.Input elements.0None  &)*123468:;<=FHJKM)JKLMNOPQRST`abcijkl)ijkl`abcLMNOPJKQRSTNone  &)*123468:;<=FHJKMcNested array represented as a flat array of elements, and a segment descriptor that describes how the elements are partitioned into the sub-arrays. Using this representation for multidimentional arrays is significantly more efficient than using a boxed array of arrays, as there is no need to allocate the sub-arrays individually in the heap.With a nested type like: Array N (Array N (Array U Int)), the concrete representation consists of five flat unboxed vectors: two for each of the segment descriptors associated with each level of nesting, and one unboxed vector to hold all the integer elements.|UNSAFE: Indexing into raw material arrays is not bounds checked. You may want to wrap this with a Checked layout as well.Segment start positions.Segment lengths.Element values.1O(size src) Convert some lists to a nested array.BO(size src) Convert a triply nested list to a triply nested array.cApply a function to all the elements of a doubly nested array, preserving the nesting structure.JO(1). Produce a nested array by taking slices from some array of elements.This is a constant time operation, as the representation for nested vectors just wraps the starts, lengths and elements vectors._Segmented concatenation. Concatenate triply nested vector, producing a doubly nested vector.Unlike the plain  function, this operation is performed entirely on the segment descriptors of the nested arrays, and does not require the inner array elements to be copied. > import Data.Repa.Nice > nice $ concats $ fromListss U [["red", "green", "blue"], ["grey", "white"], [], ["black"]] ["red","green","blue","grey","white","black"] zO(len src). Given predicates which detect the start and end of a segment, split an vector into the indicated segments.EO(len src). Given a terminating value, split an vector into segments.2The result segments do not include the terminator. > import Data.Repa.Nice > nice $ segmentOn (== ' ') (fromList U "fresh fried fish ") ["fresh "," "," ","fried ","fish "," "] O(len src). Like !, but cut the source array twice.\O(len src). Given field and row terminating values, split an array into rows and fields.yFor each segment of a nested array, trim elements off the start and end of the segment that match the given predicate.pFor each segment of a nested array, trim elements off the end of the segment that match the given predicate.qFor each segment of a nested array, trim elements off the start of the segment that match the given predicate.*Ragged transpose of a triply nested array.This operation is performed entirely on the segment descriptors of the nested arrays, and does not require the inner array elements to be copied.Windowing Nested arrays.Nested arrays.Nested arrays.Segment starting positions.Segment lengths.Array elements.Detect the start of a segment.Detect the end of a segment.Vector to segment.Detect the end of a segment.Vector to segment.%Detect the start of an inner segment.%Detect the end of an inner segment.%Detect the start of an outer segment.%Detect the end of an outer segment.Array to dice.'Terminating element for inner segments.'Terminating element for outer segments.Vector to dice.2Dg1None  &)*123468:;<=FHJKMTake a desired number of segments, and array of key value pairs where the key is the segment number. Partition the values into the stated number of segments, discarding values where the key falls outside the given range.This function operates by first allocating a buffer of size (segs * len src) and filling it with a default value. Both the worst case runtime and memory use will be poor for a large number of destination segments. TODO: we need the pre-init because otherwise unused values in the elems array are undefined. We could avoid this by copying out the used elements after the partition loop finishes. Use a segmented extract function. This would also remove the dependency on the  class.Like R but use the provided function to compute the segment number for each element. Like  but use the provided function to compute the segment number for each element. The function is given the index of the each element, along with the element itself.Name of destination layout.Total number of segments.Segment numbers and values. Result arrayName of destination layout.Total number of Segments.(Get the segment number for this element.Source values.Name of destination layout.Total number of Segments.(Get the segment number for this element.Source values.None  &)*123468:;<=FHJKM2Dgo  Safe-Inferred  &)*123468:;<=FHJKM@Constant time conversion of one array representation to another.2None  &)*123468:;<=FHJKMiArrays where the elements that are automatically layed out into some efficient runtime representation.GThe implementation uses type families to chose unboxed representations for all elements that can be unboxed. In particular: arrays of unboxed tuples are represented as tuples of unboxed arrays, and nested arrays are represented using a segment descriptor and a single single flat vector containing all the elements.:     2Dg"     3None  &)*123468:;<=FHJKM !"#$%&'()*+,-./0123 !"# $&% '()+*!,.-"/0132#4None  &)*123468:;<=FHJKM2456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde 456789:;<=>@?4ABCED5FHG6IJKML7NPO8QRSUT9VXW:YZ[]\;^`_<abced=5None  &)*123468:;<=FHJKM fghijklmnofghjifklmongNone  &)*123468:;<=FHJKM+2Dgo !"#456789:;<=fgNone  &)*123468:;<=FHJKM2Classes supported by all material representations.}We can index them in a random-access manner, window them in constant time, and use them as targets for a computation.eIn particular, delayed arrays are not material as we cannot use them as targets for a computation.K2Dg!#579;=g,None  &)*123468:;<=FHJKMO(len src) Yield = the index of the first element matching the predicate or c if no such element exists.Like , but immediately ~ the result.Like , but immediately ~ the result.FO(1). Constant time conversion of one array representation to another.>O(n). Linear time copy of one array representation to another.&This function must be used instead of M when the bit-wise layout of the two array representations are different.Name of destination layout.Worker function. Source array.Name of destination layout.Worker function. Source array. Source array32BCDEFGHImnyz{~2CDEFBGH{nm~yzINone  &)*123468:;<=FHJKM"Convert some value to a nice form.In particular:kNested Arrays are converted to nested lists, so that they are easier to work with on the ghci console.)Lists of characters are wrapped into the X data type, so that they can be pretty printed differently by follow-on processing.1As ghci automatically pretty prints lists, using nice is more fun than trying to show$ the raw Repa array representations.aWrapper to indicate a list of characters should be printed as a string, without double quotes.cWrapper to indicate a list of characters should be printed as a string, including double quotes.,pqrstuvwxyz{|}~(pqrstuvwxyz{|}~None  &)*123468:;<=FHJKM 5Convert some value to a form presentable to the user.Like ` but we allow the nesting structure to be preserved so it can be displayed in tabular format.A value, wrapped up nicely.7Some different things, to display with tuple brackets  (.. , ..)6Many of the same thing, to display with list brackets  [.. , ..]An atomic thing.Yield the nesting depth of a /Strip the top two layers of nesting into lists.+Strip the top layer of nesting into a list.Flatten a present into textNone  &)*123468:;<=FHJKM4Print a nested value to the console in tabular form.The first two layers of nesting are displayed as rows and columns. Numeric data is right-justified, while the rest is left-justified. ^> tab [[10, 20, 302], [40, 50], [60, 7001, 80, 90 :: Int]] 10 20 302 40 50 60 7001 80 90 5Deeper layers of nesting are preserved in the output: k> tab [[[10], [20, 21]], [[30, 31], [40, 41, 41], [50 :: Int]]] [10] [20,21] [30,31] [40,41,41] [50] 7By default, strings are printed as lists of characters: > tab [[("red", 10), ("green", 20), ("blue", 30)], [("grey", 40), ("white", 50 :: Int)]] (['r','e','d'],10) (['g','r','e','e','n'],20) (['b','l','u','e'],30) (['g','r','e','y'],40) (['w','h','i','t','e'],50) 7If you want double-quotes then wrap the strings with a Str constructor: > tab [[(Str "red", 10), (Str "green", 20), (Str "blue", 30)], [(Str "grey", 40), (Str "white", 50 :: Int)]] ("red",10) ("green",20) ("blue",30) ("grey",40) ("white",50) 3If you don't want any quotes then wrap them with a Tok constructor: > tab [[(Tok "red", 10), (Tok "green", 20), (Tok "blue", 30)], [(Tok "grey", 40), (Tok "white", 50 :: Int)]] (red,10) (green,20) (blue,30) (grey,40) (white,50) 'Display a nested value in tabular form.6None  &)*123468:;<=FHJKMZClass of elements where arrays of those elements can be constructed in arbitrary order.BClass of elements that can be automatically organised into arrays.bArrays of elements that are automatically layed out into some efficient runtime representation.GThe implementation uses type families to chose unboxed representations for all elements that can be unboxed. In particular: arrays of unboxed tuples are represented as tuples of unboxed arrays, and nested arrays are represented using a segment descriptor and a single single flat vector containing all the elements.7None  &)*123468:;<=FHJKM2$O(1). Get an element from an array. bIf the provided index is outside the extent of the array then the result depends on the layout.O(1). Alias for -O(1). Get the number of elements in an array.$O(1). Take the head of an array, or c if it's empty.$O(1). Take the tail of an array, or c if it's empty.0O(1). Take the initial elements of an array, or c if it's empty.Convert a list to an array."Convert a nested list to an array.6Convert a triply nested list to a triply nested array.Convert an array to a list.%Convert a nested array to some lists.6Convert a triply nested array to a triply nested list. %O(n). Reverse the elements of a list. H> toList $ reverse $ fromList [0 .. 10 :: Int] [10,9,8,7,6,5,4,3,2,1,0]  /Apply a function to all the elements of a list. 3Combine two arrays of the same length element-wise..If the arrays don't have the same length then c. dApply a function to all the elements of a doubly nested array, preserving the nesting structure. This function has a non-standard time complexity. As nested arrays use a segment descriptor based representation, detatching and reattaching the nesting structure is a constant time operation. However, the array passed to the worker function will also contain any elements in the array representation that are not reachable from the segment descriptor. This matters if the source array was produced by a function that filters the segments directly, like . &Left fold of all elements in an array.*Yield the sum of the elements of an array..Yield the product of the elements of an array.1Yield the mean value of the elements of an array.8Yield the standard deviation of the elements of an array.Compute the Pearson correlation of two arrays.LIf the arrays differ in length then only the common prefix is correlated.@Segmented fold over vectors of segment lengths and input values.lThe total lengths of all segments need not match the length of the input elements vector. The returned  state can be inspected to determine whether all segments were completely folded, or the vector of segment lengths or elements was too short relative to the other.Like 2, but take an initial state for the first segment.HO(len src) Keep the elements of an array that match the given predicate.JO(1). Produce a nested array by taking slices from some array of elements.This is a constant time operation, as the representation for nested vectors just wraps the starts, lengths and elements vectors.zFor each segment of a nested vector, trim elements off the start and end of the segment that match the given predicate.pFor each segment of a nested array, trim elements off the end of the segment that match the given predicate.qFor each segment of a nested array, trim elements off the start of the segment that match the given predicate.1O(1). Pack a pair of arrays to an array of pairs.3O(1). Unpack an array of pairs to a pair of arrays.Concatenate nested arrays.O(len result) Concatenate the elements of some nested vector, inserting a copy of the provided separator array between each element.fO(len result) Concatenate the outer two layers of a triply nested array. (Segmented concatenation).The operation is performed entirely on the segment descriptors of the array, and does not require the inner array elements to be copied."This version is faster than plain  on triply nested arrays.O(len result) Perform a ?, adding a newline character to the end of each inner array. tO(len result) Insert a copy of the separator array between the elements of the second and concatenate the result.!*Ragged transpose of a triply nested array.This operation is performed entirely on the segment descriptors of the nested arrays, and does not require the inner array elements to be copied."CTake a slice out of an array, given a starting position and length.##Merge two sorted key-value streams.$Like #E, but only produce the elements where the worker functions return .%Combination of fold and . |We walk over the stream front to back, maintaining an accumulator. At each point we can chose to emit an element (or not)&Like %r but use the first value of the stream as the initial state, and add the final state to the end of the output.'>Insert elements produced by the given function in to an array.(O(len src) Yield = the index of the first element matching the predicate or c if no such element exists.)zO(len src). Given predicates which detect the start and end of a segment, split an vector into the indicated segments.*EO(len src). Given a terminating value, split an vector into segments.2The result segments do not include the terminator.+O(len src). Like )!, but cut the source array twice.,\O(len src). Given field and row terminating values, split an array into rows and fields.-xFrom a stream of values which has consecutive runs of idential values, produce a stream of the lengths of these runs..Like -, but use the given function to determine whether two consecutive elements should be in the same group. Also take an initial starting group and count.2     Worker function.$Initial state when folding segments.Segment names and lengths. Elements.Worker function.$Initial state when folding segments.1Name, length and initial state for first segment.Segment names and lengths. Elements.Segment starting positions.Segment lengths.Array elements.Arrays to concatenate.Separator array.Arrays to concatenate. Separator array.Arrays to concatenate.!"#%Combine two values with the same key.*Handle a left value without a right value.*Handle a right value without a left value.Array of keys and left values.Array of keys and right values.Array of keys and results.$%Combine two values with the same key.*Handle a left value without a right value.*Handle a right value without a left value.Array of keys and left values.Array of keys and right values.Array of keys and results.%&'()Detect the start of a segment.Detect the end of a segment.Array to segment.*Detect the end of a segment.Array to segment.+%Detect the start of an inner segment.%Detect the end of an inner segment.%Detect the start of an outer segment.%Detect the end of an outer segment.Array to dice.,'Terminating element for inner segments.'Terminating element for outer segments.Vector to dice.-Input elements.$Completed and final segment lengths..Comparison function.Starting element and count.Input elements.$Completed and final segment lengths.5      !"#$%&'()*+,-.2      !"#$%&'()*+,-.None  &)*123468:;<=FHJKM/6Get data from a file, up to the given number of bytes.0uGet data from a file, up to the given number of bytes, also copying the given data to the front of the new buffer.1Write data into a file.2PRead a XSV file as a nested array. We get an array of rows:fields:characters.3QRead an XSV file as a nested array. We get an array of rows:fields:characters.4$Write a nested array as an XSV file.*The array contains rows:fields:characters.5$Write a nested array as an XSV file.*The array contains rows:fields:characters./012Field separator character, eg '|' , ',' or '\t'.Source file handle.3Field separator character, eg '|' , ',' or '\t'.Source file handle.4Separator character, eg '|' , ',' or '\t'Source file handle.Array of row, field, character.5Separator character, eg '|' , ',' or '\t'Source file handle.Array of row, field, character./012345/012345/012345None  &)*123468:;<=FHJKM6Try to read an # from the given offset in an array.rIf the conversion succeeded then you get the value, along with the index of the next character, otherwise c.7Unboxed version of 6.WWe still pay to unbox the input array, but avoid boxing the result by construction.83Convert a foreign vector of characters to a Double.The standard Haskell D type is four bytes in length. If you already have a vector of  then use 9& instead to avoid the conversion.9.Convert a foreign vector of bytes to a Double.: Convert a % to ASCII text packed into a foreign Vector.; Convert a % to ASCII text packed into a foreign Vector.<Like :>, but use a fixed number of digits after the decimal point.=Like ;>, but use a fixed number of digits after the decimal point. 6789:;<=6789:;<=6789:;<= 6789:;<=None  &)*123468:;<=FHJKM>PPack some array elements into a foreign buffer using the given binary format.?bUnpack an array of elements from a foreign buffer into their standard in-memory representation.The binary format of the elements in the buffer is given by the format specififier, while the in-memory representation is chosen automagically based on the type of the elements.>Binary format for each element.Source elements.Packed binary data.?Binary format for each element.Packed binary data.Unpacked elements.->?>?>?None  &)*123468:;<=FHJKM5      !"#$%&'()*+,-.5      !"'(#$%&-.)*+,8None  &)*123468:;<=FHJKM5      !"#$%&'()*+,-.5      !"'(#$%&-.)*+, None  &)*123468:;<=FHJKM@!A date packed into a 32-bit word.The bitwise format is: I 32 16 8 0 | year | month | day | Pros: Packing and unpacking a Date32 is simpler than using other formats that represent dates as a number of days from some epoch. We can also avoid worrying about what the epoch should be, and the representation will not overflow until year 65536. Cons: Computing a range of dates is slower than with representations using an epoch, as we cannot simply add one to get to the next valid date.A"Pack a year, month and day into a . If any components of the date are out-of-range then they will be bit-wise truncated so they fit in their destination fields.B Inverse of A.<This function does a simple bit-wise unpacking of the given o, and does not guarantee that the returned fields are within a valid range for the given calendar date.C"Yield the next date in the series.hThis assumes leap years occur every four years, which is valid after year 1900 and before year 2100.DHYield an array containing a range of dates, inclusive of the end points.EPretty print a @FRead a @E in ASCII YYYYsMMsDD format, using the given separator character s.GRead a @E in ASCII DDsMMsYYYY format, using the given separator character s.@ABCDESeparator for components.Date to pretty print.FG@ABCDEFG@ABCDEFG@ABCDEFG9:;9:<9:=9:>9:?9:@9:@ABCDEFGGHIJKLMN!O!P!Q!R!S!T!U!U!V!V!W!X!Y!Z![!\!]!^!_!`!a!b!c!d!e!f!g!h"i"j"k"l"m"n"o"p"qrstuvwwxx$y$z${$|$}$~$$          %%%%%%%%%%%%%%&&& '   (((((((((()))))**++,------...///    1 11222 !"#$%&'()*6+6,6{7}7~77-7777777.7/777777777777777 7 7 7071777777 727777777777773456789:;<=>?@ABC D E M F G H I JK!L!M!NOPQRSTUVWXYZ#[#[#\#\#]#^#_#`#a$.$/bcdefghijklmnopqrstu v w x y z { | } ~       b            b(((((((((((((bbc{9b222222222222222222222222222222222222222222222222 2 2 2 2 222333333333333333333 3!3"4#4$4%4&4'4(4)4*4+4,44-4.4/4041424344445464748494:44;4<4=4>4?4@4A4B4C4D4E4F4G4H4I4J4K4L4M4N4O4P4Q5R5S55T5U5V5W5X5Y5Z[\]^_`abcdefghijklmnopqrstuvwxyz{|}~bbDMEb D          repa-array-4.1.0.1Data.Repa.Array.Generic Data.Repa.Array.Material.UnboxedData.Repa.Nice.DisplayData.Repa.Fusion.UnpackData.Repa.Array.Generic.IndexData.Repa.Array.Generic.SliceData.Repa.Array.Meta.Window Data.Repa.Array.Material.StridedData.Repa.Array.Meta.RowWiseData.Repa.Array.Meta.LinearData.Repa.Array.Generic.TargetData.Repa.Array.Generic.LoadData.Repa.Array.Material.BoxedData.Repa.Array.Meta.Delayed Data.Repa.Array.Material.ForeignData.Repa.Eval.StreamData.Repa.Array.Meta.Delayed2Data.Repa.Array.Meta.DenseData.Repa.Array.Meta.TupleData.Repa.Eval.ChainData.Repa.Array.Material.NestedData.Repa.Array.MaterialData.Repa.Array.Generic.ConvertData.Repa.Array.Material.AutoData.Repa.NiceData.Repa.Nice.PresentData.Repa.Nice.TabulateData.Repa.Array.AutoData.Repa.Array.Auto.IOData.Repa.Array.Auto.ConvertData.Repa.Array.Auto.UnpackData.Repa.Bits.Date32Data.Repa.Array.Internals.Shape Data.Repa.Array.Internals.LayoutData.Repa.Array.Internals.CheckData.Repa.Array.Internals.Bulk Data.Repa.Array.Internals.TargetData.Repa.Array.Internals.Load)Data.Repa.Array.Internals.Operator.Filter%Data.Repa.Array.Material.Foreign.Base)Data.Repa.Array.Internals.Operator.Concat*Data.Repa.Array.Internals.Operator.Compact(Data.Repa.Array.Internals.Operator.Merge)Data.Repa.Array.Internals.Operator.Insert)Data.Repa.Array.Internals.Operator.Reduce'Data.Repa.Array.Internals.Operator.Fold(Data.Repa.Array.Internals.Operator.GroupData.Repa.Array.Meta,Data.Repa.Array.Internals.Operator.Partition"Data.Repa.Array.Material.Auto.Base'Data.Repa.Array.Material.Auto.InstFloat%Data.Repa.Array.Material.Auto.InstInt&Data.Repa.Array.Material.Auto.InstWordData.Repa.Array.Auto.BaseData.Repa.Array.Auto.OperatorData.Repa.Arrayrepa-stream-4.1.0.1Data.Repa.Chain.Folds_valSeg_lenSeg_nameSeg _stateVals _stateLensFoldsvector-0.10.12.3Data.Vector.Unboxed.BaseUnboxFormat FormatText FormatNumericDisplaydisplay takeDisplaypadLpadRUnpackunpackrepackSH5SH4SH3SH2SH1SH0:.ZShaperankzeroDimunitDim intersectDimaddDimsize inShapeRange listOfShape shapeOfListinShape showShapeish0ish1ish2ish3ish4ish5LayoutILayoutNameIndexnamecreateextenttoIndex fromIndexSlice sliceOfFull fullOfSlice SliceShape FullShapeAnyAllBulkIBulkArraylayoutindex!lengthtoList WindowablewindowWWindow windowStart windowSize windowInnerwindowedentiretailinitSStrided stridedLength unsafeCastfromForeignPtr toForeignPtrDIM5DIM4DIM3DIM2DIM1RWRowWise rowWiseShaperowWiseix1ix2ix3ix4ix5LLinear linearLengthlinearTargetITargetBufferunsafeNewBufferunsafeReadBufferunsafeWriteBufferunsafeGrowBufferunsafeSliceBufferunsafeFreezeBufferunsafeThawBuffer touchBuffer bufferLayoutfromList fromListIntoLoadloadSloadPcomputeS computeIntoSfilterBBoxed boxedLength fromBoxedtoBoxeddecimateDDelayed delayedLayout fromFunction toFunctiondelaymapreverseFForeign foreignLengthtoStorableVectorfromStorableVector toByteStringfromByteStringUUnboxed unboxedLength fromUnboxed toUnboxed ConcatDictconcat concatWithunlines intercalate streamOfArrayunstreamToArrayunstreamToArrayIOcompact compactInmerge mergeMaybeD2Delayed2delayed2Layout1delayed2Layout2delay2map2EDensevectormatrixcubeT2Tup2tup2untup2insertfoldlsumprodmeanstd correlate chainOfArrayunchainToArrayunchainToArrayIO FoldsDictfolds foldsWith GroupsDictgroups groupsWithNNested nestedLength fromLists fromListssmapElemsslicesconcatssegment segmentOndicediceSeptrimstrimEnds trimStarts ragspose3 partition partitionBy partitionByIxConvertconvertAAuto autoLengthMaterial findIndexmapSmap2ScopyNicerNiceniceTokStr PresentablepresentPresentSomeManyAtomdepthstrip2strip1flattentabtabulateBuildElemheadtoListstoListsszipunzipslice hGetArray hGetArrayPre hPutArraygetArrayFromXSVhGetArrayFromXSV putArrayAsXSVhPutArrayAsXSVreadIntFromOffsetreadIntFromOffset# readDoublereadDoubleFromBytes showDoubleshowDoubleAsBytesshowDoubleFixedshowDoubleFixedAsBytes packForeign unpackForeignDate32packnextrangeprettyreadYYYYsMMsDDreadDDsMMsYYYY$fMonoidDisplay $fShape:.$fShapeZ $fShapeInt $fSlice:. $fSlice:.0 $fSliceAny$fSliceZTFCo:R:SliceShape:.TFCo:R:SliceShape:.0TFCo:R:SliceShapeAnyTFCo:R:SliceShapeZTFCo:R:FullShape:.TFCo:R:FullShape:.0TFCo:R:FullShapeAnyTFCo:R:FullShapeZUnsafeSafeCheckmethodcheck $fCheckUnsafe $fCheckSafebase Data.MaybeNothing$fWindowableWa$fBulkWa $fLayoutWWArrayTFCo:R:ArrayWa TFCo:R:NameWSArraysArrayStartBytessArrayStrideBytessArrayLenElems sArrayPtr$fWindowableSa$fUnpackArray(,,,)TFCo:R:ArraySa$fBulkSa TFCo:R:NameS $fLayoutS $fBulkRWshRArrayRCRZTFCo:R:ArrayRWsh TFCo:R:NameRW $fLayoutRWTFCo:R:NameRW0 $fLayoutRW0 $fShapeRW $fBulkLInt $fLayoutLLArrayTFCo:R:ArrayLInt TFCo:R:NameLGHC.List $fTargetBa$fWindowableBa$fBulkBa $fLayoutBBBufferBArray$fUnpackBufferMVectorTFCo:R:BufferBa $fEqArrayTFCo:R:ArrayBa TFCo:R:NameB$fBulkDa $fLayoutDADelayed $fLoadDl2aTFCo:R:ArrayDa TFCo:R:NameDGHC.ForeignPtr ForeignPtrbytestring-0.10.4.0Data.ByteString.Internal ByteString $fTargetFa$fWindowableFa$fBulkFa $fLayoutFFBufferFArrayTFCo:R:BufferFa$fUnpackArrayVectorTFCo:R:ArrayFa TFCo:R:NameF $fTargetUa$fWindowableUa$fBulkUa $fLayoutUUBufferUArrayTFCo:R:BufferUaTFCo:R:ArrayUa TFCo:R:NameUghc-prim GHC.TypesIOJust $fBulkD2a $fLayoutD2 ADelayed2 $fLoadD2lDstaTFCo:R:ArrayD2a TFCo:R:NameD2 $fTargetEa$fBulkEa $fLayoutEEBuffer$fUnpackBuffer(,)TFCo:R:BufferEaTFCo:R:ArrayEa TFCo:R:NameE $fTargetT2(,)$fWindowableT2(,) $fBulkT2(,)T2BufferT2ArrayTFCo:R:BufferT2(,)TFCo:R:ArrayT2(,) TFCo:R:NameT2 $fLayoutT2Data.Repa.Chain.BaseChain liftChain nArrayStarts nArrayLengths nArrayElems$fWindowableNArray $fBulkNArray $fLayoutNNBufferNArrayTFCo:R:BufferNArray$fTargetNArrayTFCo:R:ArrayNArray TFCo:R:NameNrepa-eval-4.0.0.1Data.Repa.Eval.EltElt $fConvertrara ABuffer_Array AArray_Array ABuffer_List AArray_List ABuffer_Prod AArray_Prod ABuffer_T2 AArray_T2 ABuffer_Char AArray_Char$fWindowableAArray$fUnpackBuffertTFCo:R:BufferAArray$fTargetAArray$fConvertAArrayAArray$fConvertNArrayAArray$fConvertAArrayNArrayTFCo:R:ArrayAArray $fBulkAArray$fUnpackBufferBufferTFCo:R:BufferA[] $fTargetA[]$fWindowableA[]TFCo:R:ArrayA[] $fBulkA[] $fEqArray0TFCo:R:BufferA:*: $fTargetA:*:$fWindowableA:*:TFCo:R:ArrayA:*: $fBulkA:*: $fEqArray1$fUnpackBuffert0TFCo:R:BufferA(,) $fTargetA(,)$fWindowableA(,)$fConvertA(,)T2(,)$fConvertT2(,)A(,)TFCo:R:ArrayA(,) $fBulkA(,) $fEqArray2$fUnpackBuffert1TFCo:R:BufferAChar $fTargetAChar$fUnpackArrayt$fWindowableAChar$fConvertACharFChar$fConvertFCharACharTFCo:R:ArrayAChar $fBulkAChar TFCo:R:NameA $fLayoutAABuffer_Double AArray_Double ABuffer_Float AArray_FloatTFCo:R:BufferADouble$fTargetADouble$fWindowableADouble$fConvertADoubleFDouble$fConvertFDoubleADoubleTFCo:R:ArrayADouble $fBulkADoubleTFCo:R:BufferAFloat$fTargetAFloat$fWindowableAFloat$fConvertAFloatFFloat$fConvertFFloatAFloatTFCo:R:ArrayAFloat $fBulkAFloat ABuffer_Int64 AArray_Int64 ABuffer_Int32 AArray_Int32 ABuffer_Int16 AArray_Int16 ABuffer_Int8 AArray_Int8 ABuffer_Int AArray_IntTFCo:R:BufferAInt64$fTargetAInt64$fWindowableAInt64$fConvertAInt64FInt64$fConvertFInt64AInt64TFCo:R:ArrayAInt64 $fBulkAInt64TFCo:R:BufferAInt32$fTargetAInt32$fWindowableAInt32$fConvertAInt32FInt32$fConvertFInt32AInt32TFCo:R:ArrayAInt32 $fBulkAInt32TFCo:R:BufferAInt16$fTargetAInt16$fWindowableAInt16$fConvertAInt16FInt16$fConvertFInt16AInt16TFCo:R:ArrayAInt16 $fBulkAInt16$fUnpackBuffert2TFCo:R:BufferAInt8 $fTargetAInt8$fWindowableAInt8$fConvertAInt8FInt8$fConvertFInt8AInt8TFCo:R:ArrayAInt8 $fBulkAInt8$fUnpackBuffert3TFCo:R:BufferAInt $fTargetAInt$fWindowableAInt$fConvertAIntFInt$fConvertFIntAIntTFCo:R:ArrayAInt $fBulkAInt ABuffer_Word8 AArray_Word8TFCo:R:BufferAWord8$fTargetAWord8$fWindowableAWord8$fConvertAWord8FWord8$fConvertFWord8AWord8TFCo:R:ArrayAWord8 $fBulkAWord8 $fNicer[] $fNicer[]0 $fNicer[]1 $fNicer[]2 $fNicer[]3 $fNicerArray $fNicer:*: $fNicer(,) $fNicerMaybe $fNicer[]4 $fNicer[]5 $fNicer[]6 $fNicer[]7 $fNicer[]8 $fNicer[]9 $fNicer[]10 $fNicer[]11 $fNicer[]12 $fNicer[]13 $fNicer[]14 $fNicer[]15 $fNicerWord64 $fNicerWord32 $fNicerWord16 $fNicerWord8 $fNicerWord $fNicerInt64 $fNicerInt32 $fNicerInt16 $fNicerInt8 $fNicerInt $fNicerDouble $fNicerFloat $fNicerChar $fNicer() $fShowTok $fShowStrGHC.Showshow$fPresentable(,,,,)$fPresentable(,,,)$fPresentable(,,)$fPresentable(,)$fPresentable[]$fPresentableTok$fPresentableStr$fPresentableWord64$fPresentableWord32$fPresentableWord16$fPresentableWord8$fPresentableDouble$fPresentableFloat$fPresentableInt$fPresentableChar tabulate1 tabulate2IntCharGHC.WordWord8Doublestrtodrepa-convert-4.1.0.1Data.Repa.Convert.Format.BinaryInt8beWord8beInt16beWord16beInt32beWord32beInt64beWord64be Float32be Float64beData.Repa.Convert.Format.Base listFormat forFormatunpackFromList packToList packedSize fixedSizeValuePackableFixListVarList FixString VarStringASCIIData.Repa.Product:*:Word32ABuffer_Date32 AArray_Date32next'TFCo:R:BufferADate32$fTargetADate32$fWindowableADate32TFCo:R:ArrayADate32 $fBulkADate32$fStorableDate32