!-Xi      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./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"{"|"}"~""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""##(Primitive casting+Haskell Foundation, (c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq]*Z-Data** between primitive types of the same size.*+*+%unaligned access for primitive arrays(c) Dong Han, 2017-2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqv?Z-Databig endianess wrapperBZ-Datalittle endianess wrapperEZ-Data/Primitive types which can be unaligned accessed`It can also be used as a lightweight method to peek/poke value from/to C structs when you pass  to FFI as struct pointer, e.g.  -- | note the .hsc syntax peekSocketAddrMBA :: HasCallStack => MBA## SocketAddr -> IO SocketAddr peekSocketAddrMBA p = do family <- peekMBA p (#offset struct sockaddr, sa_family) case family :: CSaFamily of (#const AF_INET) -> do addr <- peekMBA p (#offset struct sockaddr_in, sin_addr) port <- peekMBA p (#offset struct sockaddr_in, sin_port) return (SocketAddrInet (PortNumber port) addr) .... FZ-Data byte sizeGZ-DataBindex element off byte array with offset in bytes(maybe unaligned)HZ-DataBread element from byte array with offset in bytes(maybe unaligned)IZ-DataAwrite element to byte array with offset in bytes(maybe unaligned)JZ-DataIO version of I' but more convenient to write manually.KZ-DataIO version of H' but more convenient to write manually.LZ-DataBindex element off byte array with offset in bytes(maybe unaligned)MZ-DataLifted version of INZ-DataLifted version of HOZ-DataLifted version of GPZ-DataLifted version of IQZ-DataLifted version of HRZ-DataLifted version of GSZ-Data,Char's instance use 31bit wide char prim-op.?@ABCDEKJLHIGFMNOPQREKJLHIGFMNOPQRBCD?@Aunlifted primitve arrays(c) Dong Han, 2017-2020BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq Z-DataCreates a new . This function is unsafe because it initializes all elements of the array as pointers to the array itself. Attempting to read one of these elements before writing to it is in effect an unsafe coercion from the  s a to the element type.Z-DataCreates a new D with the specified value as initial contents. This is slower than  , but safer.Z-DataYields the length of an .Z-DataYields the length of a .Z-Data Freezes a , yielding an . This simply marks the array as frozen in place, so it should only be used when no further modifications to the mutable array will be performed.Z-DataDetermines whether two R values are the same. This is object/pointer identity, not based on the contents.Z-Data?Copies the contents of an immutable array into a mutable array.Z-Data6Copies the contents of one mutable array into another.Z-DataFreezes a portion of a , yielding an }. This operation is safe, in that it copies the frozen portion, and the existing mutable array may still be used afterward.Z-DataThaws a portion of an  , yielding a T. This copies the thawed portion, so mutations will not affect the original array.Z-Data"Creates a copy of a portion of an Z-DataCreates a new : containing a copy of a portion of another mutable array. Z-DatasizeZ-DatasizeZ-Data initial valueZ-Data destinationZ-DataoffsetZ-DatalengthZ-Datavalue to fill withZ-Data destinationZ-Dataoffset into destinationZ-DatasourceZ-Dataoffset into sourceZ-Datanumber of elements to copyZ-Data destinationZ-Dataoffset into destinationZ-DatasourceZ-Dataoffset into sourceZ-Datanumber of elements to copyZ-DatasourceZ-DataoffsetZ-DatalengthZ-DatasourceZ-DataoffsetZ-DatalengthZ-DatasourceZ-DataoffsetZ-DatalengthZ-DatasourceZ-DataoffsetZ-DatalengthFast boxed and unboxed arrays(c) Dong Han, 2017BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqZ-DataIA typeclass to unify box & unboxed, mutable & immutable array operations.Most of these functions simply wrap their primitive counterpart, if there's no primitive ones, we polyfilled using other operations to get the same semantics.One exception is that " only perform closure resizing on ) because current RTS support only that, % will do nothing on other array type.It's reasonable to trust GHC with specializing & inlining these polymorphric functions. They are used across this package and perform identical to their monomophric counterpart.Z-Data#Mutable version of this array type.Z-Data!Make a new array with given size."For boxed array, all elements are U which shall not be accessed. For primitive array, elements are just random garbage.Z-Data3Make a new array and fill it with an initial value.Z-Data)Index mutable array in a primitive monad.Z-Data)Write mutable array in a primitive monad.Z-Data&Fill mutable array with a given value.Z-Data{Index immutable array, which is a pure operation. This operation often result in an indexing thunk for lifted arrays, use  'indexArr\'' or  if that's not desired.Z-DatapIndex immutable array, pattern match on the unboxed unit tuple to force indexing (without forcing the element).Z-DataIndex immutable array in a primitive monad, this helps in situations that you want your indexing result is not a thunk referencing whole array.Z-DataBSafely freeze mutable array by make a immutable copy of its slice.Z-Data@Safely thaw immutable array by make a mutable copy of its slice.Z-DataUIn place freeze a mutable array, the original mutable array can not be used anymore.Z-DataWIn place thaw a immutable array, the original immutable array can not be used anymore.Z-DataACopy a slice of immutable array to mutable array at given offset.Z-DataqCopy a slice of mutable array to mutable array at given offset. The two mutable arrays shall no be the same one.Z-DatalCopy a slice of mutable array to mutable array at given offset. The two mutable arrays may be the same one.Z-DataCreate immutable copy.Z-DataCreate mutable copy.Z-Data#Resize mutable array to given size.Z-DataShrink mutable array to given size. This operation only works on primitive arrays. For some array types, this is a no-op, e.g. sizeOfMutableArr will not change.Z-Data)Is two mutable array are reference equal.Z-DataSize of immutable array.Z-DataSize of mutable array.Z-Data4Is two immutable array are referencing the same one. Note that J 's result may change depending on compiler's optimizations, for example let arr = runST ... in arr  arr4 may return false if compiler decides to inline it.See  -https://ghc.haskell.org/trac/ghc/ticket/13908 for more background.Z-DataBottom value (throw ( "Data.Array.uninitialized")") for initialize new boxed array(&, !..).Z-Data?Yield a pointer to the array's data and do computation with it.This operation is only safe on pinned primitive arrays allocated by   or  .0Don't pass a forever loop to this function, see  -https://ghc.haskell.org/trac/ghc/ticket/14346#14346.Z-Data?Yield a pointer to the array's data and do computation with it.This operation is only safe on pinned primitive arrays allocated by   or  .0Don't pass a forever loop to this function, see  -https://ghc.haskell.org/trac/ghc/ticket/14346#14346.Z-DataCast between arraysZ-DataCast between arraysZ-DatatargetZ-Data target offsetZ-DatasourceZ-Data source offsetZ-Data source lengthZ-DatatargetZ-Data target offsetZ-DatasourceZ-Data source offsetZ-Data source lengthZ-DatatargetZ-Data target offsetZ-DatasourceZ-Data source offsetZ-Data source lengthM ! #"&%$)('*M&%$)('! #"   **Extra stuff for PrimArray related literals(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqZ-Data $[arrASCII|asdfg|] :: PrimArray Word8Z-Data*Construct data with UTF8 encoded literals.See Z-Data#Construct data with array literals  e.g. 1,2,3.Z-Data Construct   with array literals  e.g. 1,2,3. See Z-Data %[arrW8|1,2,3,4,5|] :: PrimArray Word8Z-Data Construct   with array literals  e.g. 1,2,3. See Z-Data $[arrW8|1,2,3,4,5|] :: PrimArray Int8Z-Data Construct   with array literals  e.g. 1,2,3. See Z-Data '[arrW16|1,2,3,4,5|] :: PrimArray Word16Z-Data Construct   with array literals  e.g. 1,2,3. See Z-Data &[arrI16|1,2,3,4,5|] :: PrimArray Int16Z-Data Construct   with array literals  e.g. 1,2,3. See Z-Data '[arrW32|1,2,3,4,5|] :: PrimArray Word32Z-Data Construct   with array literals  e.g. 1,2,3. See Z-Data &[arrI32|1,2,3,4,5|] :: PrimArray Int32Z-Data Construct   with array literals  e.g. 1,2,3. See Z-Data '[arrW64|1,2,3,4,5|] :: PrimArray Word64Z-Data Construct   with array literals  e.g. 1,2,3. See Z-Data &[arrI64|1,2,3,4,5|] :: PrimArray Int64Z-Data Construct   with array literals  e.g. 1,2,3. See Z-Data Construct   with array literals  e.g. 1,2,3. See Z-Data &[arrWord|1,2,3,4,5|] :: PrimArray WordZ-Data $[arrInt|1,2,3,4,5|] :: PrimArray IntZ-Data5Construction function which receive a byte length  and a   expression.Z-Data Quoter inputZ-Data Final Quoter"" (Bounded checked boxed and unboxed arrays(c) Dong Han, 2017-2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq,Z-Data.New size should be >= 0, and <= original size.Z-Data Create a pinnedW byte array of the specified size, The garbage collector is guaranteed not to move it. Z-Data Create a pinned primitive array of the specified size and respect given primitive type's alignment. The garbage collector is guaranteed not to move it.> ! #"&%$)('    >&%$)('! #"      Numeric to ASCII digits table.(c) Dong Han, 2017-2019BSDwinterland1989@gmail.com experimental non-portableNone( "#%,-.1789;=>?@AFHMPSUVXghkq9   None* "#%,-.1789;=>?@AFHMPSUVXghkqZ-Data(type class for calculating product size. (c) Dong Han 2017~2019 BSD-stylewinterland1989@gmail.com experimentalportableNone) "#%,-.1789;=>?@AFHMPSUVXghkq rZ-DataAA mutable variable in the ST monad which can hold an instance of .Z-Data Build a new Z-DataRead the value of an Z-DataWrite a new value into an Z-DataMutate the contents of an .8Unboxed reference is always strict on the value it hold. (c) Dong Han 2017~2019 BSD-stylewinterland1989@gmail.com experimentalportableNone) "#%,-.1789;=>?@AFHMPSUVXghkqZ-DataBAlias for 'PrimIORef Int' which support several atomic operations.Z-DataAA mutable variable in the IO monad which can hold an instance of .Z-Data Build a new Z-DataRead the value of an Z-DataWrite a new value into an  Z-DataMutate the contents of an IORef.8Unboxed reference is always strict on the value it hold.!Z-Data Build a new "Z-DataAtomically add a , return the value AFTER added.#Z-DataAtomically add a  , return the value BEFORE added.$Z-DataAtomically add a .%Z-DataAtomically sub a  , return the value AFTER subbed.&Z-DataAtomically sub a !, return the value BEFORE subbed.'Z-DataAtomically sub a (Z-DataAtomically and a , return the value AFTER anded.)Z-DataAtomically and a  , return the value BEFORE anded.*Z-DataAtomically and a +Z-DataAtomically nand a  , return the value AFTER nanded.,Z-DataAtomically nand a !, return the value BEFORE nanded.-Z-DataAtomically nand a .Z-DataAtomically or a , return the value AFTER ored./Z-DataAtomically or a , return the value BEFORE ored.0Z-DataAtomically or a 1Z-DataAtomically xor a , return the value AFTER xored.2Z-DataAtomically xor a  , return the value BEFORE xored.3Z-DataAtomically xor a  !"#$%&'()*+,-./0123 !#&),/2"%(+.1$'*-03$(c) Dong Han 2017~2019 BSD-stylewinterland1989@gmail.com experimentalportableNone) "#%,-.1789;=>?@AFHMPSUVXghkq#! !"#$%&'()*+,-./0123 !#&),/2"%(+.1$'*-03UTF-8 codecs and helpers.(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqN4Z-Data,Return a codepoint's encoded length in bytesRIf the codepoint is invalid, we return 3(encoded bytes length of replacement char U+FFFD).5Z-Data Encode a  into bytes, write K for invalid unicode codepoint.]This function assumed there're enough space for encoded bytes, and return the advanced index.6Z-DataThe unboxed version of 5.This function is marked as NOINLINEO to reduce code size, and stop messing up simplifier due to too much branches.7Z-Data Encode a 5 into bytes with non-standard UTF-8 encoding(Used in  Data.CBytes).'\NUL' is encoded as two bytes C0 80 , '\xD800' ~ '\xDFFF' is encoded as a three bytes normal UTF-8 codepoint. This function assumed there're enough space for encoded bytes, and return the advanced index.8Z-DataThe unboxed version of 7.9Z-Data Decode a  from bytesThis function assumed all bytes are UTF-8 encoded, and the index param point to the beginning of a codepoint, the decoded character and the advancing offset are returned.pIt's annoying to use unboxed tuple here but we really don't want allocation even if GHC can't optimize it away.;Z-DataThe unboxed version of 9This function is marked as NOINLINEO to reduce code size, and stop messing up simplifier due to too much branches.<Z-Data$Decode a codepoint's length in bytesnThis function assumed all bytes are UTF-8 encoded, and the index param point to the beginning of a codepoint.=Z-DataThe unboxed version of <This function is marked as NOINLINEO to reduce code size, and stop messing up simplifier due to too much branches.>Z-Data Decode a  from bytes in rerverse order.This function assumed all bytes are UTF-8 encoded, and the index param point to the end of a codepoint, the decoded character and the backward advancing offset are returned.@Z-DataThe unboxed version of >This function is marked as NOINLINEO to reduce code size, and stop messing up simplifier due to too much branches.AZ-Data6Decode a codepoint's length in bytes in reverse order.hThis function assumed all bytes are UTF-8 encoded, and the index param point to the end of a codepoint.BZ-DataThe unboxed version of AThis function is marked as NOINLINEO to reduce code size, and stop messing up simplifier due to too much branches.IZ-DataZUnrolled copy loop for copying a utf8-encoded codepoint from source array to target array.JZ-DataZUnrolled copy loop for copying a utf8-encoded codepoint from source array to target array.KZ-DataxFFFD, which will be encoded as 0xEF 0xBF 0xBD 3 bytes.456789:;<=>?@ABCDEFGHIJK456789:;<=>?@ABCDEFGHIJKErrno provided by libuv(c) Winterland, 2017-2018BSDdrkoster@qq.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq[LZ-DataUnicode categories.See %-, you can combine categories with bitwise or.RZ-Data*These are the Unicode Normalization Forms: Form | Description ---------------------------- | --------------------------------------------- Normalization Form D (NFD) | Canonical decomposition Normalization Form C (NFC) | Canonical decomposition, followed by canonical composition Normalization Form KD (NFKD) | Compatibility decomposition Normalization Form KC (NFKC) | Compatibility decomposition, followed by canonical composition WZ-DataLocale for case mapping.YZ-DataGet environment localeELMNQPORVUTSWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~EWXYRVUTSNQPOLM~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZFast boxed and unboxed vector;(c) Dong Han, 2017-2019 (c) Tao He, 2018-2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqnGZ-Data$All exception can be throw by using .Z-DataIPair type to help GHC unpack in some loops, useful when write fast folds.Z-Data! is just primitive word8 vectors.Z-DataPrimitive vectorZ-Data Boxed vectorZ-DataKTypeclass for box and unboxed vectors, which are created by slicing arrays.Instead of providing a generalized vector with polymorphric array field, we use this typeclass so that instances use concrete array type can unpack their array payload.Vector types, e.g. ,&... are obivious instances, with O(1)  and G, which convert slices to (array, offset, length) tuple back and forth.6Array types can also be instances of this class, e.g. &, ..., in this case 9 will always return offset 0 and whole array length, and  is O(n) .Z-DataVector's immutable array typeZ-Data7Get underline array and slice range(offset and length).Z-Data<Create a vector by slicing an array(with offset and length).Z-DataGA pattern synonyms for matching the underline array, offset and length.~This is a bidirectional pattern synonyms, but very unsafe if not use properly. Make sure your slice is within array's bounds!Z-DataO(1) Index array element.Return  if index is out of bounds.Z-DataO(n), pack an ASCII #, multi-bytes char WILL BE CHOPPED!Z-DataConversion between  and . Should compile to a no-op.Z-DataUnsafe conversion between  and <. This is a no-op and silently truncates to 8 bits Chars > '\255'=. It is provided as convenience for PrimVector construction.Z-DataCreate a vector with size N.Z-DataOCreate a vector with a initial size N array (which may not be the final array).Z-DatalCreate a vector with a initial size N array, return both the vector and the monadic result during creating.sThe result is not demanded strictly while the returned vector will be in normal form. It this is not desired, use  return $!' idiom in your initialization function.Z-DataCreate a vector with a initial size N array (which may not be the final array), return both the vector and the monadic result during creating.sThe result is not demanded strictly while the returned vector will be in normal form. It this is not desired, use  return $!' idiom in your initialization function.Z-Data(Create a vector up to a specific length.MIf the initialization function return a length larger than initial size, an  will be raised.Z-Data*Create two vector up to a specific length.MIf the initialization function return lengths larger than initial sizes, an  will be raised.Z-DataO(1). The empty vector.Z-DataO(1). Single element vector.Z-DataO(n). Copy a vector from slice.Z-DataO(n) Convert a list into a vector Alias for  .Z-DataO(n)7 Convert a list into a vector with an approximate size.kIf the list's length is large than the size given, we simply double the buffer size and continue building.This function is a  good consumer$ in the sense of build/foldr fusion.Z-DataO(n) Alias for  .Z-DataO(n)  in reverse order.This function is a  good consumer$ in the sense of build/foldr fusion.Z-DataO(n) Convert vector to a list.dUnpacking is done lazily. i.e. we will retain reference to the array until all element are consumed.This function is a  good producer$ in the sense of build/foldr fusion.Z-DataO(n)+ Convert vector to a list in reverse order.This function is a  good producer$ in the sense of build/foldr fusion.Z-DataO(1) The length of a vector.Z-DataO(1) Test whether a vector is empty.Z-DataO(m+n)lThere's no need to guard empty vector because we guard them for you, so appending empty vectors are no-ops.Z-DataEMapping between vectors (possiblely with two different vector types).1NOTE, the result vector contain thunks in lifted  case, use  if that's not desired.For ,  and  are same, since s never store thunks.Z-DataEMapping between vectors (possiblely with two different vector types)..This is the strict version map. Note that the  instance of lifted  is defined with 6 to statisfy laws, which this strict version breaks (3map' id arrayContainsBottom /= arrayContainsBottom ).Z-DataStrict mapping with index.Z-DataStrict left to right fold.Z-Data%Strict left to right fold with index.Z-DataCStrict left to right fold using first element as the initial value.Throw  if vector is empty.Z-DataNStrict left to right fold using first element as the initial value. return  when vector is empty.Z-DataStrict right to left foldZ-Data$Strict right to left fold with index1NOTE: the index is counting from 0, not backwardsZ-DataBStrict right to left fold using last element as the initial value.Throw  if vector is empty.Z-DataMStrict right to left fold using last element as the initial value, return  when vector is empty.Z-DataO(n) Concatenate a list of vector.Note: c have to force the entire list to filter out empty vector and calculate the length for allocation.Z-Data8Map a function over a vector and concatenate the resultsZ-DataO(n) ( returns the maximum value from a vectorIt's defined with , an : exception will be thrown in the case of an empty vector.Z-DataO(n) 4 returns the maximum value from a vector, return  in the case of an empty vector.Z-DataO(n) " returns the minimum value from a vectorAn 9 exception will be thrown in the case of an empty vector.Z-DataO(n) 4 returns the minimum value from a vector, return  in the case of an empty vector.Z-DataO(n) ( returns the product value from a vectorZ-DataO(n) ( returns the product value from a vectoraThis function will shortcut on zero. Note this behavior change the semantics for lifted vector: 3product [1,0,undefined] /= product' [1,0,undefined].Z-DataO(n)& Applied to a predicate and a vector, A determines if any elements of the vector satisfy the predicate.Z-DataO(n)& Applied to a predicate and a vector, A determines if all elements of the vector satisfy the predicate.Z-DataO(n)  returns the sum value from a vectorZ-DataO(n) $ returns count of an element from a vectorZ-DataThe ( function behaves like a combination of  and foldl; it applies a function to each element of a vector, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new list.rNote, this function will only force the result tuple, not the elements inside, to prevent creating thunks during , 4 your accumulator and result with the result tuple.Z-DataThe ( function behaves like a combination of  and foldr; it applies a function to each element of a vector, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new vector."The same strictness property with  applys to  too.Z-DataO(n)  n x is a vector of length n with x the value of every element.Note: 1 will not force the element in boxed vector case.Z-DataO(n*m)  a vector n times.Z-DataO(n), where n# is the length of the result. The 0 function is analogous to the List 'unfoldr'. Q builds a vector from a seed value. The function takes the element and returns 0 if it is done producing the vector or returns  (a,b), in which case, a& is the next byte in the string, and b* is the seed value for further production. Examples: [ unfoldr (\x -> if x <= 5 then Just (x, x + 1) else Nothing) 0 == pack [0, 1, 2, 3, 4, 5]Z-DataO(n) Like , m builds a vector from a seed value. However, the length of the result is limited by the first argument to (. This function is more efficient than 1 when the maximum length of the result is known.The following equation relates  and : ,fst (unfoldrN n f s) == take n (unfoldr f s)Z-DataO(n) * test if given element is in given vector.Z-DataO(n) 'not . elem'Z-DataO(n) The o function returns the index of the first element in the given vector which is equal to the query element, or  if there is no such element.Z-DataO(n) Special  for  using  memchr(3)On most platforms  memchr(3)W is a highly optimized byte searching function, thus we make a special binding for it.A rewrite rule elemIndex = elemIndexBytes is also included.Z-DataUnlike . instance, this mapping evaluate value inside  strictly.Z-Data.The chunk size used for I/O. Currently set to 32k-chunkOverheadZ-Data-The recommended chunk size. Currently set to 4k - chunkOverhead.Z-DataEThe memory management overhead. Currently this is tuned for GHC only.Z-DatadefaultInitSize = 30<, used as initialize size when packing list of unknown size.Z-DataCast between vectorsZ-DatapayloadZ-Data1offset in elements of type a rather than in bytesZ-Data1length in elements of type a rather than in bytesZ-DatapayloadZ-DataoffsetZ-DatalengthZ-Datalength in elements of type aZ-Datainitialization functionZ-Datalength in elements of type aZ-Data_initialization function return a result size and array the result must start from index 0Z-Datainitialization functionZ-Datainitialization functionZ-Datalength's upper boundZ-Data6initialization function which return the actual lengthZZ!vectors literals using QuasiQuote(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqo &'()*+,-./0 &'()*+,-./0Searching vectors(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqEw1Z-DataO(n) The 1 function extends [, by returning the indices of all elements equal to the query element, in ascending order.2Z-DataThe 4} function takes a predicate and a vector and returns the index of the first element in the vector satisfying the predicate.3Z-DataO(n) Special 1 for  using  memchr(3)4Z-Data findIndex f v = fst (find f v)5Z-Data  findIndexR f v = fst (findR f v)6Z-DataO(n) find the first index and element matching the predicate in a vector from left to right, if there isn't one, return (length of the vector, Nothing).7Z-DataO(n) Special 7 for  using  memchr(3)8Z-DataO(n) find the first index and element matching the predicate in a vector from right to left, if there isn't one, return '(-1, Nothing)'.9Z-DataO(n) Special 8 for  with handle roll bit twiddling.:Z-DataO(n) :o, applied to a predicate and a vector, returns a vector containing those elements that satisfy the predicate.;Z-DataO(n) The ; function takes a predicate, a vector, returns a pair of vector with elements which do and do not satisfy the predicate, respectively; i.e., 4partition p vs == (filter p vs, filter (not . p) vs)<Z-DataO(n+m); Find the offsets of all indices (possibly overlapping) of needle within haystack using KMP algorithm.6The KMP algorithm need pre-calculate a shift table in O(m)4 time and space, the worst case time complexity is O(n+m)R. Partial apply this function to reuse pre-calculated table between same needles.Chunked input are support via partial match argument, if set we will return an extra negative index in case of partial match at the end of input chunk, e.g. AindicesOverlapping [ascii|ada|] [ascii|adadad|] True == [0,2,-2]Where -2) is the length of the partial match part ad 's negation.WIf an empty pattern is supplied, we will return every possible index of haystack, e.g. %indicesOverlapping "" "abc" = [0,1,2] References:ZKnuth, Donald; Morris, James H.; Pratt, Vaughan: "Fast pattern matching in strings" (1977) @http://www-igm.univ-mlv.fr/~lecroq/string/node8.html#SECTION0080=Z-DataO(n/m); Find the offsets of all indices (possibly overlapping) of needle within haystackH using KMP algorithm, combined with simplified sunday's rule to obtain O(n/m) complexity in average use case.9The hybrid algorithm need pre-calculate a shift table in O(m)6 time and space, and a bad character bloom filter in O(m) time and O(1)+ space, the worst case time complexity is O(n+m). References:nFrantisek FranekChristopher G. JenningsWilliam F. Smyth A Simple Fast Hybrid Pattern-Matching Algorithm (2005)fD. M. Sunday: A Very Fast Substring Search Algorithm. Communications of the ACM, 33, 8, 132-142 (1990)%F. Lundh: The Fast Search Algorithm.  $http://effbot.org/zone/stringlib.htm (2006)>Z-DataO(n+m)4 Find the offsets of all non-overlapping indices of needle within haystack using KMP algorithm.WIf an empty pattern is supplied, we will return every possible index of haystack, e.g. %indicesOverlapping "" "abc" = [0,1,2]?Z-DataO(n/m)4 Find the offsets of all non-overlapping indices of needle within haystackH using KMP algorithm, combined with simplified sunday's rule to obtain O(m/n) complexity in average use case.@Z-DataO(m)$ Calculate the KMP next shift table./The shifting rules is: when a mismatch between  needle[j] and  haystack[i] is found, check if  next[j] == -1", if so next search continue with  needle[0] and  haystack[i+1], otherwise continue with needle[next[j]] and  haystack[i].AZ-DataO(m)> Calculate a simple bloom filter for simplified sunday's rule./The shifting rules is: when a mismatch between  needle[j] and  haystack[i] is found, check if %elemSundayBloom bloom haystack[i+n-j]Z, where n is the length of needle, if not then next search can be safely continued with haystack[i+n-j+1] and  needle[0]-, otherwise next searh should continue with  haystack[i] and  needle[0]2, or fallback to other shifting rules such as KMP.*The algorithm is very simple: for a given  w, we set the bloom's bit at unsafeShiftL 0x01 (w .&. 0x3f), so there're three false positives per bit. This's particularly suitable for search UTF-8 bytes since the significant bits of a beginning byte is usually the same.BZ-Data.O(1) Test if a bloom filter contain a certain .<Z-Datavector to search for (needle)Z-Datavector to search in (haystack)Z-Data+report partial match at the end of haystack=Z-Databytes to search for (needle)Z-Databytes to search in (haystack)Z-Data+report partial match at the end of haystack?Z-Databytes to search for (needle)Z-Databytes to search in (haystack)Z-Data+report partial match at the end of haystack123456789:;<=>?@AB216845:;<>379=?@ABFast vector slice manipulation(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqЛCCZ-DataO(n) C[ is analogous to (:) for lists, but of different complexity, as it requires making a copy.DZ-DataO(n)% Append a byte to the end of a vectorEZ-DataO(1)/ Extract the head and tail of a vector, return  if it is empty.FZ-DataO(1)/ Extract the init and last of a vector, return  if vector is empty.GZ-DataO(1)' Extract the first element of a vector.HZ-DataO(1)1 Extract the elements after the head of a vector.NOTE: H4 return empty vector in the case of an empty vector.IZ-DataO(1)& Extract the last element of a vector.JZ-DataO(1)- Extract the elements before of the last one.NOTE: J4 return empty vector in the case of an empty vector.KZ-DataO(n)> Return all initial segments of the given vector, empty first.LZ-DataO(n)C Return all final segments of the given vector, whole vector first.MZ-DataO(1) M n, applied to a vector xs, returns the prefix of xs of length n, or xs itself if n >  xs.NZ-DataO(1) N n, applied to a vector xs, returns the suffix of xs of length n, or xs itself if n >  xs.OZ-DataO(1) O n xs returns the suffix of xs after the first n elements, or [] if n >  xs.PZ-DataO(1) P n xs returns the prefix of xs before the last n elements, or [] if n >  xs.QZ-DataO(1)= Extract a sub-range vector with give start index and length.,This function is a total function just like  'take/drop'3, index/length exceeds range will be ingored, e.g. nslice 1 3 "hello" == "ell" slice -1 -1 "hello" == "" slice -2 2 "hello" == "" slice 2 10 "hello" == "llo" This holds for all x y: &slice x y vs == drop x . take (x+y) vsRZ-DataO(1) R n xs is equivalent to (M n xs, O n xs).SZ-DataO(n) Applied to a predicate p and a vector vs2, returns the longest prefix (possibly empty) of vs of elements that satisfy p.TZ-DataO(n) Applied to a predicate p and a vector vs2, returns the longest suffix (possibly empty) of vs of elements that satisfy p.UZ-DataO(n) Applied to a predicate p and a vector vs7, returns the suffix (possibly empty) remaining after S p vs.VZ-DataO(n) Applied to a predicate p and a vector vs8, returns the prefix (possibly empty) remaining before T p vs.WZ-DataO(n) )dropAround f = dropWhile f . dropWhileR fXZ-DataO(n)u Split the vector into the longest prefix of elements that do not satisfy the predicate and the rest without copying. break (==x) will be rewritten using a memchr.YZ-DataO(n)n Split the vector into the longest prefix of elements that satisfy the predicate and the rest without copying. span (/=x) will be rewritten using a memchr.ZZ-DataZ behaves like X but from the end of the vector. breakR p == spanR (not.p)[Z-Data[ behaves like Y but from the end of the vector.\Z-DataBreak a vector on a subvector, returning a pair of the part of the vector prior to the match, and the rest of the vector, e.g. 1break "wor" "hello, world" = ("hello, ", "world")_Z-DataO(n) The _( function takes two vectors and returns J the remainder of the second iff the first is its prefix, and otherwise .`Z-DataThe isPrefix function returns 1 if the first argument is a prefix of the second.aZ-DataO(n) Find the longest non-empty common prefix of two strings and return it, along with the suffixes of each string at which they no longer match. e.g.commonPrefix "foobar" "fooquux"("foo","bar","quux")commonPrefix "veeble" "fetzer"("","veeble","fetzer")bZ-Data O(n) The b| function takes two vectors and returns Just the remainder of the second iff the first is its suffix, and otherwise Nothing.cZ-DataO(n) The c( function takes two vectors and returns ) if the first is a suffix of the second.dZ-Data3Check whether one vector is a subvector of another.needle d< haystack === null haystack || indices needle haystake /= [].eZ-DataO(n)] Break a vector into pieces separated by the delimiter element consuming the delimiter. I.e. ~split '\n' "a\nb\nd\ne" == ["a","b","d","e"] split 'a' "aXaXaXa" == ["","X","X","X",""] split 'x' "x" == ["",""]and 9intercalate [c] . split c == id split == splitWith . (==)?NOTE, this function behavior different with bytestring's. see  /https://github.com/haskell/bytestring/issues/56#56.fZ-DataO(m+n)0 Break haystack into pieces separated by needle.JNote: An empty needle will essentially split haystack element by element. Examples:!splitOn "\r\n" "a\r\nb\r\nd\r\ne"["a","b","d","e"] splitOn "aaa" "aaaXaaaXaaaXaaa"["","X","X","X",""]splitOn "x" "x"["",""]and Xintercalate s . splitOn s == id splitOn (singleton c) == split (==c)gZ-DataO(n) Splits a vector into components delimited by separators, where the predicate returns True for a separator element. The resulting components do not contain the separators. Two adjacent separators result in an empty component in the output. eg. VsplitWith (=='a') "aabbaca" == ["","","bb","c",""] splitWith (=='a') [] == [""]?NOTE, this function behavior different with bytestring's. see  /https://github.com/haskell/bytestring/issues/56#56.hZ-DataO(n) Breaks a 3 up into a list of words, delimited by ascii space.iZ-DataO(n) Breaks a - up into a list of lines, delimited by ascii n.jZ-DataO(n) Joins words with ascii space.kZ-DataO(n) Joins lines with ascii n.'NOTE: This functions is different from &', it DOES NOT add a trailing n.lZ-DataHAdd padding to the left so that the whole vector's length is at least n.mZ-DataIAdd padding to the right so that the whole vector's length is at least n.nZ-DataO(n) n vs% efficiently returns the elements of xs in reverse order.oZ-DataO(n) The o function takes an element and a vector and `intersperses' that element between the elements of the vector. It is analogous to the intersperse function on Lists.pZ-DataO(n) The p function takes a vector and a list of vectors and concatenates the list after interspersing the first argument between each element of the list.Note: p# will force the entire vector list.qZ-DataO(n)1 An efficient way to join vector with an element.rZ-DataThe rB function transposes the rows and columns of its vector argument.sZ-Datas( zip two vector with a zipping function. For example,  (+)l is applied to two vector to produce a vector of corresponding sums, the result will be evaluated strictly.tZ-Datat4 disassemble a vector with a disassembling function,4The results inside tuple will be evaluated strictly.uZ-Datau is similar to foldlA, but returns a list of successive reduced values from the left. Ascanl' f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...] Note that -lastM (scanl' f z xs) == Just (foldl f z xs).vZ-Data 'scanl1\'' is a variant of % that has no starting value argument. Bscanl1' f [x1, x2, ...] == [x1, x1 `f` x2, ...] scanl1' f [] == []wZ-Data+scanr' is the right-to-left dual of scanl'.xZ-Datax is a variant of % that has no starting value argument.yZ-Datax' = rangeCut x min max limit x' 's range to min ~ max.zZ-DataO(1)' Extract the first element of a vector.Throw  if vector is empty.{Z-DataO(1)1 Extract the elements after the head of a vector.Throw  if vector is empty.|Z-DataO(1)- Extract the elements before of the last one.Throw  if vector is empty.}Z-DataO(1)& Extract the last element of a vector.Throw  if vector is empty.~Z-DataO(1) Index array element.Throw  if index outside of the vector.Z-DataO(1) Index array element.Throw  if index outside of the vector.Z-DataO(1)' Extract the first element of a vector.BMake sure vector is non-empty, otherwise segmentation fault await!Z-DataO(1)1 Extract the elements after the head of a vector.BMake sure vector is non-empty, otherwise segmentation fault await!Z-DataO(1)- Extract the elements before of the last one.BMake sure vector is non-empty, otherwise segmentation fault await!Z-DataO(1)& Extract the last element of a vector.BMake sure vector is non-empty, otherwise segmentation fault await!Z-DataO(1) Index array element.@Make sure index is in bound, otherwise segmentation fault await!Z-DataO(1) Index array element.@Make sure index is in bound, otherwise segmentation fault await!Z-DataO(1) M n, applied to a vector xs, returns the prefix of xs of length n.PMake sure n is smaller than vector's length, otherwise segmentation fault await!Z-DataO(1) O n xs returns the suffix of xs after the first n elements.PMake sure n is smaller than vector's length, otherwise segmentation fault await!QZ-Dataslice beginning indexZ-Data slice length_Z-Datathe prefix to be tested`Z-Datathe prefix to be testedECDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ECDEFGHIJKLMONPQRSTUVWXYZ[\]^_begf`cdahijklmnopqrstuvwxyz{|}~Unicode text processing(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq7Z-Data#first payload is invalid char indexZ-Data represented as UTF-8 encoded Z-DataExtract UTF-8 encoded  from Z-DataO(n) Get the nth codepoint from , throw  when out of bound.Z-DataO(n) Get the nth codepoint from .Z-DataO(n)P Find the nth codepoint's byte index (pointing to the nth char's begining byte).The index is only meaningful to the whole byte slice, if there's less than n codepoints, the index will point to next byte after the end.Z-DataO(n) Get the nth codepoint from  counting from the end, throw !IndexOutOfVectorRange n callStack when out of bound.Z-DataO(n) Get the nth codepoint from  counting from the end.Z-DataO(n)a Find the nth codepoint's byte index from the end (pointing to the previous char's ending byte).The index is only meaningful to the whole byte slice, if there's less than n codepoints, the index will point to previous byte before the start.Z-DataO(n)/ Validate a sequence of bytes is UTF-8 encoded.Throw  in case of invalid codepoint.Z-DataO(n)/ Validate a sequence of bytes is UTF-8 encoded.Return  in case of invalid codepoint.Z-DataO(n); Validate a sequence of bytes is all ascii char byte(<128).Throw 0 in case of invalid byte, It's not faster than ?, use it only if you want to validate if a ASCII char sequence.Z-DataO(n); Validate a sequence of bytes is all ascii char byte(<128).Return  in case of invalid byte.Z-DataO(n) Convert a string into a text Alias for  defaultInitSize,, will be rewritten to a memcpy if possible.Z-DataO(n)O Convert a list into a text with an approximate size(in bytes, not codepoints).sIf the encoded bytes length is larger than the size given, we simply double the buffer size and continue building.This function is a  good consumer$ in the sense of build/foldr fusion.Z-DataO(n) Alias for  defaultInitSize.Z-DataO(n)  in reverse order.This function is a  good consumer$ in the sense of build/foldr fusion.Z-DataO(n) Convert text to a char list.dUnpacking is done lazily. i.e. we will retain reference to the array until all element are consumed.This function is a  good producer$ in the sense of build/foldr fusion.Z-DataO(n)) Convert text to a list in reverse order.This function is a  good producer$ in the sense of build/foldr fusion.Z-DataO(1). Single char text.Z-DataO(1) . Empty text.Z-DataO(n). Copy a text from slice.Z-DataO(m+n)iThere's no need to guard empty vector because we guard them for you, so appending empty text are no-ops.Z-DataO(1) Test whether a text is empty.Z-DataO(n) The char length of a text.Z-DataO(n) map f t is the  obtained by applying f to each char of t0. Performs replacement on invalid scalar values.Z-DataStrict mapping with index.Z-DataStrict left to right fold.Z-Data%Strict left to right fold with index.Z-DataStrict right to left foldZ-Data$Strict right to left fold with index1NOTE: the index is counting from 0, not backwardsZ-DataO(n) Concatenate a list of text.Note: a have to force the entire list to filter out empty text and calculate the length for allocation.Z-Data6Map a function over a text and concatenate the resultsZ-DataO(n) ) returns count of an element from a text.Z-DataO(n)$ Applied to a predicate and a text, < determines if any chars of the text satisfy the predicate.Z-DataO(n)" Applied to a predicate and text, < determines if all chars of the text satisfy the predicate.Z-DataO(n)  char n time.Z-DataO(n*m)  a text n times.Z-DataO(n) convert from a char vector.Z-DataO(n) convert to a char vector.Z-Data>Check if a string is stable in the NFC (Normalization Form C).Z-DataHCheck if a string is stable in the specified Unicode Normalization Form.This function can be used as a preprocessing step, before attempting to normalize a string. Normalization is a very expensive process, it is often cheaper to first determine if the string is unstable in the requested normalization form.The result of the check will be YES if the string is stable and MAYBE or NO if it is unstable. If the result is MAYBE, the string does not necessarily have to be normalized.$For more information, please review  $http://www.unicode.org/reports/tr15/8Unicode Standard Annex #15 - Unicode Normalization Forms.Z-Data1Normalize a string to NFC (Normalization Form C).Z-Data?Normalize a string to the specified Unicode Normalization Form.gThe Unicode standard defines two standards for equivalence between characters: canonical and compatibility equivalence. Canonically equivalent characters and sequence represent the same abstract character and must be rendered with the same appearance and behavior. Compatibility equivalent characters have a weaker equivalence and may be rendered differently.Unicode Normalization Forms are formally defined standards that can be used to test whether any two strings of characters are equivalent to each other. This equivalence may be canonical or compatibility.The algorithm puts all combining marks into a specified order and uses the rules for decomposition and composition to transform the string into one of four Unicode Normalization Forms. A binary comparison can then be used to determine equivalence.Z-DataDRemove case distinction from UTF-8 encoded text with default locale.Z-Data0Remove case distinction from UTF-8 encoded text.Case folding is the process of eliminating differences between code points concerning case mapping. It is most commonly used for comparing strings in a case-insensitive manner. Conversion is fully compliant with the Unicode 7.0 standard.$Although similar to lowercasing text, there are significant differences. For one, case folding does _not_ take locale into account when converting. In some cases, case folding can be up to 20% faster than lowercasing the same text, but the result cannot be treated as correct lowercased text.Only two locale-specific exception are made when case folding text. In Turkish, U+0049 LATIN CAPITAL LETTER I maps to U+0131 LATIN SMALL LETTER DOTLESS I and U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE maps to U+0069 LATIN SMALL LETTER I.Although most code points can be case folded without changing length, there are notable exceptions. For example, U+0130 (LATIN CAPITAL LETTER I WITH DOT ABOVE) maps to "U+0069 U+0307" (LATIN SMALL LETTER I and COMBINING DOT ABOVE) when converted to lowercase.Only a handful of scripts make a distinction between upper- and lowercase. In addition to modern scripts, such as Latin, Greek, Armenian and Cyrillic, a few historic or archaic scripts have case. The vast majority of scripts do not have case distinctions.Z-Data<Convert UTF-8 encoded text to lowercase with default locale.Z-Data(Convert UTF-8 encoded text to lowercase.This function allows conversion of UTF-8 encoded strings to lowercase without first changing the encoding to UTF-32. Conversion is fully compliant with the Unicode 7.0 standard. Although most code points can be converted to lowercase with changing length, there are notable exceptions. For example, U+0130 (LATIN CAPITAL LETTER I WITH DOT ABOVE) maps to "U+0069 U+0307" (LATIN SMALL LETTER I and COMBINING DOT ABOVE) when converted to lowercase.Only a handful of scripts make a distinction between upper- and lowercase. In addition to modern scripts, such as Latin, Greek, Armenian and Cyrillic, a few historic or archaic scripts have case. The vast majority of scripts do not have case distinctions.)Case mapping is not reversible. That is, *toUpper(toLower(x)) != toLower(toUpper(x)).Certain code points (or combinations of code points) apply rules based on the locale. For more information about these exceptional code points, please refer to the Unicode standard: ftp:/ftp.unicode.orgPublicUNIDATASpecialCasing.txtZ-Data<Convert UTF-8 encoded text to uppercase with default locale.Z-Data(Convert UTF-8 encoded text to uppercase.<Conversion is fully compliant with the Unicode 7.0 standard.Although most code points can be converted without changing length, there are notable exceptions. For example, U+00DF (LATIN SMALL LETTER SHARP S) maps to "U+0053 U+0053" (LATIN CAPITAL LETTER S and LATIN CAPITAL LETTER S) when converted to uppercase.Only a handful of scripts make a distinction between upper and lowercase. In addition to modern scripts, such as Latin, Greek, Armenian and Cyrillic, a few historic or archaic scripts have case. The vast majority of scripts do not have case distinctions.)Case mapping is not reversible. That is, *toUpper(toLower(x)) != toLower(toUpper(x)).Certain code points (or combinations of code points) apply rules based on the locale. For more information about these exceptional code points, please refer to the Unicode standard: ftp:/ftp.unicode.orgPublicUNIDATASpecialCasing.txtZ-Data<Convert UTF-8 encoded text to titlecase with default locale.Z-Data(Convert UTF-8 encoded text to titlecase.This function allows conversion of UTF-8 encoded strings to titlecase. Conversion is fully compliant with the Unicode 7.0 standard.NTitlecase requires a bit more explanation than uppercase and lowercase, because it is not a common text transformation. Titlecase uses uppercase for the first letter of each word and lowercase for the rest. Words are defined as "collections of code points with general category Lu, Ll, Lt, Lm or Lo according to the Unicode database".Effectively, any type of punctuation can break up a word, even if this is not grammatically valid. This happens because the titlecasing algorithm does not and cannot take grammar rules into account. 5Text | Titlecase -------------------------------------|------------------------------------- The running man | The Running Man NATO Alliance | Nato Alliance You're amazing at building libraries | You'Re Amazing At Building Libraries Although most code points can be converted to titlecase without changing length, there are notable exceptions. For example, U+00DF (LATIN SMALL LETTER SHARP S) maps to "U+0053 U+0073" (LATIN CAPITAL LETTER S and LATIN SMALL LETTER S) when converted to titlecase.Certain code points (or combinations of code points) apply rules based on the locale. For more information about these exceptional code points, please refer to the Unicode standard: ftp:/ftp.unicode.orgPublicUNIDATASpecialCasing.txtZ-DataJCheck if the input string conforms to the category specified by the flags.This function can be used to check if the code points in a string are part of a category. Valid flags are members of the "list of categories". The category for a code point is defined as part of the entry in UnicodeData.txt, the data file for the Unicode code point database.sBy default, the function will treat grapheme clusters as a single code point. This means that the following string: NCode point | Canonical combining class | General category | Name ---------- | ------------------------- | --------------------- | ---------------------- U+0045 | 0 | Lu (Uppercase letter) | LATIN CAPITAL LETTER E U+0300 | 230 | Mn (Non-spacing mark) | COMBINING GRAVE ACCENT Will match with  in its entirety, because the COMBINING GRAVE ACCENT is treated as part of the grapheme cluster. This is useful when e.g. creating a text parser, because you do not have to normalize the text first.+If this is undesired behavior, specify the f flag.GIn order to maintain backwards compatibility with POSIX functions like isdigit and isspace , compatibility flags have been provided. Note, however, that the result is only guaranteed to be correct for code points in the Basic Latin range, between U+0000 and 0+007F. Combining a compatibility flag with a regular category flag will result in undefined behavior.Z-DataoTry to match as many code points with the matching category flags as possible and return the prefix and suffix.Z-Data%The escaping rules is different from  's 3 instance, see "Z.Data.Text.Builder.escapeTextJSON"L~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZNOPQRSTUVWYǶNOPQRSTUVWYL~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[Z~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZSearching text(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq,Z-DataO(n) find the first char matching the predicate in a text from left to right, if there isn't one, return the index point to the end of the byte slice.Z-DataO(n) find the first char matching the predicate in a text from right to left, if there isn't one, return the index point to the start of the byte slice.Z-DataO(n)" find the index of the byte slice.Z-DataO(n)3 find the index of the byte slice in reverse order.Z-DataO(n) h, applied to a predicate and a text, returns a text containing those chars that satisfy the predicate.Z-DataO(n) The  function takes a predicate, a text, returns a pair of text with codepoints which do and do not satisfy the predicate, respectively; i.e., 7partition p txt == (filter p txt, filter (not . p) txt)Z-DataO(n) % test if given char is in given text.Z-DataO(n)  not . elemZ-Data0(char index, byte index in slice, matching char)Z-DataD(char index(counting backwards), byte index in slice, matching char)  Fast text slice manipulation(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq4Z-DataO(n) [ is analogous to (:) for lists, but of different complexity, as it requires making a copy.Z-DataO(n)$ Append a char to the end of a text.Z-DataO(1)- Extract the head and tail of a text, return  if it is empty.Z-DataO(1)- Extract the init and last of a text, return  if text is empty.Z-DataO(1)" Extract the first char of a text.Throw  if text is empty.Z-DataO(1), Extract the chars after the head of a text.Throw  if text is empty.Z-DataO(1)! Extract the last char of a text.Throw  if text is empty.Z-DataO(1)* Extract the chars before of the last one.Throw  if text is empty.Z-DataO(1)" Extract the first char of a text.Z-DataO(1), Extract the chars after the head of a text.NOTE: 0 return empty text in the case of an empty text.Z-DataO(1)! Extract the last char of a text.Z-DataO(1)* Extract the chars before of the last one.NOTE: 0 return empty text in the case of an empty text.Z-DataO(n)< Return all initial segments of the given text, empty first.Z-DataO(n)? Return all final segments of the given text, whole text first.Z-DataO(1)  n, applied to a text xs, returns the prefix of xs of length n, or xs itself if n >  xs.Z-DataO(1)  n xs returns the suffix of xs after the first n char, or [] if n >  xs.Z-DataO(1)  n, applied to a text xs, returns the suffix of xs of length n, or xs itself if n >  xs.Z-DataO(1)  n xs returns the prefix of xs before the last n char, or [] if n >  xs.Z-DataO(1); Extract a sub-range text with give start index and length.,This function is a total function just like  'take/drop'3, index/length exceeds range will be ingored, e.g. nslice 1 3 "hello" == "ell" slice -1 -1 "hello" == "" slice -2 2 "hello" == "" slice 2 10 "hello" == "llo" This holds for all x y: &slice x y vs == drop x . take (x+y) vsZ-DataO(n)  n xs is equivalent to ( n xs,  n xs).Z-DataO(n) Applied to a predicate p and a text t2, returns the longest prefix (possibly empty) of t of elements that satisfy p.Z-DataO(n) Applied to a predicate p and a text t2, returns the longest suffix (possibly empty) of t of elements that satisfy p.Z-DataO(n) Applied to a predicate p and a text vs7, returns the suffix (possibly empty) remaining after  p vs.Z-DataO(n) Applied to a predicate p and a text vs8, returns the prefix (possibly empty) remaining before  p vs.Z-DataO(n) )dropAround f = dropWhile f . dropWhileR fZ-DataO(n)s Split the text into the longest prefix of elements that do not satisfy the predicate and the rest without copying.Z-DataO(n)l Split the text into the longest prefix of elements that satisfy the predicate and the rest without copying.Z-Data behaves like  but from the end of the text. breakR p == spanR (not.p)Z-Data behaves like  but from the end of the text.Z-DatawBreak a text on a subtext, returning a pair of the part of the text prior to the match, and the rest of the text, e.g. 1break "wor" "hello, world" = ("hello, ", "world")Z-DatavO(n+m) Find all non-overlapping instances of needle in haystack. Each element of the returned list consists of a pair::The entire string prior to the kth match (i.e. the prefix)6The kth match, followed by the remainder of the string Examples: &breakOnAll "::" "" ==> [] breakOnAll "" "abc" ==> [("a", "bc"), ("ab", "c"), ("ab c", "/")] EThe result list is lazy, search is performed when you force the list.Z-DataThe group function takes a text and returns a list of texts such that the concatenation of the result is equal to the argument. Moreover, each sublist in the result contains only equal elements. For example, group  Mississippi = [M!,"i","ss","i","ss","i","pp","i"] It is a special case of @, which allows the programmer to supply their own equality test.Z-DataThe + function is the non-overloaded version of .Z-DataO(n) The & function takes two texts and returns J the remainder of the second iff the first is its prefix, and otherwise .Z-Data O(n) The z function takes two texts and returns Just the remainder of the second iff the first is its suffix, and otherwise Nothing.Z-DataO(n)[ Break a text into pieces separated by the delimiter element consuming the delimiter. I.e. ~split '\n' "a\nb\nd\ne" == ["a","b","d","e"] split 'a' "aXaXaXa" == ["","X","X","X",""] split 'x' "x" == ["",""]and 9intercalate [c] . split c == id split == splitWith . (==)?NOTE, this function behavior different with bytestring's. see  /https://github.com/haskell/bytestring/issues/56#56.Z-DataO(n) Splits a text into components delimited by separators, where the predicate returns True for a separator char. The resulting components do not contain the separators. Two adjacent separators result in an empty component in the output. eg. VsplitWith (=='a') "aabbaca" == ["","","bb","c",""] splitWith (=='a') [] == [""]Z-DataO(m+n)0 Break haystack into pieces separated by needle.JNote: An empty needle will essentially split haystack element by element. Examples:!splitOn "\r\n" "a\r\nb\r\nd\r\ne"["a","b","d","e"] splitOn "aaa" "aaaXaaaXaaaXaaa"["","X","X","X",""]splitOn "x" "x"["",""]and Xintercalate s . splitOn s == id splitOn (singleton c) == split (==c)Z-DataThe isPrefix function returns 1 if the first argument is a prefix of the second.Z-DataO(n) The % function takes two text and returns ) if the first is a suffix of the second.Z-Data/Check whether one text is a subtext of another.needle < haystack === null haystack || indices needle haystake /= [].Z-DataO(n) Find the longest non-empty common prefix of two strings and return it, along with the suffixes of each string at which they no longer match. e.g.commonPrefix "foobar" "fooquux"("foo","bar","quux")commonPrefix "veeble" "fetzer"("","veeble","fetzer")Z-DataO(n) Breaks a Bytes5 up into a list of words, delimited by unicode space.Z-DataO(n); Breaks a text up into a list of lines, delimited by ascii n. Z-DataO(n) Joins words with ascii space. Z-DataO(n) Joins lines with ascii n.'NOTE: This functions is different from &', it DOES NOT add a trailing n. Z-DataFAdd padding to the left so that the whole text's length is at least n. Z-DataGAdd padding to the right so that the whole text's length is at least n. Z-DataO(n) The  G function takes a character and places it between the characters of a 0. Performs replacement on invalid scalar values.Z-DataO(n)$ Reverse the characters of a string.Z-DataO(n) The  function takes a  and a list of es and concatenates the list after interspersing the first argument between each element of the list.Z-DataThe @ function transposes the rows and columns of its text argument.Z-Dataneedle to search forZ-Datahaystack in which to search5     5     (Unicode text processing(c) Dong Han, 2017-2020BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqbL~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZNOPQRSTUVWY          NOPQRSTUVWYL~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[Z~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[Z Efficient deserialization/parse.(c) Dong Han, 2017-2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqk#Z-DataSimple CPSed parserqA parser takes a failure continuation, and a success one, while the success continuation is usually composed by R instance, the failure one is more like a reader part, which can be modified via !D. If you build parsers from ground, a pattern like this can be used:  xxParser = do ensureN errMsg ... -- make sure we have some bytes Parser $ kf k inp -> -- fail continuation, success continuation and input ... ... kf errMsg (if input not OK) ... k ... (if we get something useful for next parser) Z-DataType alias for error messageZ-DataA parse step consumes  and produce .Z-Data3Simple parsing result, that represent respectively:9Success: the remaining unparsed data and the parsed value:Failure: the remaining unparsed data and the error messageGPartial: that need for more input data, supply empty bytes to indicate %Z-Data version of .Z-Data-Parse the complete input, without resupplyingZ-DataDParse the complete input, without resupplying, return the rest bytesZ-DataParse an input chunkZ-Data:Finish parsing and fetch result, feed empty bytes if it's  result. Z-DatafRun a parser with an initial input string, and a monadic action that can supply more input if needed.dNote, once the monadic action return empty bytes, parsers will stop drawing more bytes (take it as %)."Z-DatavRun a parser and keep track of all the input chunks it consumes. Once it's finished, return the final result (always  or ) and all consumed chunks.#Z-DatalReturn both the result of a parse and the portion of the input that was consumed while it was being parsed.$Z-DataEnsure that there are at least n< bytes available. If not, the computation will escape with .nSince this parser is used in many other parsers, an extra error param is provide to attach custom error info.%Z-DatadTest whether all input has been consumed, i.e. there are no remaining undecoded bytes. Fail if not &.&Z-DataWTest whether all input has been consumed, i.e. there are no remaining undecoded bytes.*Z-DataA stateful scanner. The predicate consumes and transforms a state argument, and each transformed state is passed to successive invocations of the predicate on each byte of the input until one returns  or the input ends.UThis parser does not fail. It will return an empty string if the predicate returns  on the first byte of input.+Z-Data Similar to *, but working on # chunks, The predicate consumes a  chunk and transforms a state argument, and each transformed state is passed to successive invocations of the predicate on each chunk of the input until one chunk got splited to Right (V.Bytes, V.Bytes) or the input ends.,Z-Data.Match any byte, to perform lookahead. Returns ? if end of input has been reached. Does not consume any input.-Z-DatasMatch any byte, to perform lookahead. Does not consume any input, but will fail if end of input has been reached..Z-Data The parser  satisfy p0 succeeds for any byte for which the predicate p returns ,. Returns the byte that is actually parsed. @digit = satisfy isDigit where isDigit w = w >= 48 && w <= 57/Z-Data The parser satisfyWith f p3 transforms a byte, and succeeds if the predicate p returns T on the transformed value. The parser returns the transformed byte that was parsed.0Z-DataMatch a specific byte.1Z-DataMatch a specific 8bit char.2Z-Data#Match either a single newline byte '\n'3, or a carriage return followed by a newline byte "\r\n".3Z-Data3 N bytes.4Z-Data Skip a byte.5Z-Data5Skip past input for as long as the predicate returns .6Z-DataSkip over white space using 7.7Z-Data .isSpace w = w == 32 || w - 9 <= 4 || w == 0xA09Z-Data/Consume input as long as the predicate returns ; or reach the end of input, and return the consumed input.:Z-Data/Consume input as long as the predicate returns ; or reach the end of input, and return the consumed input.;Z-Data Similar to :t, but requires the predicate to succeed on at least one byte of input: it will fail if the predicate never returns  or reach the end of input<Z-Databytes s3 parses a sequence of bytes that identically match s.=Z-DataSame as < but ignoring case.>Z-Datatext s8 parses a sequence of UTF8 bytes that identically match s.- !"#$%&'()*+,-./0123456789:;<=>-! "#$%&'()*+,-./014235689:;<=>7!0Sorting vectors/(c) 2008-2011 Dan Doel, (c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqBGZ-Data Similar to  newtype for *, this newtype can inverse the order of a I instance when used in T.IZ-Data2Types contain radixs, which can be inspected with M during different K.#The default instances share a same J' 256, which seems to be a good default.JZ-Data8The size of an auxiliary array, i.e. the counting bucketKZ-Data]The number of passes necessary to sort an array of es, it equals to the key's byte number.LZ-DataNThe radix function used in the first pass, works on the least significant bit.MZ-DataMThe radix function parameterized by the current pass (0 < pass < passes e-1).NZ-DataLThe radix function used in the last pass, works on the most significant bit.OZ-Data O(n*log(n)) Sort vector based on element's  instance with classic  (https://en.wikipedia.org/wiki/Merge_sort mergesort algorithm.This is a stable sort, During sorting two O(n) worker arrays are needed, one of them will be freezed into the result vector. The merge sort only begin at tile size larger than Q , each tile will be sorted with RL, then iteratively merged into larger array, until all elements are sorted.QZ-DataThe mergesort tile size, mergeTileSize = 8.RZ-DataO(n^2) Sort vector based on element's  instance with simple  ,https://en.wikipedia.org/wiki/Insertion_sortinsertion-sort algorithm.^This is a stable sort. O(n) extra space are needed, which will be freezed into result vector.TZ-DataO(n) Sort vector based on element's I instance with  (https://en.wikipedia.org/wiki/Radix_sort radix-sort3, (Least significant digit radix sorts variation).WThis is a stable sort, one or two extra O(n) worker array are need depend on how many K shall be performed, and a Jr counting bucket are also needed. This sort algorithms performed extremly well on small byte size types such as  or , while on larger type, constant passes may render this algorithm not suitable for small vectors (turning point around 2^(2*passes)).UZ-Data7merge duplicated adjacent element, prefer left element.CUse this function on a sorted vector will have the same effects as nub.VZ-Data7Merge duplicated adjacent element, prefer left element.WZ-Data8Merge duplicated adjacent element, prefer right element.XZ-DataTMerge duplicated adjacent element, based on a equality tester and a merger function.VZ-Dataequality tester,  left right -> eq left rightWZ-Dataequality tester,  left right -> eq left rightXZ-Dataequality tester,  left right -> eq left rightZ-Data the merger,  left right -> merge left rightGHIJKLMNOPQRSTUVWXOPQRSTIJKLMNGHUVWX)Fast boxed and unboxed vector(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq&'()*+,-./01268:;<>CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxz{|}~GHIJKLMNOPQRST~CDEFGHIJz{}|KLMONPQRSTUVWXYZ[\]^_begf`cdahijklmnopqrstuvwx6821:;<>OPQRSTIJKLMNGH&'()*+,-./0Efficient serialization/format.;(c) Dong Han, 2017-2019 (c) Tao He, 2018-2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq#hZ-DataBuilder is a monad to help compose  BuilderStep . With next  BuilderStepg continuation, we can do interesting things like perform some action, or interleave the build process. Notes on  instance:  Builder ()'s  instance use r, which is different from / in that it DOES NOT PROVIDE UTF8 GUARANTEES! :NUL will be written as xC0 x80.xD800 ~ xDFFF; will be encoded in three bytes as normal UTF-8 codepoints.kZ-Data BuilderStep7 is a function that fill buffer under given conditions.lZ-DataHelper type to help ghc unpacknZ-Datan will decide how each k, proceed when previous buffer is not enough.rZ-DataVEncode string with modified UTF-8 encoding, will be rewritten to a memcpy if possible.sZ-DataTurn  into h with Modified UTF8 encoding'\NUL' is encoded as two bytes C0 80 , '\xD800' ~ '\xDFFF'4 is encoded as a three bytes normal UTF-8 codepoint.uZ-DataWrite a .vZ-DataEnsure that there are at least n many elements available.zZ-Data shortcut to { .{Z-Datarun Builder with o7 strategy, which is suitable for building short bytes.|Z-Data shortcut to } .}Z-Datarun Builder with p= strategy, which is suitable for building lazy bytes chunks.~Z-Data shortcut to  .Z-Datarun Builder with q? strategy, which is suitable for doing effects while building.Z-Data)write primitive types in host byte order.Z-Data,write primitive types with little endianess.Z-Data)write primitive types with big endianess.Z-DataTurn  into h with UTF8 encoding&Illegal codepoints will be written as Ks.<This is different from writing string literals builders via OverloadedStrings:, because string literals do not provide UTF8 guarantees.oThis function will be rewritten into a memcpy if possible, (running a fast UTF-8 validation at runtime first).Z-DataTurn  into h with UTF8 encoding&Illegal codepoints will be written as Ks.Z-DataTurn  into h with ASCII7 encodingCodepoints beyond '\x7F' will be chopped.Z-DataTurn  into h with ASCII7 encodingCodepoints beyond '\x7F' will be chopped.Z-DataTurn  into h with ASCII8 encodingCodepoints beyond '\xFF' will be chopped. Note, this encoding is NOT compatible with UTF8 encoding, i.e. bytes written by this builder may not be legal UTF8 encoding bytes.Z-DataTurn  into h with ASCII8 encodingCodepoints beyond '\xFF' will be chopped. Note, this encoding is NOT compatible with UTF8 encoding, i.e. bytes written by this builder may not be legal UTF8 encoding bytes.Z-DataWrite UTF8 encoded Text using h.GNote, if you're trying to write string literals builders, please open OverloadedStrings and use hs / instance, it will be rewritten into a memcpy.Z-Dataadd {...} to original builder.Z-Dataadd {...} to original builder.Z-Dataadd [...] to original builder.Z-Dataadd  ... to original builder.Z-Dataadd "..." to original builder.Z-Dataadd ... to original builder.Z-Datawrite an ASCII :Z-Datawrite an ASCII ,Z-Data.Use separator to connect a vector of builders.Z-Data*Use separator to connect list of builders.Z-DataQThis instance simple write literals' bytes into buffer, which is different from / in that it DOES NOT PROVIDE UTF8 GUARANTEES! :mZ-Datathe buffer contentZ-Datawriting offsetZ-Data size boundZ-Data2the writer which pure a new offset for next writeZ-Data size boundZ-Data2the writer which pure a new offset for next writeZ-Data the seperatorZ-Datavalue formatterZ-Data value vectorZ-Data the seperatorZ-Datavalue formatterZ-Data value list.hijklmnopqrstuvwxyz{|}~.nopqlmkhijtz{|}~uvwxyrsUse PrimArray with FFI(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq(Z-DataType alias for  . Describe a ; which we are going to pass across FFI. Use this type with UnliftedFFITypes< extension, At C side you should use a proper pointer type. Don't cast  to Addr#@ since the heap object offset is hard-coded in code generator: Lhttps://github.com/ghc/ghc/blob/master/compiler/GHC/StgToCmm/Foreign.hs#L5420Note [Unlifted boxed arguments to foreign calls]+USE THIS TYPE WITH UNSAFE FFI CALL ONLY. A + COULD BE MOVED BY GC DURING SAFE FFI CALL.Z-DataType alias for . Describe a ; which we are going to pass across FFI. Use this type with UnliftedFFITypesB extension, At C side you should use a proper const pointer type. Don't cast  to Addr#@ since the heap object offset is hard-coded in code generator: Mhttps://github.com/ghc/ghc/blob/master/compiler/codeGen/StgCmmForeign.hs#L520In haskell side we use type system to distinguish immutable / mutable arrays, but in C side we can't. So it's users' responsibility to make sure the array content is not mutated (a const pointer type may help).+USE THIS TYPE WITH UNSAFE FFI CALL ONLY. A + COULD BE MOVED BY GC DURING SAFE FFI CALL.Z-DataClear  with given length to zero.Z-Data.Pass primitive array to unsafe FFI as pointer.Enable UnliftedFFITypes= extension in your haskell code, use proper pointer type and  CSize/CSsize to marshall  ByteArray# and Int arguments on C side. The second 2 arguement is the element size not the bytes size.,USE THIS FUNCTION WITH UNSAFE FFI CALL ONLY.Z-DataEAllocate some bytes and pass to FFI as pointer, freeze result into a .,USE THIS FUNCTION WITH UNSAFE FFI CALL ONLY.Z-DataPass  to unsafe FFI as pointerThe  version of . The second 2 arguement is the first element offset, the third ! argument is the element length.,USE THIS FUNCTION WITH UNSAFE FFI CALL ONLY.Z-DataGAllocate a prim array and pass to FFI as pointer, freeze result into a .,USE THIS FUNCTION WITH UNSAFE FFI CALL ONLY.Z-DataEAllocate some bytes and pass to FFI as pointer, freeze result into a .,USE THIS FUNCTION WITH UNSAFE FFI CALL ONLY.Z-DataWCreate an one element primitive array and use it as a pointer to the primitive element..Return the element and the computation result.,USE THIS FUNCTION WITH UNSAFE FFI CALL ONLY.Z-Datalike  , but don't write initial value.,USE THIS FUNCTION WITH UNSAFE FFI CALL ONLY.Z-Data,Pass primitive array to safe FFI as pointer.Use proper pointer type and  CSize/CSsize to marshall Ptr a and Int arguments on C side. The memory pointed by 'Ptr a' will not moved during call. After call returned, pointer is no longer valid. The second 2 arguement is the element size not the bytes size.0Don't pass a forever loop to this function, see  -https://ghc.haskell.org/trac/ghc/ticket/14346#14346.Z-DataGAllocate a prim array and pass to FFI as pointer, freeze result into a .Z-DataPass  to safe FFI as pointerThe  version of . The w is already pointed to the first element, thus no offset is provided. After call returned, pointer is no longer valid.0Don't pass a forever loop to this function, see  -https://ghc.haskell.org/trac/ghc/ticket/14346#14346.Z-DataWCreate an one element primitive array and use it as a pointer to the primitive element.0Don't pass a forever loop to this function, see  -https://ghc.haskell.org/trac/ghc/ticket/14346#14346.Z-Datalike  , but don't write initial value.Z-DataGAllocate a prim array and pass to FFI as pointer, freeze result into a .Z-DataEAllocate some bytes and pass to FFI as pointer, freeze result into a .Z-Data Convert a 8 to a pinned one(memory won't moved by GC) if necessary.Z-Data Convert a 8 to a pinned one(memory won't moved by GC) if necessary.Z-DataZero a structure. There's no Storable or  constraint on a, type, the length should be given in bytes.Z-DataTCopy some bytes from a null terminated pointer(without copying the null terminator).You should consider using *+c type for storing NULL terminated bytes first, This method is provided if you really need to read E, there's no encoding guarantee, result could be any bytes sequence.Z-DataCopy some bytes from a pointer.BThere's no encoding guarantee, result could be any bytes sequence.Z-DataCopy some bytes from a pointer.BThere's no encoding guarantee, result could be any bytes sequence.Z-Datain bytesZ-Datanumber of elementsZ-Datanumber of bytesZ-Data in elementsZ-Data in elementsZ-Datain bytesZ-Datain bytesZ-Data in elements      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG HIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz{|}~?@ABCDEFGIHLJKMNOPQRTextual numeric builders.(c) Dong Han, 2017-2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqXZ-Data0Control the rendering of floating point numbers.Z-DataScientific notation (e.g. 2.3e123).Z-DataStandard decimal notation.Z-Data(Use decimal notation for values between 0.1 and  9,999,999$, and scientific notation otherwise.Z-DataIntegral formatting options.Z-Data0total width, only effective with padding optionsZ-Datapadding optionsZ-Datashow + when the number is positiveZ-Data *defaultIFormat = IFormat 0 NoPadding FalseZ-Data int = intWith defaultIFormatZ-Data Format a   type like Int or Word16 into decimal ASCII digits.Z-DataLInternal formatting backed by C FFI, it must be used with type smaller than .WWe use rewrite rules to rewrite most of the integral types formatting to this function.Z-DataNInternal formatting in haskell, it can be used with any bounded integral type.vOther than provide fallback for the c version, this function is also used to check the c version's formatting result.Z-Data Format a  into decimal ASCII digits.Z-Data-Count how many decimal digits an integer has.Z-DataDecimal digit to ASCII digit.Z-DataDecimal digit to ASCII char.Z-Data Hexadecimal digit to ASCII char.Z-Data+Hexadecimal digit to UPPERCASED ASCII char.Z-Data Format a   type into hex nibbles.Z-DataThe UPPERCASED version of .Z-DataDecimal encoding of an IEEE .QUsing standard decimal notation for arguments whose absolute value lies between 0.1 and  9,999,999$, and scientific notation otherwise.Z-DataDecimal encoding of an IEEE .QUsing standard decimal notation for arguments whose absolute value lies between 0.1 and  9,999,999$, and scientific notation otherwise.Z-DataAFormat single-precision float using drisu3 with dragon4 fallback.Z-DataAFormat double-precision float using drisu3 with dragon4 fallback.Z-Data!Worker function to do formatting.Z-DataDecimal encoding of a ;, note grisu only handles strictly positive finite numbers.Z-DataDecimal encoding of a ?, note grisu3_sp only handles strictly positive finite numbers.Z-DataA Builder which renders a scientific number to full precision, using standard decimal notation for arguments whose absolute value lies between 0.1 and  9,999,999%, and scientific notation otherwise.Z-DataLike  but provides rendering options.Z-Datachar*Z-DataIntZ-DataIntZ-Datachar*Z-DataIntZ-DataIntZ-Data The bufferZ-Datawriting offsetZ-Data total digitsZ-Data the valueZ-Data#Number of decimal places to render.Z-Data#Number of decimal places to render.Z-Data#Number of decimal places to render.Z-DataList of digits and exponentZ-Data#Number of decimal places to render.""UTF8 compatible builders.(c) Dong Han, 2017-2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqs(Z-DataA class similar to <, serving the purpose that quickly convert a data type to a  value.TYou can use newtype or generic deriving to implement instance of this class quickly:  {-#% LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} import GHC.Generics newtype FooInt = FooInt Int deriving (Generic) deriving anyclass ShowT > showT (FooInt 3) > "FooInt 3" newtype FooInt = FooInt Int deriving (Generic) deriving newtype ShowT > showT (FooInt 3) > "3" Z-DataNewtype wrapper for [Char] to provide textual instances.GWe didn't provide special treatment to differentiate instances between [a] and [Char] in various classes, e.g. #,.:This newtype is therefore to provide instances similar to T.Text%, in case you really need to wrap a .(Z.Data.JSON.encodeText ("abc" :: String)?> "[\"a\",\"b\",\"c\"]" -- Just like any other [a]'s instance0Z.Data.JSON.encodeText . Str $ ("abc" :: String) > "\"abc\""Z-DataRBuidlers which guarantee UTF-8 encoding, thus can be used to build text directly. Notes on # instance: It's recommended to use z instance, there's a rewrite rule to turn encoding loop into a memcpy, which is much faster (the same rule also apply to ). Different from  Builder (), TextBuilder ()'s 0 instance will give you desired UTF8 guarantees:NUL will be written directly as x00.xD800 ~ xDFFF& will be replaced by replacement char.Z-DataBuild a  using ), which provide UTF-8 encoding guarantee.Z-DataUnsafely turn a h into S, thus it's user's responsibility to ensure only UTF-8 complied bytes are written.Z-DataTurn  into  with UTF8 encoding&Illegal codepoints will be written as -.qs. This function will be rewritten into a memcpy if possible, (running a fast UTF-8 validation at runtime first).Z-DataTurn  into  with UTF8 encoding&Illegal codepoints will be written as -.s.Z-DataTurn  into  with ASCII7 encodingCodepoints beyond '\x7F' will be chopped.Z-DataTurn  into  with ASCII7 encodingCodepoints beyond '\x7F' will be chopped.Z-DataWrite UTF8 encoded  using Builder.GNote, if you're trying to write string literals builders, please open OverloadedStrings and use Builders / instance, it will be rewritten into a memcpy.Z-Data int = intWith defaultIFormatZ-Data Format a   type like Int or Word16 into decimal ascii digits.Z-Data Format a  into decimal ascii digits.Z-Data Format a   type into hex nibbles.Z-DataThe UPPERCASED version of .Z-DataDecimal encoding of an IEEE .QUsing standard decimal notation for arguments whose absolute value lies between 0.1 and  9,999,999$, and scientific notation otherwise.Z-DataAFormat single-precision float using drisu3 with dragon4 fallback.Z-DataDecimal encoding of an IEEE .QUsing standard decimal notation for arguments whose absolute value lies between 0.1 and  9,999,999$, and scientific notation otherwise.Z-DataAFormat double-precision float using drisu3 with dragon4 fallback.Z-DataA Builder which renders a scientific number to full precision, using standard decimal notation for arguments whose absolute value lies between 0.1 and  9,999,999%, and scientific notation otherwise.Z-DataLike  but provides rendering options.Z-Dataadd (...) to original builder.Z-DataHAdd "(..)" around builders when condition is met, otherwise add nothing.This is useful when defining  instances.Z-Dataadd {...} to original builder.Z-Dataadd [...] to original builder.Z-Dataadd  ... to original builder.Z-Dataadd "..." to original builder.Z-Dataadd ... to original builder.Z-Datawrite an ASCII :Z-Datawrite an ASCII ,Z-Data.Use separator to connect a vector of builders. Z-Data,Use separator to connect a list of builders. Z-DataDirectly convert data to . Z-DataDirectly convert data to h. Z-DataDirectly convert data to . Z-DataFaster  replacement.Z-DataSEscape text using JSON string escaping rules and add double quotes, escaping rules:  '\b': "\b" '\f': "\f" '\n': "\n" '\r': "\r" '\t': "\t" '"': "\"" '\': "\\" '/': "\/" other chars <= 0x1F: "\u00XX" Z-Data.Constructor without payload, convert to String,Z-Data The escaping rules is same with C instance: we reuse JSON escaping rules here, so it will be faster.DZ-DataConstructor with payloadsZ-Data#Number of decimal places to render.Z-Data#Number of decimal places to render.Z-Data#Number of decimal places to render.Z-Data the seperatorZ-Datavalue formatterZ-Data value list Z-Data the seperatorZ-Datavalue formatterZ-Data value vector8     8     Fast set based on sorted vector;(c) Dong Han, 2017-2019 (c) Tao He, 2018-2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq~Z-DatahMapping values of within a set, the result size may change if there're duplicated values after mapping.Z-DataO(1) empty flat set.Z-Data O(N*logN)5 Pack list of values, on duplication prefer left one.Z-Data O(N*logN)I Pack list of values with suggested size, on duplication prefer left one.Z-Data O(N*logN)6 Pack list of values, on duplication prefer right one.Z-Data O(N*logN)J Pack list of values with suggested size, on duplication prefer right one.Z-DataO(N)7 Unpack a set of values to a list s in ascending order.This function works with  foldr/build fusion in base.Z-DataO(N)8 Unpack a set of values to a list s in descending order.This function works with  foldr/build fusion in base.Z-Data O(N*logN)7 Pack vector of values, on duplication prefer left one.Z-Data O(N*logN)8 Pack vector of values, on duplication prefer right one.Z-DataO(logN) Binary search on flat set.Z-DataO(N) Insert new value into set.Z-DataO(N) Delete a value from set.Z-DataO(n+m) Merge two z*, prefer right value on value duplication.Z-DataCFind the value's index in the vector slice, if value exists return  , otherwise , i.e. the insert index5This function only works on ascending sorted vectors.z{|}~z{|}~Fast map based on sorted vector;(c) Dong Han, 2017-2019 (c) Tao He, 2018-2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqZ-DataO(1) empty flat map.Z-Data O(N*logN)= Pack list of key values, on key duplication prefer left one.Z-Data O(N*logN)Q Pack list of key values with suggested size, on key duplication prefer left one.Z-Data O(N*logN)> Pack list of key values, on key duplication prefer right one.Z-Data O(N*logN)R Pack list of key values with suggested size, on key duplication prefer right one.Z-DataO(N)D Unpack key value pairs to a list sorted by keys in ascending order.This function works with  foldr/build fusion in base.Z-DataO(N)E Unpack key value pairs to a list sorted by keys in descending order.This function works with  foldr/build fusion in base.Z-Data O(N*logN)? Pack vector of key values, on key duplication prefer left one.Z-Data O(N*logN)@ Pack vector of key values, on key duplication prefer right one.Z-DataO(logN) Binary search on flat map.Z-DataO(N)> Insert new key value into map, replace old one if key exists.Z-DataO(N) Delete a key value pair by key.Z-DataO(N) Modify a value by key.7The value is evaluated to WHNF before writing into map.Z-DataO(n+m) Merge two (, prefer right value on key duplication.Z-DataO(n+m) Merge two  with a merge function.Z-DataO(n) Reduce this map by applying a binary operator to all elements, using the given starting value (typically the right-identity of the operator).(During folding k is in descending order.Z-DataO(n) Reduce this map by applying a binary operator to all elements, using the given starting value (typically the right-identity of the operator).'During folding k is in ascending order.Z-DataO(n) Reduce this map by applying a binary operator to all elements, using the given starting value (typically the right-identity of the operator).(During folding k is in descending order.Z-DataO(n) Reduce this map by applying a binary operator to all elements, using the given starting value (typically the right-identity of the operator).'During folding k is in ascending order.Z-DataO(n).  f s ==   $  ((k, v) -> (,) k  $ f k v) ( m)* That is, behaves exactly like a regular Y except that the traversing function also has access to the key associated with a value.Z-Data?Find the key's index in the vector slice, if key exists return  , otherwise , i.e. the insert index5This function only works on ascending sorted vectors.Z-DataElinear scan search from left to right, return the first one if exist.Z-DataElinear scan search from right to left, return the first one if exist.#Fast int set based on sorted vector;(c) Dong Han, 2017-2019 (c) Tao He, 2018-2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqZ-DatahMapping values of within a set, the result size may change if there're duplicated values after mapping.Z-DataO(1) empty flat set.Z-Data O(N*logN)5 Pack list of values, on duplication prefer left one.Z-Data O(N*logN)I Pack list of values with suggested size, on duplication prefer left one.Z-Data O(N*logN)6 Pack list of values, on duplication prefer right one.Z-Data O(N*logN)J Pack list of values with suggested size, on duplication prefer right one.Z-DataO(N)7 Unpack a set of values to a list s in ascending order.This function works with  foldr/build fusion in base.Z-DataO(N)8 Unpack a set of values to a list s in descending order.This function works with  foldr/build fusion in base.Z-Data O(N*logN)7 Pack vector of values, on duplication prefer left one.Z-Data O(N*logN)8 Pack vector of values, on duplication prefer right one.Z-DataO(logN) Binary search on flat set.Z-DataO(N) Insert new value into set.Z-DataO(N) Delete a value.Z-DataO(n+m) Merge two *, prefer right value on value duplication.Z-DataCFind the value's index in the vector slice, if value exists return  , otherwise , i.e. the insert index5This function only works on ascending sorted vectors.#Fast int map based on sorted vector;(c) Dong Han, 2017-2019 (c) Tao He, 2018-2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq/Z-DataO(1) empty flat map.Z-Data O(N*logN)= Pack list of key values, on key duplication prefer left one.Z-Data O(N*logN)Q Pack list of key values with suggested size, on key duplication prefer left one.Z-Data O(N*logN)> Pack list of key values, on key duplication prefer right one.Z-Data O(N*logN)R Pack list of key values with suggested size, on key duplication prefer right one.Z-DataO(N)D Unpack key value pairs to a list sorted by keys in ascending order.This function works with  foldr/build fusion in base.Z-DataO(N)E Unpack key value pairs to a list sorted by keys in descending order.This function works with  foldr/build fusion in base.Z-Data O(N*logN)? Pack vector of key values, on key duplication prefer left one.Z-Data O(N*logN)@ Pack vector of key values, on key duplication prefer right one.Z-DataO(logN) Binary search on flat map.Z-DataO(N)> Insert new key value into map, replace old one if key exists.Z-DataO(N) Delete a key value pair by key.Z-DataO(N) Modify a value by key.7The value is evaluated to WHNF before writing into map.Z-DataO(n+m) Merge two (, prefer right value on key duplication.Z-DataO(n+m) Merge two  with a merge function.Z-DataO(n) Reduce this map by applying a binary operator to all elements, using the given starting value (typically the right-identity of the operator).(During folding k is in descending order.Z-DataO(n) Reduce this map by applying a binary operator to all elements, using the given starting value (typically the right-identity of the operator).)During folding Int is in ascending order.Z-DataO(n) Reduce this map by applying a binary operator to all elements, using the given starting value (typically the right-identity of the operator).*During folding Int is in descending order.Z-DataO(n) Reduce this map by applying a binary operator to all elements, using the given starting value (typically the right-identity of the operator).)During folding Int is in ascending order.Z-DataO(n).  f s ==   $  ((k, v) -> (,) k  $ f k v) ( m)* That is, behaves exactly like a regular Y except that the traversing function also has access to the key associated with a value.Z-Data?Find the key's index in the vector slice, if key exists return  , otherwise , i.e. the insert index5This function only works on ascending sorted vectors.Z-DataElinear scan search from left to right, return the first one if exist.Z-DataElinear scan search from right to left, return the first one if exist.Textual numeric parsers.(c) Dong Han, 2017-2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqtZ-Data:Parse and decode an unsigned hex number. The hex digits 'a' through 'f' may be upper or lower case.&This parser does not accept a leading "0x"n string, and consider sign bit part of the binary hex nibbles, i.e. 'parse hex "0xFF" == Right (-1 :: Int8)'Z-Data+decode hex digits sequence within an array.Z-DataA fast digit predicate.Z-Data,Parse and decode an unsigned decimal number. Z-Data'decode digits sequence within an array. Z-Data'decode digits sequence within an array.A fast version to decode ( using machine word as much as possible. Z-DataA fast digit predicate. Z-Data0Parse a decimal number with an optional leading '+' or '-' sign character. Z-DataParse a rational number.6The syntax accepted by this parser is the same as for .Notey: this parser is not safe for use with inputs from untrusted sources. An input with a suitably large exponent such as "1e1000000000" will cause a huge O to be allocated, resulting in what is effectively a denial-of-service attack.#In most cases, it is better to use  or  instead.Z-Data%Parse a rational number and round to .This parser accepts an optional leading sign character, followed by at least one decimal digit. The syntax similar to that accepted by the . function, with the exception that a trailing '.' or 'e' not& followed by a number is not consumed.%Examples with behaviour identical to : parse_ double "3" == ("", Right 3.0) parse_ double "3.1" == ("", Right 3.1) parse_ double "3e4" == ("", Right 30000.0) parse_ double "3.1e4" == ("", Right 31000.0) cparse_ double ".3" == (".3", Left ParserError) parse_ double "e3" == ("e3", Left ParserError)Examples of differences from : parse_ double "3.foo" == (".foo", Right 3.0) parse_ double "3e" == ("e", Right 3.0) parse_ double "-3e" == ("e", Right -3.0)MThis function does not accept string representations of "NaN" or "Infinity".Z-Data%Parse a rational number and round to .Single precision version of .Z-DataParse a scientific number.6The syntax accepted by this parser is the same as for .Z-DataMParse a scientific number and convert to result using a user supply function.6The syntax accepted by this parser is the same as for .Z-DataStrip message version.Z-DataParse a rational number.6The syntax accepted by this parser is the same as for .Notey: this parser is not safe for use with inputs from untrusted sources. An input with a suitably large exponent such as "1e1000000000" will cause a huge O to be allocated, resulting in what is effectively a denial-of-service attack.#In most cases, it is better to use  or  instead.Z-Data$More strict number parsing(rfc8259). support parse 2314. and  21321exyz without eating extra dot or e via backtrack, this is not allowed in some strict grammer such as JSON, so we make an non-backtrack strict number parser separately using LL(1) lookahead. This parser also agree with  on extra dot or e handling: Qparse_ double "3.foo" == Left ParseError parse_ double "3e" == Left ParseErrorLeading zeros or + sign is also not allowed: Pparse_ double "+3.14" == Left ParseError parse_ double "0014" == Left ParseErrorQIf you have a similar grammer, you can use this parser to save considerable time.  number = [ minus ] int [ frac ] [ exp ] decimal-point = %x2E ; . digit1-9 = %x31-39 ; 1-9 e = %x65 / %x45 ; e E exp = e [ minus / plus ] 1*DIGIT frac = decimal-point 1*DIGIT ZThis function does not accept string representations of "NaN" or "Infinity". reference: -https://tools.ietf.org/html/rfc8259#section-6Z-Data%Parse a rational number and round to  using stricter grammer.Single precision version of .Z-DataParse a scientific number.6The syntax accepted by this parser is the same as for .Z-DataMParse a scientific number and convert to result using a user supply function.6The syntax accepted by this parser is the same as for .Z-Data)Strip message version of scientifically'.Z-Data!accumulator, usually start from 0 Z-Data!accumulator, usually start from 0          / Efficient deserialization/parse.(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqw9 !"#$%&'()*+,-./0123456789:;<=>   9! "#$%&'()*+,-./014235689:;<=>  7  JSON representation and parsers(c) Dong Han, 2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqa Z-Data,A JSON value represented as a Haskell value.The Object's payload is a key-value vector instead of a map, which parsed directly from JSON document. This design choice has following advantages:4Allow different strategies handling duplicated keys.Allow different Map" type to do further parsing, e.g. )08Roundtrip without touching the original key-value order.ySave time if constructing map is not neccessary, e.g. using a linear scan to find a key if only that key is needed. Z-DataParse " without consuming trailing bytes.!Z-DataParse Y, and consume all trailing JSON white spaces, if there're bytes left, parsing will fail."Z-DataIncreamental parse " without consuming trailing bytes.#Z-DataIncreamental parse X and consume all trailing JSON white spaces, if there're bytes left, parsing will fail.$Z-DataXThe only valid whitespace in a JSON document is space, newline, carriage pure, and tab.%Z-DataJSON  parser.&Z-Data!parse json array with leading 91.Z-Data$parse json array without leading 91.'Z-Data"parse json array with leading 123.Z-Data&parse json object without leading 123. !"#$%&'( !"#%'&($1Efficient serialization/format.(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq <hrstuvz{|}~<htz{|}~uvrs! JSON representation and builders(c) Dong Han, 2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq@/Z-DataUse :Y as separator to connect a label(no need to escape, only add quotes) with field builders.0Z-DataUse :M as separator to connect a label(escaped and add quotes) with field builders.1Z-Data Encode a !, you can use this function with toValue to get  encodeJSON with a small overhead.6Z-DataCEscape text into JSON string and add double quotes, escaping rules:  '\b': "\b" '\f': "\f" '\n': "\n" '\r': "\r" '\t': "\t" '"': "\"" '\': "\\" '/': "\/" other chars <= 0x1F: "\u00XX" /0123456145236/0"'Fast JSON serialization/deserialization(c) Dong Han, 2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqh6SZ-Data!Typeclass for converting to JSON .UZ-DataGeneric encode/decode SettingszThere should be no control charactors in formatted texts since we don't escaping those field names or constructor names (2 relys on Haskell's lexical property). Otherwise I! will output illegal JSON string.WZ-Dataformat field labelsXZ-Dataformat constructor names.YZ-DataY for convert result from JSON ..This is intended to be named differently from  to clear confusions.]Z-DataJElements of a (JSON) Value path used to describe the location of an error.^Z-Data4Path element of a key into an object, "object.key"._Z-Data8Path element of an index into an array, "array[index]".`Z-Data path of a embedded (JSON) StringbZ-Data=Decode a JSON doc, only trailing JSON whitespace are allowed.cZ-Data/Decode a JSON bytes, return any trailing bytes.dZ-Data.Decode JSON doc chunks, return trailing bytes.eZ-DatacDecode JSON doc chunks, consuming trailing JSON whitespaces (other trailing bytes are not allowed).fZ-Data#Directly encode data to JSON bytes.gZ-Data Text version f.hZ-DataEJSON Docs are guaranteed to be valid UTF-8 texts, so we provide this.iZ-DataRun a Y with input value.jZ-DataRun a Y with input value.kZ-Data version of .lZ-DataProduce an error message like 4converting XXX failed, expected XXX, encountered XXX.mZ-Data$Add JSON Path context to a converterWhen converting a complex structure, it helps to annotate (sub)converters with context, so that if an error occurs, you can find its location. jwithFlatMapR "Person" $ \o -> Person <$> o .: "name" <?> Key "name" <*> o .: "age" <?> Key "age"/(Standard methods like '(.:)' already do this.)\With such annotations, if an error occurs, you will get a JSON Path location of that error.nZ-DataXAdd context to a failure message, indicating the name of the structure being converted. fprependContext "MyType" (fail "[error message]") -- Error: "converting MyType failed, [error message]"qZ-Dataq name f value applies f to the  number when value is a 23 and fails using l otherwise.WarningH: If you are converting from a scientific to an unbounded type such as E you may want to add a restriction on the size of the exponent (see sN) to prevent malicious input from filling up the memory of the target system.Error message example wwithScientific "MyType" f (String "oops") -- Error: "converting MyType failed, expected Number, but encountered String"rZ-Data@r5 try to convert floating number with following rules:Use  Infinity# to represent out of range numbers.Convert Null as NaNsZ-Datas name f value applies f to the  number when value is a * with exponent less than or equal to 1024.tZ-Datas name f value applies f to the  number when value is a  and value is within minBound ~ maxBound.wZ-Data Directly use & as key-values for further converting.xZ-DataTake a F as an 'FM.FlatMap T.Text Value', on key duplication prefer first one.yZ-DataTake a E as an 'FM.FlatMap T.Text Value', on key duplication prefer last one.zZ-DataTake a F as an 'HM.HashMap T.Text Value', on key duplication prefer first one.{Z-DataTake a E as an 'HM.HashMap T.Text Value', on key duplication prefer last one.|Z-Data$Decode a nested JSON-encoded string.}Z-Data7Retrieve the value associated with the given key of an . The result is Q if the key is not present or the value cannot be converted to the desired type.2This accessor is appropriate if the key and value mustW be present in an object for it to be valid. If the key and value are optional, use ~ instead.~Z-Data7Retrieve the value associated with the given key of an . The result is . if the key is not present or if its value is , or 6 if the value cannot be converted to the desired type.This accessor is most useful if the key and value can be absent from an object without affecting its validity. If the key and value are mandatory, use } instead.Z-Data7Retrieve the value associated with the given key of an . The result is  if the key is not present or 7 if the value cannot be converted to the desired type.This differs from ~ by attempting to convert B the same as any other JSON value, instead of interpreting it as .Z-Data Variant of ~" with explicit converter function.Z-Data Variant of " with explicit converter function.Z-DataUse ,* as separator to connect list of builders.Z-DataUse ,. as separator to connect a vector of builders.Z-Data"Constructor with multiple payloadsZ-Data!Constructor with a single payloadZ-Data.Constructor without payload, convert to StringZ-Data"Constructor with multiple payloadsZ-Data!Constructor with a single payloadZ-Data.Constructor without payload, convert to StringZ-DataThis instance includes a bounds check to prevent maliciously large inputs to fill up the memory of the target system. You can newtype Fixed and provide your own instance using q$ if you want to allow larger inputs.Z-DataThis instance includes a bounds check to prevent maliciously large inputs to fill up the memory of the target system. You can newtype Ratio and provide your own instance using q$ if you want to allow larger inputs.Z-DataThis instance includes a bounds check to prevent maliciously large inputs to fill up the memory of the target system. You can newtype Scientific and provide your own instance using q$ if you want to allow larger inputs.Z-Data!default instance prefer later keyZ-Data!default instance prefer later keyZ-DataUse  as Proxy a!Z-Data"Constructor with multiple payloads"Z-Data!Constructor with a single payload#Z-Data.Constructor without payload, convert to StringlZ-Data/The name of the type you are trying to convert.Z-Data*The JSON value type you expecting to meet.Z-DataThe actual value encountered.|Z-Datadata type nameZ-Data/a inner converter which will get the converted .Z-Data4the field converter (value part of a key value pair)X !"#789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Xacbdefgh !"#ijYZ[kmn]^_`\lopqsrtuvwxyz{|}~UVWXSTQR@A>?HIFGPNOLMJK=;<9:78DEBCm9 #'Fast JSON serialization/deserialization(c) Dong Han, 2019BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkq Z-DataSnake casing a pascal cased constructor name or camel cased field name, words are always lower cased and separated by an underscore.Z-DataTrain casing a pascal cased constructor name or camel cased field name, words are always lower cased and separated by a hyphen.E !"#?@AGHIRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Eacbdefgh !"#ijYZ[kmn]^_`\lopqsrtuvwxyz{|}~ST@AHIUVWXR?GNull-ternimated byte string.(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone) "#%,-.1789;=>?@AFHMPSUVXghkqWZ-DataA efficient wrapper for short immutable null-terminated byte sequences which can be automatically freed by ghc garbage collector.The main use case of this type is to ease the bridging of C FFI APIs, since most of the unix APIs use null-terminated string. On windows you're encouraged to use a compatibility layer like )'WideCharToMultiByte/MultiByteToWideChar'L and keep the same interface, e.g. libuv do this when deal with file paths.z don't support O(1) slicing, it's not suitable to use it to store large byte chunk, If you need advance editing, convert  to / from  with , or  with 'toBytes\/fromBytes'7 if you need O(1) slicing, then use vector combinators./When textual represatation is needed(conver to , ,  instance, etc.), we assume  using UTF-8 encodings,  can be used with OverloadedString6, literal encoding is UTF-8 with some modifications: NUL is encoded to 'C0 80', and '\xD800' ~ '\xDFFF'4 is encoded as a three bytes normal utf-8 codepoint.GNote most of the unix API is not unicode awared though, you may find a scandir call return a filename which is not proper encoded in any unicode encoding at all. But still, UTF-8 is recommanded to be used when text represatation is needed. --Z-Data Convert to ,5there's an invariance that this array never contains NULZ-Data'Use this pattern to match or construct 3, result will be trimmed down to first byte before NUL byte if there's any.Z-Data An empty Z-DataO(n) The  function takes a  and a list of f s and concatenates the list after interspersing the first argument between each element of the list.Note:  will force the entire  list.Z-DataO(n) An efficient way to join CByte s with a byte.Intercalate bytes list with NUL4 will effectively leave the first bytes in the list.Z-DataPack a  into .NUL is encoded as two bytes C0 80 , '\xD800' ~ '\xDFFF'4 is encoded as a three bytes normal UTF-8 codepoint.Z-DataO(n)> Convert cbytes to a char list using UTF8 encoding assumption.$This function is much tolerant than +, it simply decoding codepoints using UTF8 9< without checking errors such as overlong or invalid range.dUnpacking is done lazily. i.e. we will retain reference to the array until all element are consumed.This function is a  good producer$ in the sense of build/foldr fusion.Z-DataReturn  if  is empty.Z-DataReturn the BTYE length of .Z-DataO(1) , convert to /, which can be processed by vector combinators.Z-DataO(n), convert from 1Result will be trimmed down to first byte before NUL byte if there's any.Z-DataO(n) , convert to  using UTF8 encoding assumption.Throw  in case of invalid codepoint.Z-DataO(n) , convert to  using UTF8 encoding assumption.Return  in case of invalid codepoint.Z-DataO(n), convert from ,1Result will be trimmed down to first byte before NUL byte if there's any.Z-DataWrite  's byte sequence to buffer. This function is different from ShowTY instance in that it directly write byte sequence without checking if it's UTF8 encoded.Z-DataBuild a @ with builder, result will be trimmed down to first byte before NUL byte if there's any.Z-DataCopy a  type into a  , return  if the pointer is NULL.&After copying you're free to free the  's memory.Z-Data Same with  , but only take at most N bytes.1Result will be trimmed down to first byte before NUL byte if there's any.Z-DataPass  to foreign function as a  const char*.,USE THIS FUNCTION WITH UNSAFE FFI CALL ONLY.Z-DataPass  to foreign function as a  const char*.0Don't pass a forever loop to this function, see  -https://ghc.haskell.org/trac/ghc/ticket/14346#14346.Z-Data Create a  with IO action.5If (<=0) capacity is provided, a pointer pointing to NUL' is passed to initialize function and 3 will be returned. This behavior is different from 2, which may cause trouble for some FFI functions.,USE THIS FUNCTION WITH UNSAFE FFI CALL ONLY.Z-Data Create a  with IO action.!If (<=0) capacity is provided, a <' is passed to initialize function and = will be returned. Other than that, User have to make sure a NUL$ ternimated string will be written.Z-DataLThis instance provide UTF8 guarantee, illegal codepoints will be written as -.s.Z-DataThis instance peek bytes until NUL?(or input chunk ends), poke bytes with an extra NUL terminator.Z-Datacapacity n(include the NUL terminator)Z-Datainitialization function,Z-Datacapacity n(include the NUL terminator)Z-Datainitialization function,4567897:;7:<7:=7>?7>?7@ABCDBEFBEGBEHBEIBEJBEKBELBEMBENBENBEOBEOBPQBPRBPSBPTBPUBPVBPWBPXBPYBPZBP[B\]B\]B\^B\^B_`B_aB_aB_bB_cB_cdefghijklmnopqrstuvwxyyz{{|}~      !"#$%&'()*+, I H M L D - . / 0 1 2 3 4 5 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q RSTUVWXYZ[\]^_`abcdefghi.jjklmnopqrsttuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'%JNPLMRS  [\]^_`abcdegfhijklmnopqrstuvwz}~x{|y'ek       !"##$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnoppqrstuvwxyz{|}~89:;uvy~=>?@ABCDEF       !0"#$%&'()*+,-./0123456789: ;<=>?@ABCD"$%&'()*+,-EFGHIJKLMNOP~QRSTUVuWXYZ[\]^_ ` a a b 3 c d e f g h  i j k l m n o p q r!s!t!i!j!u!k!v!l"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"{"|"}"~"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""##+     45777777774 4!45"#$%4&7'(7)b7)*45+7',-4.7/07/17/27347)57)6474897:;45<7@=7@=7>?7>?7>@7>@7>A7>A7>B7>B7>C7>C7>D7>D7>E7>E7>F7>F7>G7>G7>H7>H7>I7>I7>J7>J7>K7>K7>L7>L7>M7>M7>N7>N7>O7>O7>P7>P7>Q7>Q7>R7>R7>S7>S7>T7>T7>U7>V7>W7>X7>X7>Y7>Y7>Z7>Z7>[7>[7@\BC]BC^BC_BC`BCaBCbBCcBCdBCeBEfBEgBEhBEiBEjBEkBElBEmBEnBEoBEpBEqBErBEsBEtBEuBEvBEwBExBEyBEzBE{BE|BE}BE~BEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB77744737777  7)""%Z-Data-0.1.6.0-9iCfQaSbVFm1BnxqOFfUEO Z.Data.Array Z.Data.CBytesZ.Data.Vector.Sort Z.ForeignZ.Data.Array.CastZ.Data.Array.UnalignedZ.Data.Array.UnliftedArrayZ.Data.Array.QQZ.Data.Array.Checked!Z.Data.Builder.Numeric.DigitTableZ.Data.Generics.UtilsZ.Data.PrimRef.PrimSTRefZ.Data.PrimRef.PrimIORefZ.Data.Text.UTF8CodecZ.Data.Text.UTF8RewindZ.Data.Vector.BaseZ.Data.Vector.QQZ.Data.Vector.SearchZ.Data.Vector.ExtraZ.Data.Text.BaseZ.Data.Text.SearchZ.Data.Text.ExtraZ.Data.Parser.BaseZ.Data.Builder.BaseZ.Data.Builder.NumericZ.Data.Text.ShowTZ.Data.Vector.FlatSetZ.Data.Vector.FlatMapZ.Data.Vector.FlatIntSetZ.Data.Vector.FlatIntMapZ.Data.Parser.NumericZ.Data.JSON.ValueZ.Data.JSON.BuilderZ.Data.JSON.Base Z.Data.JSONZ.Data.PrimRef isCategoryPreludeunlines Z.Data.Text Z.Data.VectorZ.DataCBytesToJSONTreplacementChar Z.Data.ParserFlatMapZ.Data.Builder Data.AesonNumberghc-primGHC.Prim RealWorldbaseForeign.C.StringCStringGHC.IO.ExceptionUndefinedElementIndexOutOfBoundsArrayExceptionData.OrdDownGHC.PtrcastPtr(primitive-0.7.1.0-6Ng9GYhvLyE4pBQRYaGxSxData.Primitive.PtrcopyPtrToMutablePrimArrayData.Primitive.PrimArraymutablePrimArrayContentsprimArrayContentsnewAlignedPinnedPrimArraynewPinnedPrimArrayisMutablePrimArrayPinnedisPrimArrayPinnedcopyMutablePrimArrayToPtrcopyPrimArrayToPtr PrimArrayMutablePrimArrayData.Primitive.Types setOffAddr# writeOffAddr# readOffAddr# indexOffAddr# setByteArray#writeByteArray#readByteArray#indexByteArray# alignment#sizeOf#PrimData.Primitive.SmallArray SmallArraySmallMutableArrayData.Primitive.Arrayarray#Arraymarray# MutableArrayCastcast$fCastFloatInt32$fCastDoubleInt64$fCastInt32Float$fCastInt64Double$fCastFloatWord32$fCastDoubleWord64$fCastWord32Float$fCastWord64Double $fCastWordInt$fCastWord64Int64$fCastWord32Int32$fCastWord16Int16$fCastWord8Int8 $fCastIntWord$fCastInt64Word64$fCastInt32Word32$fCastInt16Word16$fCastInt8Word8$fCastabBEgetBELEgetLE Unaligned unalignedSizeindexWord8ArrayAs#readWord8ArrayAs#writeWord8ArrayAs#peekMBApokeMBAindexBAwriteWord8ArrayAsreadWord8ArrayAsindexWord8ArrayAswritePrimWord8ArrayAsreadPrimWord8ArrayAsindexPrimWord8ArrayAs$fUnalignedChar$fUnalignedDouble$fUnalignedFloat$fUnalignedInt$fUnalignedInt64$fUnalignedInt32$fUnalignedInt16$fUnalignedWord$fUnalignedWord64$fUnalignedWord32$fUnalignedWord16$fUnalignedInt8$fUnalignedWord8 $fUnalignedLE$fUnalignedLE0$fUnalignedLE1$fUnalignedLE2$fUnalignedLE3$fUnalignedLE4$fUnalignedLE5$fUnalignedLE6$fUnalignedLE7$fUnalignedLE8$fUnalignedLE9 $fUnalignedBE$fUnalignedBE0$fUnalignedBE1$fUnalignedBE2$fUnalignedBE3$fUnalignedBE4$fUnalignedBE5$fUnalignedBE6$fUnalignedBE7$fUnalignedBE8$fUnalignedBE9$fShowLE$fEqLE$fShowBE$fEqBE$fUnalignedCDouble$fUnalignedCFloat$fUnalignedCSUSeconds$fUnalignedCUSeconds$fUnalignedCTime$fUnalignedCClock$fUnalignedCUIntMax$fUnalignedCIntMax$fUnalignedCUIntPtr$fUnalignedCIntPtr$fUnalignedCBool$fUnalignedCULLong$fUnalignedCLLong$fUnalignedCSigAtomic$fUnalignedCWchar$fUnalignedCSize$fUnalignedCPtrdiff$fUnalignedCULong$fUnalignedCLong$fUnalignedCUInt$fUnalignedCInt$fUnalignedCUShort$fUnalignedCShort$fUnalignedCUChar$fUnalignedCSChar$fUnalignedCChar UnliftedArrayMutableUnliftedArray PrimUnliftedwriteUnliftedArray#readUnliftedArray#indexUnliftedArray#unsafeNewUnliftedArraynewUnliftedArraysetUnliftedArraysizeofUnliftedArraysizeofMutableUnliftedArraywriteUnliftedArrayreadUnliftedArrayindexUnliftedArrayunsafeFreezeUnliftedArraysameMutableUnliftedArraycopyUnliftedArraycopyMutableUnliftedArrayfreezeUnliftedArraythawUnliftedArraycloneUnliftedArraycloneMutableUnliftedArray$fPrimUnliftedIORef$fPrimUnliftedSTRef$fPrimUnliftedMVar$fPrimUnliftedMutablePrimArray$fPrimUnliftedMutableByteArray$fPrimUnliftedByteArray$fPrimUnliftedPrimArrayArrMArrnewArr newArrWithreadArrwriteArrsetArrindexArr indexArr' indexArrM freezeArrthawArrunsafeFreezeArr unsafeThawArrcopyArrcopyMutableArrmoveArrcloneArrcloneMutableArrresizeMutableArrshrinkMutableArrsameMutableArr sizeofArrsizeofMutableArrsameArr uninitializedwithPrimArrayContentswithMutablePrimArrayContents castArraycastMutableArray$fArrUnliftedArraya$fArrPrimArraya$fArrSmallArraya $fArrArraya asciiLiteralarrASCIIword8ArrayFromAddrint8ArrayFromAddr utf8Literal arrayLiteral word8LiteralarrW8 int8LiteralarrI8 word16LiteralarrW16word16ArrayFromAddrint16ArrayFromAddr int16LiteralarrI16 word32LiteralarrW32word32ArrayFromAddrint32ArrayFromAddr int32LiteralarrI32 word64LiteralarrW64word64ArrayFromAddrint64ArrayFromAddr int64LiteralarrI64wordArrayFromAddrintArrayFromAddr wordLiteral intLiteralarrWordarrInt decDigitTable hexDigitTablehexDigitTableUpper ProductSizePSize productSize$fProductSize:*:$fProductSizeM1 PrimSTRef newPrimSTRef readPrimSTRefwritePrimSTRefmodifyPrimSTRefCounter PrimIORef newPrimIORef readPrimIORefwritePrimIORefmodifyPrimIORef newCounteratomicAddCounter'atomicAddCounteratomicAddCounter_atomicSubCounter'atomicSubCounteratomicSubCounter_atomicAndCounter'atomicAndCounteratomicAndCounter_atomicNandCounter'atomicNandCounteratomicNandCounter_atomicOrCounter'atomicOrCounteratomicOrCounter_atomicXorCounter'atomicXorCounteratomicXorCounter_encodeCharLength encodeChar encodeChar#encodeCharModifiedUTF8encodeCharModifiedUTF8# decodeChar decodeChar_ decodeChar# decodeCharLendecodeCharLen#decodeCharReversedecodeCharReverse_decodeCharReverse#decodeCharLenReversedecodeCharLenReverse#between#isContinueByte#chr1#chr2#chr3#chr4#copyChar copyChar'CategoryNormalizationResult NormalizedYesNormalizedMaybe NormalizedNo NormalizeModeNFCNFKCNFDNFKDLocale envLocaleCategoryIsxdigitCategoryIsdigitCategoryIslowerCategoryIsupperCategoryIsalphaCategoryIsalnumCategoryIspunctCategoryIsgraphCategoryIsblankCategoryIsspaceCategoryIsprintCategoryIscntrlCategoryIgnoreGraphemeClusterCategoryCompatibilityCategoryUnassignedCategoryPrivateUseCategorySurrogateCategoryFormatCategoryControlCategorySeparatorCategorySeparatorParagraphCategorySeparatorLineCategorySeparatorSpaceCategorySymbolCategorySymbolOtherCategorySymbolModifierCategorySymbolCurrencyCategorySymbolMathCategoryPunctuationCategoryPunctuationOtherCategoryPunctuationFinalCategoryPunctuationInitialCategoryPunctuationCloseCategoryPunctuationOpenCategoryPunctuationDashCategoryPunctuationConnectorCategoryNumberCategoryNumberOtherCategoryNumberLetterCategoryNumberDecimal CategoryMarkCategoryMarkEnclosingCategoryMarkSpacingCategoryMarkNonSpacingCategoryCaseMappedCategoryLetterCategoryLetterOtherCategoryLetterTitlecaseCategoryLetterLowercaseCategoryLetterUppercaseLocaleTurkishAndAzeriLatinLocaleLithuanian LocaleDefaultnormalizeModeToFlagtoNormalizationResult $fShowLocale $fEqLocale $fOrdLocale$fGenericLocale$fShowNormalizeMode$fEqNormalizeMode$fOrdNormalizeMode$fGenericNormalizeMode$fShowNormalizationResult$fEqNormalizationResult$fOrdNormalizationResult$fGenericNormalizationResult$fShowCategory $fEqCategory $fOrdCategory$fGenericCategory$fBitsCategory$fFiniteBitsCategoryVectorExceptionIndexOutOfVectorRange EmptyVectorIPairifstisndBytes PrimVectorVectorVecIArraytoArrfromArr c_memrchrc_memchr c_fnv_hash_bac_fnv_hash_addrc_ascii_validate_addrc_strlenc_strcmp indexMaybe traverseVectraverseWithIndex traverseVec_traverseWithIndex_ packASCIIw2cc2wcreatecreate'creating creating'createNcreateN2empty singletoncopypackpackNpackRpackRNunpackunpackRlengthnullappendmapmap'imap'foldl'ifoldl'foldl1' foldl1Maybe'foldr'ifoldr'foldr1' foldr1Maybe'concat concatMapmaximum maximumMaybeminimum minimumMaybeproductproduct'anyallsumcount mapAccumL mapAccumR replicatecycleNunfoldrunfoldrNelemnotElem elemIndex mapIPair'defaultChunkSizesmallChunkSize chunkOverheaddefaultInitSizeerrorEmptyVector errorOutRange castVector$fVecUnliftedArraya$fVecPrimArraya$fVecSmallArraya $fVecArraya$fHashable1Vector$fHashableVector$fCoArbitraryVector$fArbitraryVector$fTraversableVector$fFoldableVector$fFunctorVector $fReadVector $fShowVector$fNFDataVector$fMonoidVector$fSemigroupVector $fOrdVector $fEqVector $fVecVectora$fIsStringPrimVector$fHashablePrimVector$fCoArbitraryPrimVector$fArbitraryPrimVector$fReadPrimVector$fShowPrimVector$fNFDataPrimVector$fMonoidPrimVector$fSemigroupPrimVector$fOrdPrimVector$fEqPrimVector$fVecPrimVectora$fFoldCasePrimVector $fNFDataIPair$fFunctorIPair$fCoArbitraryIPair$fArbitraryIPair$fExceptionVectorException $fShowIPair $fEqIPair $fOrdIPair$fShowVectorExceptionasciivecW8vecW16vecW32vecW64vecWordvecI8vecI16vecI32vecI64vecInt elemIndices findIndiceselemIndicesBytes findIndex findIndexRfindfindBytefindR findByteRfilter partitionindicesOverlappingindicesOverlappingBytesindices indicesBytes kmpNextTable sundayBloomelemSundayBloomconssnocunconsunsnoc headMaybe tailMayEmpty lastMaybe initMayEmptyinitstailstaketakeRdropdropRslicesplitAt takeWhile takeWhileR dropWhile dropWhileR dropAroundbreakspanbreakRspanRbreakOngroupgroupBy stripPrefix isPrefixOf commonPrefix stripSuffix isSuffixOf isInfixOfsplitsplitOn splitWithwordslinesunwordspadLeftpadRightreverse intersperse intercalateintercalateElem transposezipWith' unzipWith'scanl'scanl1'scanr'scanr1'rangeCutheadtailinitlastindexindexM unsafeHead unsafeTail unsafeInit unsafeLast unsafeIndex unsafeIndexM unsafeTake unsafeDrop TextExceptionInvalidUTF8ExceptionInvalidASCIIExceptionIndexOutOfTextRange EmptyTextText getUTF8Bytesc_ascii_validate_bac_utf8_validate_addrc_utf8_validate_ba charByteIndexindexR indexMaybeRcharByteIndexRvalidate validateMaybe validateASCIIvalidateASCIIMaybeerrorEmptyText fromVectortoVector isNormalizedisNormalizedTo normalize normalizeTocaseFold caseFoldWithtoLower toLowerWithtoUpper toUpperWithtoTitle toTitleWith spanCategory$fIsStringText$fHashableText$fCoArbitraryText$fArbitraryText $fNFDataText $fShowText $fOrdText$fEqText$fExceptionTextException $fMonoidText$fSemigroupText$fShowTextException breakOnAllParser runParser ParseError ParseStepResultSuccessFailurePartialfail'parse_parse parseChunk finishParsing parseChunksrunAndKeepTrackmatchensureN endOfInputatEnd decodePrim decodePrimLE decodePrimBEscan scanChunks peekMaybepeeksatisfy satisfyWithword8char8 endOfLineskip skipWord8 skipWhile skipSpacesisSpacetakeTill takeWhile1bytesbytesCItext $fShowResult$fFunctorResult$fAlternativeParser$fMonadPlusParser$fMonadFailParser $fMonadParser$fApplicativeParser$fFunctorParser RadixDownRadix bucketSizepassesradixLSBradixradixMSB mergeSort mergeSortBy mergeTileSize insertSort insertSortBy radixSortmergeDupAdjacentmergeDupAdjacentLeftmergeDupAdjacentRightmergeDupAdjacentBy $fRadixWord64 $fRadixWord32 $fRadixWord16 $fRadixWord $fRadixWord8 $fRadixInt64 $fRadixInt32 $fRadixInt16 $fRadixInt $fRadixInt8$fRadixRadixDown$fShowRadixDown $fEqRadixDown$fPrimRadixDown$fUnalignedRadixDownBuilder runBuilder BuildStepBufferAllocateStrategy DoubleBuffer InsertChunk OneShotActionstringModifiedUTF8charModifiedUTF8 doubleBuffer insertChunk oneShotAction buildBytesbuildBytesWithbuildBytesListbuildBytesListWith buildAndRunbuildAndRunWithatMostwriteN encodePrim encodePrimLE encodePrimBE stringUTF8charUTF8string7char7string8parencurlysquareanglequotessquotescoloncommaintercalateVecintercalateList$fCoArbitraryBuilder$fArbitraryBuilder$fIsStringBuilder$fMonoidBuilder$fSemigroupBuilder$fMonadBuilder$fApplicativeBuilder$fFunctorBuilder $fShowBuilderMBA#BA#clearMBAwithPrimArrayUnsafeallocPrimArrayUnsafewithPrimVectorUnsafeallocPrimVectorUnsafeallocBytesUnsafewithPrimUnsafeallocPrimUnsafewithPrimArraySafeallocPrimArraySafewithPrimVectorSafe withPrimSafe allocPrimSafeallocPrimVectorSafeallocBytesSafe pinPrimArray pinPrimVectorclearPtrfromNullTerminatedfromPtr fromPrimPtrFFormatExponentFixedGenericPadding NoPaddingRightSpacePaddingLeftSpacePadding ZeroPaddingIFormatwidthpaddingposSigndefaultIFormatintintWith c_intWith hs_intWithinteger countDigitsi2wDeci2wHexi2wHeXhexheXfloatdouble floatWith doubleWithgrisu3 grisu3_sp scientificscientificWith$fCoArbitraryPadding$fArbitraryPadding$fCoArbitraryIFormat$fArbitraryIFormat $fShowPadding $fEqPadding $fOrdPadding $fEnumPadding $fShowIFormat $fEqIFormat $fOrdIFormat $fEnumFFormat $fReadFFormat $fShowFFormatShowT toTextBuilderStrchrs TextBuilder getBuilder buildTextunsafeFromBuilder parenWhenshowT toBuildertoBytestoStringescapeTextJSON$fShowTextBuilder$fCoArbitraryTextBuilder$fArbitraryTextBuilder$fIsStringTextBuilder $fReadStr $fShowStr $fGToTextkM1 $fGToTextkM10 $fGToTextk:+: $fGToTextkV1$fShowTCallStack $fShowTFixed $fShowTRatio $fShowTEither $fShowTMaybe$fShowT(,,,,,,)$fShowT(,,,,,) $fShowT(,,,,) $fShowT(,,,) $fShowT(,,) $fShowT(,)$fShowTPrimVector $fShowTVector$fShowTPrimArray$fShowTUnliftedArray$fShowTSmallArray $fShowTArray $fShowT[]$fShowTScientific $fShowTText$fShowTVersion $fShowT()$fShowTOrdering$fShowTNatural$fShowTInteger $fShowTWord64 $fShowTWord32 $fShowTWord16 $fShowTWord8 $fShowTWord $fShowTInt64 $fShowTInt32 $fShowTInt16 $fShowTInt8 $fShowTInt $fShowTFloat $fShowTDouble $fShowTChar $fShowTBool $fGToTextkK1 $fShowTStr$fShowTTextBuilder $fGToTextkM11 $fGToTextkM12$fGFieldToTextkM1$fGFieldToTextkM10$fGFieldToTextk:*:$fFunctorTextBuilder$fApplicativeTextBuilder$fMonadTextBuilder$fEqStr$fOrdStr $fGenericStr $fShowTSum$fShowTProduct$fShowTCompose $fShowTTagged $fShowTProxy $fShowTConst$fShowTIdentity$fShowTNonEmpty $fShowTLast $fShowTFirst $fShowTDual$fShowTWrappedMonoid $fShowTLast0 $fShowTFirst0 $fShowTMax $fShowTMin$fShowTCDouble $fShowTCFloat$fShowTCSUSeconds$fShowTCUSeconds $fShowTCTime $fShowTCClock$fShowTCUIntMax$fShowTCIntMax$fShowTCUIntPtr$fShowTCIntPtr $fShowTCBool$fShowTCULLong $fShowTCLLong$fShowTCSigAtomic $fShowTCWchar $fShowTCSize$fShowTCPtrdiff $fShowTCULong $fShowTCLong $fShowTCUInt $fShowTCInt$fShowTCUShort $fShowTCShort $fShowTCUChar $fShowTCSChar $fShowTCChar$fMonoidTextBuilder$fSemigroupTextBuilderFlatSet sortedValuessize packVector packVectorRinsertdeletemerge binarySearch$fCoArbitraryFlatSet$fArbitraryFlatSet$fNFDataFlatSet$fMonoidFlatSet$fSemigroupFlatSet$fShowTFlatSet $fShowFlatSet $fEqFlatSet $fOrdFlatSet$fFoldableFlatSetsortedKeyValueskmap'lookupadjust' mergeWithKey' foldrWithKey foldlWithKey foldrWithKey' foldlWithKey'traverseWithKey linearSearch linearSearchR$fTraversableFlatMap$fFoldableFlatMap$fFunctorFlatMap$fNFDataFlatMap$fMonoidFlatMap$fSemigroupFlatMap$fCoArbitraryFlatMap$fArbitraryFlatMap$fShowTFlatMap $fShowFlatMap $fEqFlatMap $fOrdFlatMap FlatIntSet$fCoArbitraryFlatIntSet$fArbitraryFlatIntSet$fNFDataFlatIntSet$fMonoidFlatIntSet$fSemigroupFlatIntSet$fShowTFlatIntSet$fShowFlatIntSet$fEqFlatIntSet$fOrdFlatIntSet FlatIntMap$fTraversableFlatIntMap$fFoldableFlatIntMap$fFunctorFlatIntMap$fNFDataFlatIntMap$fMonoidFlatIntMap$fSemigroupFlatIntMap$fCoArbitraryFlatIntMap$fArbitraryFlatIntMap$fShowTFlatIntMap$fShowFlatIntMap$fEqFlatIntMap$fOrdFlatIntMaphexLoop isHexDigituintdecLoopdecLoopIntegerFastisDigitrationalscientifically rational'double'float' scientific'scientifically'floatToScientificdoubleToScientificValueObjectStringBoolNull parseValue parseValue'parseValueChunksparseValueChunks'valuearrayobjectstring$fArbitraryValue $fNFDataValue $fEqValue $fShowValue$fGenericValue $fShowTValuekvkv'array'object'GConstrFromValuegConstrFromValue GBuildLookup gBuildLookup GFromFields gFromFields LookupTable GFromValue gFromValue FromValue fromValueGConstrEncodeJSONgConstrEncodeJSONGAddPunctuationgAddPunctuation GEncodeJSON gEncodeJSON EncodeJSON encodeJSONGConstrToValuegConstrToValue GMergeFields gMergeFields GWriteFields gWriteFieldsFieldGToValuegToValueToValuetoValueSettingsfieldFmt constrFmt Converter runConverter ConvertError PathElementKeyIndexEmbedded DecodeErrordecode'decode decodeChunks decodeChunks' encodeBytes encodeTextencodeTextBuilderconvertconvert' typeMismatchprependContextfromNullwithBoolwithScientific withRealFloatwithBoundedScientificwithBoundedIntegralwithText withArray withKeyValues withFlatMap withFlatMapR withHashMap withHashMapRwithEmbeddedJSON.:.:?.:! convertFieldconvertFieldMaybeconvertFieldMaybe'defaultSettings$fShowConvertError$fMonadFailConverter$fMonadConverter$fMonadPlusConverter$fAlternativeConverter$fApplicativeConverter$fFunctorConverter $fGToValuekM1$fGToValuekM10$fToValueFixed$fToValueRatio$fToValueMaybe$fToValueVersion $fToValue()$fToValueOrdering$fToValueNatural$fToValueInteger$fToValueWord64$fToValueWord32$fToValueWord16$fToValueWord8 $fToValueWord$fToValueInt64$fToValueInt32$fToValueInt16 $fToValueInt8 $fToValueInt$fToValueDouble$fToValueFloat $fToValueChar $fToValueBool$fToValueNonEmpty $fToValue[]$fToValueHashSet$fToValuePrimVector$fToValueVector$fToValueFlatIntSet$fToValueFlatIntMap$fToValueHashMap$fToValueFlatSet$fToValueFlatMap$fToValueScientific $fToValueStr $fToValueText$fToValueValue$fToValueProxy $fGToValuekK1$fGWriteFieldskM1$fGWriteFieldskM10$fGWriteFieldsTYPE:*:$fGMergeFieldskM1$fGMergeFieldskM10$fGMergeFieldsk:*:$fGToValuekM11$fGConstrToValueTYPEM1$fGConstrToValuekM1$fGConstrToValuekM10$fGConstrToValuek:+:$fGConstrToValuekV1$fGEncodeJSONk:*:$fGEncodeJSONkM1$fGEncodeJSONkM10$fEncodeJSONFixed$fEncodeJSONRatio$fEncodeJSONMaybe$fEncodeJSONVersion$fEncodeJSON()$fEncodeJSONOrdering$fEncodeJSONNatural$fEncodeJSONInteger$fEncodeJSONWord64$fEncodeJSONWord32$fEncodeJSONWord16$fEncodeJSONWord8$fEncodeJSONWord$fEncodeJSONInt64$fEncodeJSONInt32$fEncodeJSONInt16$fEncodeJSONInt8$fEncodeJSONInt$fEncodeJSONDouble$fEncodeJSONFloat$fEncodeJSONChar$fEncodeJSONBool$fEncodeJSONNonEmpty$fEncodeJSON[]$fEncodeJSONHashSet$fEncodeJSONPrimVector$fEncodeJSONVector$fEncodeJSONFlatIntSet$fEncodeJSONFlatIntMap$fEncodeJSONHashMap$fEncodeJSONFlatSet$fEncodeJSONFlatMap$fEncodeJSONScientific$fEncodeJSONStr$fEncodeJSONText$fEncodeJSONValue$fEncodeJSONProxy$fGEncodeJSONkK1$fGAddPunctuationM1$fGAddPunctuationM10$fGAddPunctuation:*:$fGEncodeJSONkM11$fGConstrEncodeJSONTYPEM1$fGConstrEncodeJSONkM1$fGConstrEncodeJSONkM10$fGConstrEncodeJSONkM11$fGConstrEncodeJSONk:+:$fGConstrEncodeJSONkV1$fGFromValuekM1$fGFromValuekM10$fFromValueFixed$fFromValueRatio$fFromValueMaybe$fFromValueVersion $fFromValue()$fFromValueOrdering$fFromValueNatural$fFromValueInteger$fFromValueWord64$fFromValueWord32$fFromValueWord16$fFromValueWord8$fFromValueWord$fFromValueInt64$fFromValueInt32$fFromValueInt16$fFromValueInt8$fFromValueInt$fFromValueFloat$fFromValueDouble$fFromValueChar$fFromValueBool$fFromValueNonEmpty $fFromValue[]$fFromValueHashSet$fFromValuePrimVector$fFromValueVector$fFromValueFlatIntSet$fFromValueFlatIntMap$fFromValueHashMap$fFromValueFlatSet$fFromValueFlatMap$fFromValueScientific$fFromValueStr$fFromValueText$fFromValueValue$fFromValueProxy$fGFromValuekK1$fGFromFieldskM1$fGFromFieldskM10$fGFromFieldsTYPE:*:$fGBuildLookupkM1$fGBuildLookupkM10$fGBuildLookupk:*:$fGFromValuekM11$fGConstrFromValueTYPEM1$fGConstrFromValuekM1$fGConstrFromValuekM10$fGConstrFromValuek:+:$fGConstrFromValuekV1$fEqPathElement$fShowPathElement$fOrdPathElement$fGenericPathElement$fNFDataPathElement$fEqConvertError$fOrdConvertError$fGenericConvertError$fNFDataConvertError$fEncodeJSON(,,,,,,)$fEncodeJSON(,,,,,)$fEncodeJSON(,,,,)$fEncodeJSON(,,,)$fEncodeJSON(,,)$fEncodeJSON(,)$fEncodeJSONProduct$fEncodeJSONEither$fEncodeJSONSum$fToValue(,,,,,,)$fToValue(,,,,,)$fToValue(,,,,)$fToValue(,,,) $fToValue(,,) $fToValue(,)$fToValueProduct$fToValueEither $fToValueSum$fFromValue(,,,,,,)$fFromValue(,,,,,)$fFromValue(,,,,)$fFromValue(,,,)$fFromValue(,,)$fFromValue(,)$fFromValueProduct$fFromValueEither$fFromValueSum$fEncodeJSONCDouble$fEncodeJSONCFloat$fEncodeJSONCSUSeconds$fEncodeJSONCUSeconds$fEncodeJSONCTime$fEncodeJSONCClock$fEncodeJSONCUIntMax$fEncodeJSONCIntMax$fEncodeJSONCUIntPtr$fEncodeJSONCIntPtr$fEncodeJSONCBool$fEncodeJSONCULLong$fEncodeJSONCLLong$fEncodeJSONCSigAtomic$fEncodeJSONCWchar$fEncodeJSONCSize$fEncodeJSONCPtrdiff$fEncodeJSONCULong$fEncodeJSONCLong$fEncodeJSONCUInt$fEncodeJSONCInt$fEncodeJSONCUShort$fEncodeJSONCShort$fEncodeJSONCUChar$fEncodeJSONCSChar$fEncodeJSONCChar$fToValueCDouble$fToValueCFloat$fToValueCSUSeconds$fToValueCUSeconds$fToValueCTime$fToValueCClock$fToValueCUIntMax$fToValueCIntMax$fToValueCUIntPtr$fToValueCIntPtr$fToValueCBool$fToValueCULLong$fToValueCLLong$fToValueCSigAtomic$fToValueCWchar$fToValueCSize$fToValueCPtrdiff$fToValueCULong$fToValueCLong$fToValueCUInt $fToValueCInt$fToValueCUShort$fToValueCShort$fToValueCUChar$fToValueCSChar$fToValueCChar$fFromValueCDouble$fFromValueCFloat$fFromValueCSUSeconds$fFromValueCUSeconds$fFromValueCTime$fFromValueCClock$fFromValueCUIntMax$fFromValueCIntMax$fFromValueCUIntPtr$fFromValueCIntPtr$fFromValueCBool$fFromValueCULLong$fFromValueCLLong$fFromValueCSigAtomic$fFromValueCWchar$fFromValueCSize$fFromValueCPtrdiff$fFromValueCULong$fFromValueCLong$fFromValueCUInt$fFromValueCInt$fFromValueCUShort$fFromValueCShort$fFromValueCUChar$fFromValueCSChar$fFromValueCChar$fEncodeJSONTagged$fEncodeJSONConst$fEncodeJSONIdentity$fEncodeJSONLast$fEncodeJSONFirst$fEncodeJSONDual$fEncodeJSONWrappedMonoid$fEncodeJSONLast0$fEncodeJSONFirst0$fEncodeJSONMax$fEncodeJSONMin$fEncodeJSONCompose$fToValueTagged$fToValueConst$fToValueIdentity $fToValueLast$fToValueFirst $fToValueDual$fToValueWrappedMonoid$fToValueLast0$fToValueFirst0 $fToValueMax $fToValueMin$fToValueCompose$fFromValueTagged$fFromValueConst$fFromValueIdentity$fFromValueLast$fFromValueFirst$fFromValueDual$fFromValueWrappedMonoid$fFromValueLast0$fFromValueFirst0$fFromValueMax$fFromValueMin$fFromValueCompose snakeCase trainCase toPrimArrayCB fromBytestoText toTextMaybefromText buildCBytes fromCString fromCStringNwithCBytesUnsafe withCBytesallocCBytesUnsafe allocCBytes$fIsStringCBytes $fShowTCBytes$fUnalignedCBytes$fCoArbitraryCBytes$fArbitraryCBytes$fHashableCBytes$fMonoidCBytes$fSemigroupCBytes $fOrdCBytes $fEqCBytes$fNFDataCBytes $fReadCBytes $fShowCBytesMutableByteArray#GHC.WordWord8GHC.IntInt8Word16Int16Word32Int32Word64Int64 GHC.TypesWordIntAddr#template-haskellLanguage.Haskell.TH.SyntaxLitEChar GHC.MaybeNothingGHC.BaseFunctorseqJustelemIndexBytesTrueGHC.ListzipWithscanlscanrGHC.ShowShowMonadfailFalse GHC.ClassesOrd Data.StringIsString ByteArray#PtrForeign.C.TypesCCharCSCharCUCharCShortCUShortCIntCUIntCLongCULongCLLongCULLongCBoolCFloatCDoubleCPtrdiffCSizeCWchar CSigAtomicCClockCTime CUSeconds CSUSecondsCFileCFposCJmpBufCIntPtrCUIntPtrCIntMaxCUIntMaxnullPtrcopyPtrToMutableByteArraysetPtrmovePtrcopyPtr writeOffPtr readOffPtr indexOffPtr subtractPtr advancePtrcloneMutablePrimArrayclonePrimArrayitraversePrimArray_traversePrimArray_replicatePrimArrayAgeneratePrimArrayAreplicatePrimArraygeneratePrimArrayitraversePrimArrayPitraversePrimArraytraversePrimArraymapMaybePrimArraymapMaybePrimArrayAfilterPrimArrayAfilterPrimArray imapPrimArray mapPrimArrayreplicatePrimArrayPgeneratePrimArrayPmapMaybePrimArrayPfilterPrimArrayPtraversePrimArrayPfoldlPrimArrayM'foldlPrimArray'foldlPrimArrayfoldrPrimArray'foldrPrimArraysizeofPrimArrayindexPrimArrayunsafeThawPrimArrayunsafeFreezePrimArrayfreezePrimArraysameMutablePrimArraysizeofMutablePrimArraygetSizeofMutablePrimArray setPrimArray copyPrimArraycopyMutablePrimArraywritePrimArray readPrimArrayshrinkMutablePrimArrayresizeMutablePrimArray newPrimArrayprimArrayToListprimArrayFromListNprimArrayFromListData.Primitive.ByteArraycloneMutableByteArraycloneByteArraycompareByteArrays fillByteArray setByteArray moveByteArraycopyMutableByteArrayToAddrcopyByteArrayToAddrcopyMutableByteArrayToPtrcopyByteArrayToPtrcopyMutableByteArray copyByteArraybyteArrayFromListNbyteArrayFromListfoldrByteArraywriteByteArray readByteArrayindexByteArrayisMutableByteArrayPinnedisByteArrayPinnedshrinkMutableByteArraysizeofMutableByteArraysizeofByteArrayunsafeThawByteArrayunsafeFreezeByteArrayfreezeByteArraygetSizeofMutableByteArrayresizeMutableByteArraysameMutableByteArraymutableByteArrayContentsbyteArrayContentsnewAlignedPinnedByteArraynewPinnedByteArray newByteArray ByteArrayMutableByteArrayGHC.EnumBoundedGHC.RealIntegral integer-gmpGHC.Integer.TypeIntegeri2cDec Data.Bits FiniteBitsFloatDoubledoFmt c_grisu3_spc_grisu3writePositiveDecshow Data.EitherRightLeftData.Traversabletraverse Text.ReadreadscientificallyInternalscientificallyInternal'array_object_)scientific-0.3.6.2-HDoLkL8YC3O28Jlh4HmWvSData.Scientific Scientific commaList' commaVec'