&}      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{| portable experimental'Roman Leshchinskiy <rl@cse.unsw.edu.au>}~portable experimental'Roman Leshchinskiy <rl@cse.unsw.edu.au>  Strict Maybe  Strict sum  Strict pair  Analog to  in regular pairs.  Analog to  in regular pairs. "Converts a pair to a strict pair. "Converts a strict pair to a pair.  Analogous to  in regular pairs.  Analogous to  in regular pairs. O(1).  n f m is the catamorphism for  , returning n if  m is , and applying f to the value wrapped in  otherwise. O(1).  n m returns n if m is  and the value  wrapped in  otherwise.   non-portable (existentials)internal'Roman Leshchinskiy <rl@cse.unsw.edu.au> Empty stream Singleton stream  Construction  Replication CGiven a stream of (length,value) pairs and the sum of the lengths, + replicate each value to the given length. LFIXME: This should probably produce a segmented stream but since we want to  get rid of them anyway... Concatenation  Indexing  ----------  Indexing  ---------- Associate each element in the  with its index  Substreams  ------------ Yield the tail of a stream  Conversion to/ from lists  -------------------------- Convert a list to a  Generate a list from a  Mapping  Filtering Folding 1, applied to a binary operator, a starting value ? (typically the right-identity of the operator), and a stream, C reduces the stream using the binary operator, from right to left. foldr1S is a variant of  that has no starting value : argument, and thus must be applied to non-empty streams.  Scanning Zipping JFIXME: The definition below duplicates work if the second stream produces F Skips. Unfortunately, GHC tends to introduce join points which break ) SpecConstr with the correct definition. Yield an enumerated stream BFIXME: Can this be implemented polymorphically? We could just use " enumFromThenTo here, but this won'#t really work for parallel arrays. . Perhaps we have to introduce an EnumP class? 1Yield an enumerated stream using a specific step 55portableinternal'Roman Leshchinskiy <rl@cse.unsw.edu.au> /non-portable (unboxed values and GHC libraries)internal'Roman Leshchinskiy <rl@cse.unsw.edu.au>6The basic operations on unboxed arrays are overloaded Unboxed arrays  --------------- 1Number of elements of an immutable unboxed array .Number of elements of a mutable unboxed array  Empty array JProduces an array that consists of a subrange of the original one without  copying any elements. (Allocate an uninitialised unboxed array KTurn a mutable into an immutable array WITHOUT copying its contents, which G implies that the mutable array must not be mutated anymore after this  operation has been executed. K The explicit size parameter supports partially filled arrays (and must be G less than or equal the size used when allocating the mutable array) KTurn a mutable into an immutable array WITHOUT copying its contents, which G implies that the mutable array must not be mutated anymore after this  operation has been executed.  In contrast to $, this operation always freezes the  entire array. /Copy values from one mutable array to another. Stream of unboxed arrays  ------------------------- 4Generate a stream from an array, from left to right @Construct an array from a stream, filling it from left to right Combinators for unboxed arrays  - (Replicate combinator for unboxed arrays DExtract a slice from an array (given by its start index and length) %Map a function over an unboxed array Reduce an unboxed array BReduce an unboxed array using an *associative* combining operator Summation of an unboxed array %Prefix reduction of an unboxed array FPrefix reduction of an unboxed array using an *associative* combining  operator >Extract a slice from a mutable array (the slice is immutable) HCopy a the contents of an immutable array into a mutable array from the  specified position on Convert a list to an array Convert an array to a list ""non-portable (GADTS)internal'Roman Leshchinskiy <rl@cse.unsw.edu.au>DThis type class determines the types that can be elements immutable K unboxed arrays. The representation type of these arrays is defined by way L of an associated type. All representation-dependent functions are methods  of this class. The basic array datatype. O(1?)(. Yield the length of an unboxed array. O(1). 7 restricts access to a subrange of the original array  (no copying). O(1).  / yields the length of a mutable unboxed array. !O(1). !< allocates a mutable unboxed array of the specified length. "O(1). "8 reads the element at the specified index of a mutable  unboxed array. #O(1). #0 writes a new value to the specified index of a  mutable unboxed array. $O(n). $9 copies the contents of an immutable unboxed array into 2 a mutable one starting from the specified index. %O(1). %/ converts a prefix of a mutable array into an J immutable unboxed array, without copying. The mutable array must not be  mutated after this. &1Copy a portion of one mutable array to a second. 'BCopy a portion of one mutable array to a second, beginning at the  specified offsets for each. (BCopy a portion of one mutable array to a second, beginning at the G specified offsets for each. This operation is safe even if the source  and destination are the same. )O(1). )+ converts an entire mutable array into an J immutable array, without copying. The mutable array must not be mutated  after this. *O(n). *5 constructs an immutable array of the given size by M performing the provided initialization function on a mutable representation  of the output array. -O(1). Yield an array of units. .O(1)*. Elementwise pairing of array elements. N.B@: The output will be as long as the first array (and will thus H access past the end of the second array), unlike its List counterpart. N This will not occur at the time zipU is called, but only after the resulting  array is accessed. /O(1)+. Elementwise unpairing of array elements. 0O(1)3. Yield the first components of an array of pairs. 1O(1)4. Yield the second components of an array of pairs. 29Elementwise pairing of mutable arrays. This is an unsafe : operation, as no copying is performed, so changes to the = pair array will affect the original arrays, and vice versa. 3;Elementwise unpairing of mutable arrays. This is an unsafe : operation, as no copying is performed, so changes to the ; unpaired arrays will affect the original, and vice versa. #Array operations on unboxed arrays  - LNB: We use instances for all possible unboxed types instead of re-using the M overloading provided by UAE to avoid having to store the UAE dictionary  in UAPrimU. " !"#$%&'()*+,-./0123" !"#$%&'(-./01*+,)23" !"#$%&'( !"#$%&'()*+,-./0123 non-portable (existentials)internal'Roman Leshchinskiy <rl@cse.unsw.edu.au>4O(1). 47 generates a stream from an array, from left to right. 5O(n). 57 creates an array from a stream, filling it from left  to right. 6O(n). 68 fills a mutable array from a stream from left to right , and yields the number of elements written. 456456 portableinternal'Roman Leshchinskiy <rl@cse.unsw.edu.au>37O(1). 7 returns the length of a  as an  . 8O(1). 8) tests whether the given array is empty. 9O(1). 9 yields an empty array. :O(1). :8 yields a singleton array containing the given element. ;O(n). ;) prepends the given element to an array. <O(n). <( appends the given element to an array. =O(n). = n e yields an array containing n repetitions of e. >O(n). > n r e+ yields an array such that each element in  eG is repeated as many times as the value contained at the corresponding  index in r. For example: replicateEachU 10 (toU [1..3] ) (toU [3..5]) yields toU [3.0,4.0,4.0,5.0,5.0,5.0] N.B: the n+ parameter specifies how many elements are  allocated for the N output array, but the function will happily overrun the allocated buffer for J all sorts of interesting effects! The caller is expected to ensure that  n <= sumU r. ?O(n). ?8 extracts an element out of an immutable unboxed array. @O(1). @' yields the first element of an array. AO(n). A& yields the last element of an array. BO(n). B concatenates two arrays. CO(n) . Concatenate a list of arrays. DO(n). D2 yields the input array without its last element. EO(n). E n u repeats an array u n times. FO(n). F6 associates each element of the array with its index. GO(n). G turns a list into a . HO(n). H collects the elements of a  into a list. IO(n). I n f a constructs an array of size n by iteratively  applying f to a. JO(n). J maps a function over an array. KO(n). K3 extracts all elements from an array that satisfy  the given predicate. LO(n). L7 extracts all elements from an array according to the # provided flag array. For example:  packU (toU [1..5]#) (toU [True,False,False,False,True])yields  toU [1.0,5.0]. MO(n). M, reduces an array proceeding from the left. NO(n). N is a variant of M that assumes a non-empty input K array, but requires no starting element. Throws an exception if the input  array is empty. OO(n) O1, applied to a binary operator, a starting value 7 (typically the right-identity of the operator), and a 'UArr a',  reduces the 'UArr a'0 using the binary operator, from right to left. PO(n) A variant of & that has no starting value argument, ) and thus must be applied to a non-empty 'UArr a'. QO(n). Q behaves like N but returns  if the  input array is empty. RO(n). R< reduces an array using an associative combination function  and its unit. SO(n). S behaves like T but returns  if the  input array is empty. TO(n). T is a variant of R! that requires a non-empty input 9 array. Throws an exception if its input array is empty. UO(n). U is equivalent to M on all prefixes (except the # array itself) of the input array. N.BI: the behavior of this function differs from that of Data.List. Compare: scanl (+) 0.0 [1..5] gives [0.0,1.0,3.0,6.0,10.0,15.0] scanlU (+) 0.0 $ toU [1..5] gives toU [0.0,1.0,3.0,6.0,10.0] 4To get behavior closer to the List counterpart, see Y. VO(n). V is like U", but requires no starting value. WO(n). W is equivalent to R# on all prefixes (except the array  itself) of the input array. XO(n). X is like W", but requires no starting value. YO(n). Y behaves like W$, but yields a strict pair with the  W result as its fstS and the missing element (R on the same  arguments) as its sndS . Compare: scanl (+) 0.0 [1..5] gives [0.0,1.0,3.0,6.0,10.0,15.0] scanlU (+) 0.0 $ toU [1..5] gives toU [0.0,1.0,3.0,6.0,10.0] scanResU (+) 0.0 $ toU [1..5] gives toU [0.0,1.0,3.0,6.0,10.0] :*: 15.0. ZO(n). Z7 is an accumulating map from left to right. Unlike its 7 List counterpart, it does not return the accumulator. [O(1). [5 takes three arrays and returns an array of triples. \O(n). \6 applies a function to corresponding elements of two 3 arrays, yielding an array containing the results. ]O(n). ]7 applies a function to corresponding elements of three - arrays, yielding an array with the results. ^O(1). ^7 unpairs an array of strict triples into three arrays. _O(n). _ f a1 a2* yields an array by picking elements from a1  if f is True2 at the given position, and picking elements from a2  otherwise. For example:  /combineU (toU [True,True,False,True,False,False] ) (toU [1..3] ) (toU [4..6])yields toU [1.0,2.0,4.0,3.0,5.0,6.0]. `O(n). `5 yields the given array without its initial element. aO(n). a9 yields the suffix obtained by dropping the given number  of elements from an array. bO(n). b4 yields the prefix of the given length of an array. cO(n). c8 splits an array into two subarrays at the given index. dO(n). d, applied to a predicate p and a UArr xs, 0 returns the longest prefix (possibly empty) of xs of elements that satisfy p. eO(n). e p xs$ returns the suffix remaining after d p xs. fO(n), fusion. The f) function takes a predicate and an array F and returns the first element in the list matching the predicate, or   if there is no such element. gO(n), fusion. The g5 function takes a predicate and an array and returns G the index of the first element in the array satisfying the predicate,  or  if there is no such element. hO(n), fusion. h  key assocs looks up a key in an array + of pairs treated as an association table. iO(n). i n f z builds an array of size n from a seed value  z by iteratively applying f, stopping when n elements have been  generated or f returns . 8789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi7789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijO(n). j* yields an enumerated array, analogous to , * but only works on instances of Integral. kO(n). Like j*, but works on fractional numbers (still  incrementing by 1 each time). lO(n). l. yields an enumerated array using a specific  step value. mO(n). m s d n& yields an enumerated array of length n  starting from s with an increment of d. nO(n). n n u, yields an array by taking each strict pair  uD and treating it as a range to generate successive values over. For  example: )enumFromToEachU 7 (toU [3 :*: 6, 8 :*: 10])  yields toU [3,4,5,6,8,9,10] N.B: This function will allocate n& slots for the output array, and will , happily overrun its allocated space if the u leads it to do so. The caller  is expected to ensure that n  = (sumU . mapU (\(x :*: y) - y - x + 1) $ u). jklmnjklmn oO(n). o, yields the conjunction of a boolean array. pO(n). o, yields the disjunction of a boolean array. qO(n). q p u* determines whether all elements in array u satisfy  predicate p. rO(n). r p u) determines whether any element in array u satisfies  predicate p. sO(n). s# computes the sum of an array of a  instance. tO(n). t' computes the product of an array of a  instance. uO(n). u5 finds the maximum element in an array of orderable  elements. vO(n). v8 finds the maximum element in an array under the given  ordering. wO(n). w5 finds the minimum element in an array of orderable  elements. xO(n). x8 finds the minimum element in an array under the given  ordering. yO(n). y6 determines whether the given element is in an array. zO(n). Negation of y. opqrstuvwxyz opqrstuvwxyz{O(n). { permutes a ! according to a UArr of permuted  indices. Standard permutation KBack permutation operation (ie, the permutation vector determines for each = position in the result array its origin in the input array) Default back permute J The values of the index-value pairs are written into the position in the > result array that is indicated by the corresponding index. H All positions not covered by the index-value pairs will have the value C determined by the initialiser function for that index position. |O(n). | arr upds' replaces elements at specific indices  of arr based on the contents of upds (where fstS indicates the index to  replace, sndS the replacement value). >Yield an array constructed by updating the first array by the 9 associations from the second array (which contains index/value pairs). *Reverse the order of elements in an array {|{|portableinternal'Roman Leshchinskiy <rl@cse.unsw.edu.au>See .cabal file Don Stewartt  !"#$%&'()*-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|t !"#$%&'(45GH9:;<BC@A`D8-7JRTSMNOPQoprqstuwvxUVWXYZI=>ibacdeyzKfg?h.[/^\]01jklmn_LFE*){|623   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG H I J 1 K L M N O P Q 2 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 {|}~        uvector-0.1.0.5Data.Array.VectorData.Array.Vector.UArrData.Array.Vector.Prim.Text"Data.Array.Vector.Prim.Hyperstrictbase Data.TupleData.Array.Vector.StreamData.Array.Vector.Prim.DebugData.Array.Vector.Prim.BUArrData.Array.Vector.Strict.StreamData.Array.Vector.Strict.Basicsghc-prim GHC.Types Data.List Data.MaybeData.Array.Vector.Strict.EnumPreludeData.Array.Vector.Strict.Sums Data.Array.Vector.Strict.PermuteData.Array.Vector.Strict.TextMaybeSJustSNothingSEitherSRightSLeftS:*:fstSsndSpairSunpairScurrySuncurryS unsafe_pairSunsafe_unpairSmaybeS fromMaybeSUIOhPutUhGetUUPrimmkUAPrimunUAPrim mkMUAPrim unMUAPrimUAUArrMUArrlengthUindexUsliceUlengthMUnewMUreadMUwriteMUcopyMUunsafeFreezeMUmemcpyMU memcpyOffMU memmoveOffMUunsafeFreezeAllMUnewUnewDynU newDynResUunitsUzipUunzipUfstUsndU unsafeZipMU unsafeUnzipMUstreamU unstreamU unstreamMUnullUemptyU singletonUconsUsnocU replicateUreplicateEachUheadUlastUappendUconcatUinitUrepeatUindexedUtoUfromUiterateUmapUfilterUpackUfoldlUfoldl1UfoldrUfoldr1U foldl1MaybeUfoldU fold1MaybeUfold1UscanlUscanl1UscanUscan1UscanResU mapAccumLUzip3UzipWithU zipWith3Uunzip3UcombineUtailUdropUtakeUsplitAtU takeWhileU dropWhileUfindU findIndexUlookupUunfoldU enumFromToUenumFromToFracUenumFromThenToUenumFromStepLenUenumFromToEachUandUorUallUanyUsumUproductUmaximumU maximumByUminimumU minimumByUelemUnotElemU permuteMUatomicUpdateMUGHC.ReadRead readListPrecreadPrecreadList readsPrecshowsAppreadAppreadsAppfstsndcurryuncurryemptyS singletonSconsS replicateSreplicateEachS+++indexSindexedSStreamheadStailStoStream fromStreammapSfilterSfoldSfoldrSfoldr1SscanSzipWithSenumFromToFracSenumFromThenToSBoxStepYieldSkipDonenullSsnocSinitStakeSdropSelemSlookupSfoldl1S fold1MaybeSscan1S mapAccumScombineS zipWith3SzipS enumFromToSenumFromStepLenSenumFromToEachSfindS findIndexS takeWhileS dropWhileSunfoldSerrorEmptyStream moduleErrorcheck checkCriticalcheckLencheckEq checkNotEmpty uninitialisedUAEBUArrlengthBU lengthMBUemptyBUsliceBUnewMBUunsafeFreezeMBUunsafeFreezeAllMBU memcpyMBUstreamBU unstreamBU replicateBU extractBUmapBUfoldlBUfoldBUsumBUscanlBUscanBU extractMBUcopyMBUtoBUfromBUsizeBUindexBUreadMBUwriteMBUMBUArr memcpyOffMBU memmoveOffMBUhGetBUhPutBU primLengthUIntGHC.BasefoldrNothingeqUrepShere unstreamScan unstreamScanMGHC.Enum enumFromToGHC.NumNumpermuteU bpermuteU bpermuteDftUupdateUreverseU