úÎ!wOta5      !"#$%&'()*+, - . / 0 1 2 3 4 None&'4567=>?@ADHSVX_k DPutilsThis is a bit like a lazy  Data.SequenceK in terms of constructors. We can not be spine-strict, otherwise we'd use  Data.Sequence# and enjoy the better performance.DPutilsThis backtrace is doneDPutilsTExpand a backtrace to the left. This is lazy, since backtracing relies on laziness.DPutilsExpand lazily to the right.DPutilsconcatenate two structures DPutils•This is somewhat tricky, since we might have to walk down the structure quite a bit and shuffle constructors without changing the actual leaf order.555None&'4567=>?@ADHSVX_kDPutilsThe parsed function from streaming-utilsDPutilsAttoparsec parserDPutils Raw inputNone&'4567=>?@ADHSVX_k3DPutilsSplit a ByteString m r after every k characters.Streams in constant memory.6BUG: Once the stream is exhausted, it will still call splitAt, forever creating empty  ByteStrings.DPutilsFor lists, this would be +sbs (f :: [a] -> ([a],[a])) -> [a] -> [[a]]–. Takes a function that splits the bytestring into two elements repeatedly, where the first is followed by the repeated application of the function.cf. ahttp://hackage.haskell.org/package/streaming-utils-0.1.4.7/docs/src/Streaming-Pipes.html#chunksOf4TODO these functions should go into a helper libraryNone&'4567=>?@ADHSVX_kINone&'4567=>?@ADHSVX_k!KDPutils5If the size of the input is known before-hand or not.DPutils2Select only a subset of the possible enumerations.DPutilsEnumerate all elementsDPutils#Enumerate from a value and at most N elementsDPutils7Shall we combine elements on the main diagonal as well? If we choose NoDiagS, we deal with upper triangular matrices that are effectively one element smaller. ! ! None&'4567=>?@ADHSVX_k$Ç%DPutilsUpper triangular elements.&DPutilsOuter pairing of all as with all bs8. This one is quasi-trivial, but here for completeness.  !%&%&None&'4567=>?@ADHSVX_k'c'DPutilsTurns a stream into a vector.&TODO insert index checks? Generalized  flag devel''None&'4567=>?@ADHSVX_k2~(DPutilsTriangular numbers. https://oeis.org/A000217)DPutils&Size of an upper triangle starting at i and ending at j+. "(0,N)" what be the normal thing to use.*DPutilsÀSubword indexing. Given the longest subword and the current subword, calculate a linear index "[0,..]". "(l,n)" in this case means "l"ower bound, length "n". And "(i,j)" is the normal index. ¢0 1 2 3 <- j = ... 0 1 2 3 i=0 _ 4 5 6 i=1 _ _ 7 8 i=2 9 i=3 i=2, j=3 -> (4+1) * i - tri i + j _ _ _ the triangular number to subtract. +DPutilsLinear index to paired.We have indices in [0,N], and linear index k. (N+1)*i - (i*(i+1)/2) + j == K ()*+()*+ None&'4567=>?@ADHSVX_kJÛ,DPutilsAGeneralized upper triangular elements. Given a list of elements  [e_1,...,e_k], we want to return pairs  (e_i,e_j)+ such that we have all ordered pairs with i<j (if NoDiagonal elements), or i<=j (if OnDiagonal elements).upperTri will force the spine of t a) but is consumed linearly with a strict Data.Foldable.foldl'. Internally we keep a  Data.IntMap of the retained elements.This is important if the  Enumerate type is set to  FromN k n. We start at the kth element, and produce n elements. TODO compare IntMap and HashMap.TODO inRange is broken.,DPutilsIf the size of t a, is known beforehand, give the appropriate  KnownSize n, otherwise give  UnknownSize. Using  UnknownSize# will force the complete spine of t a.DPutilsBThe enumeration will include the pairs on the main diagonal with OnDiag , meaning (i,i) will be included for all i. Otherwise, NoDiag will exclude these elements.DPutilsEither enumerate All elements or enumerate the s elements starting at k with  FromN k s.DPutils.The foldable data structure to enumerate over.DPutils"If there is any error then return  Left errorMsg. Otherwise we have Right (imap, numElems, list). The imapS structure holds the subset of elements with which we actually generate elements. numElems\ is the total number of elements that will be generated. This is calculated without touch list . Finally, list/ is the lazy list of elements to be generated.,, None&'4567=>?@ADHSVX_kUs-DPutilsDEvaluates chunks of pipes elements in parallel with a pure function..DPutilsÏEvaluates chunks of pipes elements in parallel with a pure function. Before and after each parallel step, a monadic function is run. This allows generation of certain statistics or information during runs.-DPutils*number of elements to evaluate in parallelDPutilswith which strategyDPutils!function to be mapped in parallel.DPutils*number of elements to evaluate in parallelDPutilswith which strategyDPutils pure function to run in parallelDPutilsfunction to run beforeDPutilsfunction to run after-.-. None&'4567=>?@ADHSVX_kq0DPutils&Splits bytestrings after each pattern patH. Tries to minimize the number of intermediate bytestring constructors.The following function ske expects a string str and a pattern pat< and then returns a tuple with the splitted bytestrings in fst and the return value in snd.The inner parser parse uses zoomp to draw the full inner producer, which should contain just one bytestring, namely one of the split off ones. parseY doesn't do anything with the inner producer, except returning the contained bytestring.parse returns Right $ concat xs on a correct parse, and Left []$ once the input has been exhausted. ÿ¯ske :: ByteString -> ByteString -> ([ByteString],[ByteString],[ByteString]) ske pat str | BS.null pat || BS.null str = ([],[],[]) ske pat str = let parse = do xs <- zoom (splitKeepEnd pat) PP.drawAll case xs of [] -> return $ Left [] xs -> return $ Right $ BS.concat xs (a,(b,p)) = runIdentity . P.toListM' $ PP.parsed parse $ PP.yield str in (a,b, fst . runIdentity . P.toListM' $ p) 1DPutilsASplit a string into substrings, where each substring starts with pat+ and continues until just before the next pat$ (or until there is no more input).5Any prefix that does not start with the substring is kept!/Since each substring is supposed to start with pat`, there is a small problem. What about a header that prefixes the string we are interested in?2DPutils/Generic splitting function. Takes a bytestring [a,b,c] (where a,b,c; are substrings of the bytestring!) and performs the split.2DPutilssplitter functionDPutilspattern to split onDPutils.lens into the individual split off bytestrings/0123/0123 None&'4567=>?@ADHSVX_kt]4DPutils{Orphan instance providing a primitive monad instance for streams. Allows impurely folds into mutable vectors from streams.5  !"#$%&'()*+,,-./01234567 8 9 : ; < = > ? @A&DPutils-0.1.0.0-JisNmwMisGgGruEVLiBjGYDP.Backtraced.Core$Data.Attoparsec.ByteString.StreamingData.ByteString.Streaming.SplitData.Char.UtilData.Paired.CommonData.Paired.VectorData.Vector.Generic.UnstreamMath.TriangularNumbersData.Paired.FoldablePipes.ParallelPipes.Split.ByteStringStreaming.Primitive BacktracedEpsilonConsSnocAppend<||>><$fSerialmBacktraced$fSnocBacktracedBacktracedtyty'$fConsBacktracedBacktracedtyty'$fEqBacktraced$fOrdBacktraced$fShowBacktraced$fReadBacktraced$fGenericBacktraced$fFunctorBacktraced$fFoldableBacktraced$fTraversableBacktracedMessageparsedsplitsByteStringAtseparatesByteStringc2w8w82cSizeHint UnknownSize KnownSize EnumerateAllFromNOnDiagNoDiag $fEqOnDiag $fEqEnumerate $fEqSizeHint upperTriVG rectangularVGstreamToVectorMtriangularNumberlinearizeUppertritoLinear fromLinearupperTripipePar pipeParBALens' splitKeepEndsplitKeepStart splitGenericreferenceByteStringTokenizer$fPrimMonadStream