h$t      !"#$%&'()*+,-./012 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 [ \ ] ^_` abcdefghijklmnopqrstuvwxyz{|}~       !!!!!!!!!!!!!!!!!!!!""""""##$$$$$$$$%%%%%%%%%&&''(((((((((()))))))))))))************,%(c) 2009, 2010, 2011 Bryan O'Sullivan BSD-stylebos@serpentine.comportableNone #$text,Mutable array type, for use in the ST monad.textImmutable array type.text&Create an uninitialized mutable array.text-Create an uninitialized mutable pinned array.texttext text*Freeze a mutable array. Do not mutate the  afterwards! textUnchecked read of an immutable array. May return garbage or crash on an out-of-bounds access. text textUnchecked write of a mutable array. May return garbage or crash on an out-of-bounds access. text%Convert an immutable array to a list.textAn empty immutable array.textRun an action in the ST monad and return an immutable array of its result.textRun an action in the ST monad and return an immutable array of its result paired with whatever else the action returns.texttexttext&Copy some elements of a mutable array.text)Copy some elements of an immutable array.textCopy from pointer.textCopy to pointer.textCompare portions of two arrays for equality. No bounds checking is performed.textCompare portions of two arrays. No bounds checking is performed.text DestinationtextDestination offsettextSourcetext Source offsettextCounttextCounttext DestinationtextDestination offsettextSourcetext Source offsettext DestinationtextDestination offsettextSourcetextCounttextSourcetext Source offsettext DestinationtextCount    (c) Bryan O'Sullivan 2009 BSD-stylebos@serpentine.comGHCSafe3 text;An exception type for representing Unicode encoding errors.textCould not decode a byte sequence because it was invalid under the given encoding, or ran out of input in mid-decode.textTried to encode a character that could not be represented under the given encoding, or ran out of input in mid-encode.text A handler for an encoding error.textA handler for a decoding error.textFunction type for handling a coding error. It is supplied with two inputs:A  that describes the error.The input value that caused the error. If the error arose because the end of input was reached or could not be identified precisely, this value will be .,If the handler returns a value wrapped with , that value will be used in the output as the replacement for the invalid input. If it returns &, no value will be used in the output.;Should the handler need to abort processing, it should use  or  an exception (preferably a ). It may use the description provided to construct a more helpful error report.textThrow a  if decoding fails. textReplace an invalid input byte with the Unicode replacement character U+FFFD.!textThrow a  if encoding fails."text?@ABCDEFGHIJKLM@ABCDEFGHIJK89:;>?<=LM (c) 2008, 2009 Tom Harper, (c) 2009 Bryan O'Sullivan, (c) 2009 Duncan Coutts BSD-stylebos@serpentine.com experimentalGHCNoneOPQOPQ (c) 2014 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHC Safe-Inferred3 RSTUVWXYZ WTUVRSZYX %(c) 2009, 2010, 2011 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalportableNone M^textJust like unsafePerformIO, but we inline it. Big performance gains as it exposes lots of things to further inlining.  Very unsafe. In particular, you should do no memory allocation inside an ^ block._text Allow an  computation to be deferred lazily. When passed an action of type  s a7, the action will only be performed when the value of a is demanded.This function is identical to the normal unsafeInterleaveST, but is inlined and hence faster.Note: This operation is highly unsafe, as it can introduce externally visible non-determinism into an  action.^_`_^`(c) 2008, 2009 Tom Harper, (c) 2009, 2010 Bryan O'Sullivan, (c) 2009 Duncan Coutts BSD-stylebos@serpentine.com experimentalGHCNone!btextetextWrite a character into the array at the given offset. Returns the number of  s written.abcdeabcde(c) 2008, 2009 Tom Harper, (c) 2009, 2010 Bryan O'Sullivan, (c) 2009 Duncan Coutts BSD-stylebos@serpentine.com experimentalGHCNone3' ftext5A space efficient, packed, unboxed Unicode text type.htextO(1) The empty f.itextA non-inlined version of h.jtextO(n) Appends one f2 to the other by copying both of them into a new f.ktext Construct a f without invisibly pinning its byte array in memory if its length has dwindled to zero.mtext A useful &-like function for debugging purposes.ntextMap a  to a f -safe value.Unicode +, code points are not included in the set of Unicode scalar values, but are unfortunately admitted as valid 6 values by Haskell. They cannot be represented in a f. This function remaps those code points to the Unicode replacement character (U+FFFD, ''), and leaves other code points unchanged.otext:Apply a function to the first element of an optional pair.ptextChecked multiplication. Calls  if the result would overflow.qtextChecked multiplication. Calls  if the result would overflow.rtextChecked multiplication. Calls  if the result would overflow.ktextbytearray encoded as UTF-8textoffset in bytes (not in Char!), pointing to a start of UTF-8 sequencetextlength in bytes (not in Char!), pointing to an end of UTF-8 sequence fghijklmnopqr fgklnhijoprqmp7q7r7(c) Roman Leshchinskiy 2008, (c) Bryan O'Sullivan 2009 BSD-stylebos@serpentine.com experimentalportableNone*!stext,A size in UTF-8 code units (which is bytes).utextThe s of the given code point.vtextThe s of n code points.|textMinimum of two size hints.}textMaximum of two size hints.~text7Compute the maximum size from a size hint, if possible.text7Compute the minimum size from a size hint, if possible.text0Determine the ordering relationship between two ss, or  in the indeterminate case.stuvwxyz{|}~swxy{zuvt|}~(c) Tom Harper 2008-2009, (c) Bryan O'Sullivan 2009, (c) Duncan Coutts 2009, (c) Jasper Van der Jeugt 2011 BSD-stylebos@serpentine.com experimentalGHCNone,textA co-recursive type yielding a single element at a time depending on the internal state it carries.text-Intermediate result in a processing pipeline.text!An intermediate result in a scan.text Strict pair.textRestreaming state.text&Specialised tuple for case conversion.textThe empty stream.2(c) Bryan O'Sullivan 2009, 2012 BSD-stylebos@serpentine.com experimentalGHCNoneX4textO(1) Convert a character into a  Properties - .  = .textO(n) Convert a list into a . Properties - .  = /textO(n) Convert a  into a list. Properties  . 0 = 1textStream the UTF-8-like packed encoding used by GHC to represent constant strings in generated code.This encoding uses the byte sequence "xc0x80" to represent NUL, and the string is NUL-terminated. Properties  - .  addr = 'Data.Text.Show.unpackCString' addr#textO(n)0 Adds a character to the front of a Stream Char. Properties  - .  c . 0 = 2 ctextO(n)) Adds a character to the end of a stream. Properties  - .  c . 0 = 3 ctextO(n)! Appends one Stream to the other. Properties  - ( (0 t1) (0 t2)) = 4 t1 t2textO(1)" Returns the first character of a  , which must be non-empty. This is a partial function, consider using . Properties   . 0 = 5textO(1)0 Returns the first character and remainder of a  , or  if empty. Properties  67 89 .  . 0 = 67 89 . :  67 (- . 8;) .  . 0 = 67 8; . :textO(n)! Returns the last character of a  , which must be non-empty. Properties   . 0 = <textO(1), Returns all characters after the head of a  , which must be non-empty. This is a partial function, consider using . Properties  - .  . 0 = =textO(1)) Returns all but the last character of a  , which must be non-empty. Properties  - .  . 0 = >textO(1) Tests whether a   is empty or not. Properties   . 0 = ?textO(n). Returns the number of characters in a string.textO(n): Compares the count of characters in a string to a number.This function gives the same answer as comparing against the result of , but can short circuit if the count of characters is greater than the number or if the stream can't possibly be as long as the number supplied, and hence be more efficient.textO(n)8 Indicate whether a string contains exactly one element. Properties   . 0 = @textO(n)  f  xs is the   obtained by applying f to each element of xs. Properties  - .  f . 0 = A ftextO(n) Take a character and place it between each of the characters of a 'Stream Char'. Properties  - .  c . 0 = B ctextO(n) Convert a string to folded case. This function is mainly useful for performing caseless (or case insensitive) string comparisons. A string x" is a caseless match for a string y if and only if:  x ==  yThe result string may be longer than the input string, and may differ from applying  to the input string. For instance, the Armenian small ligature men now (U+FB13) is case folded to the bigram men now (U+0574 U+0576), while the micro sign (U+00B5) is case folded to the Greek small letter letter mu (U+03BC) instead of itself.textO(n) Convert a string to upper case, using simple case conversion. The result string may be longer than the input string. For instance, the German eszett (U+00DF) maps to the two-letter sequence SS. Properties  - .  . 0 = CtextO(n) Convert a string to lower case, using simple case conversion. The result string may be longer than the input string. For instance, the Latin capital letter I with dot above (U+0130) maps to the sequence Latin small letter i (U+0069) followed by combining dot above (U+0307). Properties  - .  . 0 = DtextO(n)? Convert a string to title case, using simple case conversion.The first letter of the input is converted to title case, as is every subsequent letter that immediately follows a non-letter. Every letter that immediately follows another letter is converted to lower case.The result string may be longer than the input string. For example, the Latin small ligature  (U+FB02) is converted to the sequence Latin capital letter F (U+0046) followed by Latin small letter l (U+006C).Note: this function does not take language or culture specific rules into account. For instance, in English, different style guides disagree on whether the book name "The Hill of the Red Fox" is correctly title cased@but this function will capitalize every word. Properties  - .  . 0 = Etextfoldl, applied to a binary operator, a starting value (typically the left-identity of the operator), and a , reduces the 0 using the binary operator, from left to right. Properties   f z0 . 0 = F f z0textA strict version of foldl. Properties   f z0 . 0 = G f z0textfoldl1 is a variant of foldl that has no starting value argument, and thus must be applied to non-empty Streams. Properties   f . 0 = H ftextA strict version of foldl1. Properties   f . 0 = I ftext, applied to a binary operator, a starting value (typically the right-identity of the operator), and a stream, reduces the stream using the binary operator, from right to left. Properties   f z0 . 0 = J f z0textfoldr1 is a variant of  that has no starting value argument, and thus must be applied to non-empty streams. Properties   f . 0 = K ftextintercalate str strs inserts the stream str in between the streams strs and concatenates the result. Properties   s =  .  stextO(n) Concatenate a list of streams. Properties - .  . 67 0 = LtextMap a function over a stream that results in a stream and concatenate the results. Properties - .  (M0 . f) . 0 = N ftextO(n) any p .xs determines if any character in the stream xs satisfies the predicate p. Properties  f . M0 = O ftextO(n) all p 'xs determines if all characters in the Text xs satisfy the predicate p. Properties  f . M0 = P ftextO(n) maximum returns the maximum value from a stream, which must be non-empty. Properties  . M0 = QtextO(n)* minimum returns the minimum value from a Text, which must be non-empty. Properties  . M0 = RtextO(n)  is similar to , but returns a stream of successive reduced values from the left. Conceptually, if we write the input stream as a list then we have: scanl f z [x1, x2, ...] == [z, z 'f' x1, (z 'f' x1) 'f' x2, ...] Properties  ( f z xs) = z  ( f z xs) =  f z xstextO(n)  n c is a   of length n with c the value of every element.textO(n*m)  n t is a   consisting of the input t repeated n times.textO(n), where n is the length of the result. The unfoldr function is analogous to the List . unfoldr builds a stream from a seed value. The function takes the element and returns Nothing if it is done producing the stream or returns Just (a,b), in which case, a is the next Char in the string, and b is the seed value for further production. Properties - .  f z = S f ztextO(n) Like ,  builds a stream from a seed value. However, the length of the result is limited by the first argument to (. This function is more efficient than ( when the length of the result is known. Properties - ( n f z) = T n f ztextO(n)  n, applied to a stream, returns the prefix of the stream of length n, or the stream itself if n+ is greater than the length of the stream. Properties - .  n . 0 = U ntextO(n)  n, applied to a stream, returns the suffix of the stream after the first n$ characters, or the empty stream if n+ is greater than the length of the stream. Properties - .  n . 0 = V ntext, applied to a predicate p and a stream, returns the longest prefix (possibly empty) of elements that satisfy p. Properties - .  p . 0 = W ptext p xs$ returns the suffix remaining after  p xs. Properties - .  p . 0 = X ptextO(n) The  function takes two s and returns 4 if and only if the first is a prefix of the second. Properties   (0 t1) (0 t2) = Y t1 t2textO(n) $ is the stream membership predicate. Properties   c . 0 = Z ctextO(n) The  function takes a predicate and a stream, and returns the first element in matching the predicate, or  if there is no such element. Properties   p . 0 = [ ptextO(n)4 Stream index (subscript) operator, starting from 0. Properties   (0 t) n = \ t ntextO(n) , applied to a predicate and a stream, returns a stream containing those characters that satisfy the predicate. Properties  - .  p . 0 = ] ptextThe  function takes a predicate and a stream and returns the index of the first element in the stream satisfying the predicate. Properties  p . 0 = ^ ptextzipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function. Properties  - ( f (0 t1) (0 t2)) = _ f t1 t2textO(n) The  function returns the number of times the query element appears in the given stream. Properties  c . 0 = ` c55%(c) 2009, 2010, 2011 Bryan O'Sullivan BSD-stylebos@serpentine.comportableNone_ textO(1) A variant of  for non-empty f.  omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the f is non-empty.textO(1) A variant of  for non-empty f.  omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the f is non-empty.textO(1) Iterate (unsafely) one step forwards through a UTF-8 array, returning the current character and the delta to add to give the next offset to iterate at.texttextO(1) Iterate one step through a UTF-8 array, returning the delta to add to give the next offset to iterate at.textO(1) Iterate one step backwards through a UTF-8 array, returning the current character and the delta to add (i.e. a negative number) to give the next offset to iterate at.texttextO(1) Iterate one step backwards through a UTF-8 array, returning the delta to add (i.e. a negative number) to give the next offset to iterate at.textO(1) Return the length of a f in units of Word8. This is useful for sizing a target array appropriately before using unsafeCopyToPtr.textO(1) Unchecked take of k Word8s from the front of a f.textO(1) Unchecked drop of k Word8s from the front of a f.^__^(c) Bryan O'Sullivan 2009 BSD-stylebos@serpentine.com experimentalGHCNone atextO(n+m)5 Find the offsets of all non-overlapping indices of needle within haystack.In (unlikely) bad cases, this algorithm's complexity degrades towards O(n*m).textSubstring to search for (needle)textText to search in (haystack)(c) 2011 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNoneb~textFor the sake of performance this function does not check that a char is in ASCII range; it is a responsibility of p.(c) Tom Harper 2008-2009, (c) Bryan O'Sullivan 2009-2010, (c) Duncan Coutts 2009 BSD-stylebos@serpentine.com experimentalGHCNonej textO(n) Convert f into a  . Properties  .  = ab  .  = abtextO(n) Converts f into a  +, but iterates backwards through the text. Properties  .  = ctextO(n) Convert   into a f. Properties  .  = ab  .  = abtextO(n)' Returns the number of characters in a . Properties  .  = dtextO(n) Reverse the characters of a  returning f. Properties  .  = ctextO(n) Perform the equivalent of scanr7 over a list, only with the input and result reversed. Properties  .  f c .  = e f ctextO(n) Like unfoldr,  builds a stream from a seed value. However, the length of the result is limited by the first argument to (. This function is more efficient than unfoldr( when the length of the result is known. Properties  ( n f a) = T n f atextO(n)4 stream index (subscript) operator, starting from 0. Properties  ( t) n = \ t ntextThe  function takes a predicate and a stream and returns the index of the first element in the stream satisfying the predicate. Properties  p .  = ^ ptextO(n) The count function returns the number of times the query element appears in the given stream. Properties  c .  = ` ctextO(n) Like a combination of map and foldl'+. Applies a function to each element of a f, passing an accumulating parameter from left to right, and returns a final f. Properties  g z0 .  = f g z0g(c) 2009-2015 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHC Trustworthy &nAtextO(n) Convert a f into a .textO(n) Convert a null-terminated  2https://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8modified UTF-8 (but with a standard UTF-8 representation of characters from supplementary planes) string to a f. Counterpart to . No validation is performed, malformed input can lead to memory access violation.textO(n)- Convert a null-terminated ASCII string to a f. Counterpart to . No validation is performed, malformed input can lead to memory access violation.textO(1) Convert a character into a Text. Performs replacement on invalid scalar values.(c) Tom Harper 2008-2009, (c) Bryan O'Sullivan 2009, (c) Duncan Coutts 2009, (c) Jasper Van der Jeugt 2011 BSD-stylebos@serpentine.com experimentalportableNoneo8(c) 2009, 2010 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalportableNoneqtextO(n) Convert a lazy - into a 'Stream Char', using UTF-8 encoding.textO(n) Convert a < into a 'Stream Char', using little endian UTF-16 encoding.textO(n) Convert a 9 into a 'Stream Char', using big endian UTF-16 encoding.textO(n) Convert a 9 into a 'Stream Char', using big endian UTF-32 encoding.textO(n) Convert a < into a 'Stream Char', using little endian UTF-32 encoding.textO(n) Convert a   to a lazy . (c) Tom Harper 2008-2009, (c) Bryan O'Sullivan 2009, (c) Duncan Coutts 2009 BSD-stylebos@serpentine.com experimentalportableNonettextO(n) Convert a - into a 'Stream Char', using UTF-8 encoding.textO(n) Convert a < into a 'Stream Char', using little endian UTF-16 encoding.textO(n) Convert a 9 into a 'Stream Char', using big endian UTF-16 encoding.textO(n) Convert a 9 into a 'Stream Char', using big endian UTF-32 encoding.textO(n) Convert a < into a 'Stream Char', using little endian UTF-32 encoding.textO(n) Convert a   to a . (c) 2009, 2010, 2011 Bryan O'Sullivan, (c) 2009 Duncan Coutts, (c) 2008, 2009 Tom Harper (c) 2021 Andrew Lelechenko BSD-stylebos@serpentine.comportable Trustworthy &<text"A stream oriented decoding result.text Decode a & containing 7-bit ASCII encoded text.This is a partial function: it checks that input does not contain anything except ASCII and copies buffer or throws an error otherwise.text Decode a 2 containing Latin-1 (aka ISO-8859-1) encoded text.! is semantically equivalent to -Data.Text.pack . Data.ByteString.Char8.unpackThis is a total function. However, bear in mind that decoding Latin-1 (non-ASCII) characters to UTf-8 requires actual work and is not just buffer copying.text Decode a  containing UTF-8 encoded text.;Surrogate code points in replacement character returned by 9 will be automatically remapped to the replacement char U+FFFD.text$Decode, in a stream oriented way, a : containing UTF-8 encoded text that is known to be valid.If the input contains any invalid UTF-8 data, an exception will be thrown (either by this function or a continuation) that cannot be caught in pure code. For more control over the handling of invalid data, use .text)Decode, in a stream oriented way, a lazy  containing UTF-8 encoded text.text Decode a : containing UTF-8 encoded text that is known to be valid.If the input contains any invalid UTF-8 data, an exception will be thrown that cannot be caught in pure code. For more control over the handling of invalid data, use  or .This is a partial function: it checks that input is a well-formed UTF-8 sequence and copies buffer or throws an error otherwise.text Decode a  containing UTF-8 encoded text.If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.text Decode a  containing UTF-8 encoded text.Any invalid input bytes will be replaced with the Unicode replacement character U+FFFD.textEncode text to a ByteString  using UTF-8 encoding.textEncode text using UTF-8 encoding and escape the ASCII characters using a .Use this function is to implement efficient encoders for text-based formats like JSON or HTML.text!Encode text using UTF-8 encoding.text/Decode text from little endian UTF-16 encoding.text/Decode text from little endian UTF-16 encoding.If the input contains any invalid little endian UTF-16 data, an exception will be thrown. For more control over the handling of invalid data, use .text,Decode text from big endian UTF-16 encoding.text,Decode text from big endian UTF-16 encoding.If the input contains any invalid big endian UTF-16 data, an exception will be thrown. For more control over the handling of invalid data, use .text0Encode text using little endian UTF-16 encoding.text-Encode text using big endian UTF-16 encoding.text/Decode text from little endian UTF-32 encoding.text/Decode text from little endian UTF-32 encoding.If the input contains any invalid little endian UTF-32 data, an exception will be thrown. For more control over the handling of invalid data, use .text,Decode text from big endian UTF-32 encoding.text,Decode text from big endian UTF-32 encoding.If the input contains any invalid big endian UTF-32 data, an exception will be thrown. For more control over the handling of invalid data, use .text0Encode text using little endian UTF-32 encoding.text-Encode text using big endian UTF-32 encoding.(c) 2009, 2010 Bryan O'Sullivan BSD-stylebos@serpentine.comGHCNone text1A type representing a number of UTF-8 code units.textO(n) Create a new f from a  ' by copying the contents of the array.textO(n) Create a new f from a  6 by copying the contents of the NUL-terminated array.textO(1) Return the prefix of the f of n  units in length.If n would cause the f to end inside a code point, the end of the prefix will be advanced by several additional ! units to maintain its validity.textO(1) Return the suffix of the f, with n # units dropped from its beginning.If n would cause the f to begin inside a code point, the beginning of the suffix will be advanced by several additional  unit to maintain its validity.textO(n) Copy a f to an array. The array is assumed to be big enough to hold the contents of the entire f.textO(n)6 Perform an action on a temporary, mutable copy of a f3. The copy is freed as soon as the action returns.textO(n) Make a mutable copy of a f.text Marshal a f into a C string with a trailing NUL byte, encoded as UTF-8 in temporary storage.The temporary storage is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not% be used after this function returns.textO(n) Decode a C string with explicit length, which is assumed to have been encoded as UTF-8. If decoding fails, a UnicodeException is thrown.text Marshal a f into a C string encoded as UTF-8 in temporary storage, with explicit length information. The encoded string may contain NUL bytes, and is not followed by a trailing NUL byte.The temporary storage is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not% be used after this function returns.text source arraytextlength of source array (in  units)text source array  (c) 2009, 2010, 2011, 2012 Bryan O'Sullivan, (c) 2009 Duncan Coutts, (c) 2008, 2009 Tom Harper (c) 2021 Andrew Lelechenko BSD-stylebos@serpentine.comGHC Trustworthy textO(n) Convert a  into a f5. Performs replacement on invalid scalar values, so  .  is not id:unpack (pack "\55555")"\65533"textO(n)$ Adds a character to the front of a f*. This function is more costly than its List counterpart because it requires copying a new array. Performs replacement on invalid scalar values.textO(n)" Adds a character to the end of a f. This copies the entire array in the process. Performs replacement on invalid scalar values.textO(1)" Returns the first character of a f, which must be non-empty. This is a partial function, consider using  instead.textO(1)+ Returns the first character and rest of a f, or  if empty.textO(1)! Returns the last character of a f, which must be non-empty. This is a partial function, consider using  instead.textO(1), Returns all characters after the head of a f, which must be non-empty. This is a partial function, consider using  instead.textO(1)) Returns all but the last character of a f, which must be non-empty. This is a partial function, consider using  instead.textO(1) Returns all but the last character and the last character of a f, or  if empty.textO(1) Tests whether a f is empty or not.textO(n)' Returns the number of characters in a f.text O(min(n,c))& Compare the count of characters in a f to a number.  t c =  ( t) c This function gives the same answer as comparing against the result of , but can short circuit if the count of characters is greater than the number, and hence be more efficient.textO(n)  f t is the f obtained by applying f to each element of t.Example:0let message = pack "I am not angry. Not at all."1T.map (\c -> if c == '.' then '!' else c) message"I am not angry! Not at all!".Performs replacement on invalid scalar values.textO(n) The  function takes a f and a list of fs and concatenates the list after interspersing the first argument between each element of the list.Example::T.intercalate "NI!" ["We", "seek", "the", "Holy", "Grail"] "WeNI!seekNI!theNI!HolyNI!Grail"textO(n) The  function takes a character and places it between the characters of a f.Example:T.intersperse '.' "SHIELD" "S.H.I.E.L.D".Performs replacement on invalid scalar values.textO(n)$ Reverse the characters of a string.Example:T.reverse "desrever" "reversed"textO(m+n)- Replace every non-overlapping occurrence of needle in haystack with  replacement.:This function behaves as though it was defined as follows: (replace needle replacement haystack =  replacement ( needle haystack) As this suggests, each occurrence is replaced exactly once. So if needle occurs in  replacement, that occurrence will not! itself be replaced recursively:replace "oo" "foo" "oo""foo"$In cases where several instances of needle/ overlap, only the first one will be replaced:replace "ofo" "bar" "ofofo""barfo"In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).textO(n)! Convert a string to folded case.This function is mainly useful for performing caseless (also known as case insensitive) string comparisons. A string x" is a caseless match for a string y if and only if: toCaseFold x == toCaseFold yThe result string may be longer than the input string, and may differ from applying  to the input string. For instance, the Armenian small ligature "" (men now, U+FB13) is case folded to the sequence " " (men, U+0574) followed by " " (now, U+0576), while the Greek "" (micro sign, U+00B5) is case folded to "" (small letter mu, U+03BC) instead of itself.textO(n)? Convert a string to lower case, using simple case conversion.The result string may be longer than the input string. For instance, "" (Latin capital letter I with dot above, U+0130) maps to the sequence "i" (Latin small letter i, U+0069) followed by " " (combining dot above, U+0307).textO(n)? Convert a string to upper case, using simple case conversion.The result string may be longer than the input string. For instance, the German "" (eszett, U+00DF) maps to the two-letter sequence "SS".textO(n)? Convert a string to title case, using simple case conversion.The first letter of the input is converted to title case, as is every subsequent letter that immediately follows a non-letter. Every letter that immediately follows another letter is converted to lower case.The result string may be longer than the input string. For example, the Latin small ligature  (U+FB02) is converted to the sequence Latin capital letter F (U+0046) followed by Latin small letter l (U+006C).Note: this function does not take language or culture specific rules into account. For instance, in English, different style guides disagree on whether the book name "The Hill of the Red Fox" is correctly title cased@but this function will capitalize every word.textO(n) Left-justify a string to the given length, using the specified fill character on the right. Performs replacement on invalid scalar values. Examples:justifyLeft 7 'x' "foo" "fooxxxx"justifyLeft 3 'x' "foobar""foobar"textO(n) Right-justify a string to the given length, using the specified fill character on the left. Performs replacement on invalid scalar values. Examples:justifyRight 7 'x' "bar" "xxxxbar"justifyRight 3 'x' "foobar""foobar"textO(n) Center a string to the given length, using the specified fill character on either side. Performs replacement on invalid scalar values. Examples:center 8 'x' "HS" "xxxHSxxx"textO(n) The 2 function transposes the rows and columns of its f) argument. Note that this function uses , , and the list version of transpose, and is thus not very efficient. Examples:transpose ["green","orange"]["go","rr","ea","en","ng","e"]transpose ["blue","red"]["br","le","ud","e"]textO(n) , applied to a binary operator, a starting value (typically the left-identity of the operator), and a f, reduces the f/ using the binary operator, from left to right.textO(n) A strict version of .textO(n) A variant of  that has no starting value argument, and thus must be applied to a non-empty f.textO(n) A strict version of .textO(n) , applied to a binary operator, a starting value (typically the right-identity of the operator), and a f, reduces the f/ using the binary operator, from right to left.=If the binary operator is strict in its second argument, use  instead. is lazy like hJ/ for lists: evaluation actually traverses the f0 from left to right, only as far as it needs to. For example,  can be defined with O(1) complexity using : =head :: Text -> Char head = foldr const (error "head empty") Searches from left to right with short-circuiting behavior can also be defined using  (e.g., , , , ).textO(n) A variant of  that has no starting value argument, and thus must be applied to a non-empty f.textO(n) A strict version of . evaluates as a right-to-left traversal using constant stack space.textO(n) Concatenate a list of fs.textO(n) Map a function over a f that results in a f, and concatenate the results.textO(n)  p t* determines whether any character in the f t satisfies the predicate p.textO(n)  p t+ determines whether all characters in the f t satisfy the predicate p.textO(n) " returns the maximum value from a f, which must be non-empty.textO(n) " returns the minimum value from a f, which must be non-empty.textO(n)  is similar to , but returns a list of successive reduced values from the left. Performs replacement on invalid scalar values. scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...] Properties  ( f z xs) = z  ( f z xs) =  f z xstextO(n)  is a variant of  that has no starting value argument. Performs replacement on invalid scalar values. .scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]textO(n)  is the right-to-left dual of 2. Performs replacement on invalid scalar values. 1scanr f v == reverse . scanl (flip f) v . reversetextO(n)  is a variant of  that has no starting value argument. Performs replacement on invalid scalar values.textO(n) Like a combination of  and +. Applies a function to each element of a f, passing an accumulating parameter from left to right, and returns a final f2. Performs replacement on invalid scalar values.textThe ( function behaves like a combination of  and a strict .; it applies a function to each element of a f, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new f1. Performs replacement on invalid scalar values.textO(n*m)  n t is a f consisting of the input t repeated n times.textO(n), where n" is the length of the result. The $ function is analogous to the List .  builds a f from a seed value. The function takes the element and returns  if it is done producing the f , otherwise  (a,b). In this case, a is the next  in the string, and b is the seed value for further production. Performs replacement on invalid scalar values.textO(n) Like ,  builds a f from a seed value. However, the length of the result should be limited by the first argument to (. This function is more efficient than  when the maximum length of the result is known and correct, otherwise its performance is similar to 1. Performs replacement on invalid scalar values.textO(n)  n, applied to a f, returns the prefix of the f of length n , or the f itself if n) is greater than the length of the Text.textO(n) If t is long enough to contain n characters,  n t9 returns a non-negative number, measuring their size in . Otherwise, if t is shorter, return a non-positive number, which is a negated total count of  available in t. If t is empty or n = 0 , return 0.#This function is used to implement , ,  and > and is useful on its own in streaming and parsing libraries.textO(n)  n t, returns the suffix remaining after taking n characters from the end of t. Examples:takeEnd 3 "foobar""bar"textO(n)  n, applied to a f, returns the suffix of the f after the first n characters, or the empty f if n$ is greater than the length of the f.textO(n)  n t. returns the prefix remaining after dropping n characters from the end of t. Examples:dropEnd 3 "foobar""foo"textO(n) , applied to a predicate p and a f, returns the longest prefix (possibly empty) of elements that satisfy p.textO(n) , applied to a predicate p and a f, returns the longest suffix (possibly empty) of elements that satisfy p . Examples:takeWhileEnd (=='o') "foo""oo"textO(n)  p t% returns the suffix remaining after  p t.textO(n)  p t returns the prefix remaining after dropping characters that satisfy the predicate p from the end of t. Examples:dropWhileEnd (=='.') "foo...""foo"textO(n)  p t returns the substring remaining after dropping characters that satisfy the predicate p% from both the beginning and end of t.textO(n): Remove leading white space from a string. Equivalent to: dropWhile isSpacetextO(n); Remove trailing white space from a string. Equivalent to: dropWhileEnd isSpacetextO(n) Remove leading and trailing white space from a string. Equivalent to: dropAround isSpacetextO(n)  n t4 returns a pair whose first element is a prefix of t of length n, and whose second is the remainder of the string. It is equivalent to ( n t,  n t).textO(n) , applied to a predicate p and text t, returns a pair whose first element is the longest prefix (possibly empty) of t of elements that satisfy p1, and whose second is the remainder of the text.T.span (=='0') "000AB" ("000","AB")textO(n)  is like , but the prefix returned is over elements that fail the predicate p.T.break (=='c') "180cm" ("180","cm")textO(length of prefix) !, applied to a monadic predicate p , a text t, returns a pair (t1, t2) where t1 is the longest prefix of t whose elements satisfy p, and t2 is the remainder of the text.T.spanM (\c -> state $ \i -> (fromEnum c == i, i+1)) "abcefg" `runState` 97(("abc","efg"),101) is  specialized to ij: -- for all p :: Char -> Bool  p = ik .  ( . p) textO(length of suffix) !, applied to a monadic predicate p , a text t, returns a pair (t1, t2) where t2 is the longest suffix of t whose elements satisfy p, and t1 is the remainder of the text.T.spanEndM (\c -> state $ \i -> (fromEnum c == i, i-1)) "tuvxyz" `runState` 122(("tuv","xyz"),118)  p .  = fmap (lm  ) .  p textO(n)7 Group characters in a string according to a predicate.textO(n)* Group characters in a string by equality.textO(n)* Return all initial segments of the given f, shortest first.textO(n)( Return all final segments of the given f, longest first.textO(m+n) Break a f$ into pieces separated by the first f argument (which cannot be empty), consuming the delimiter. An empty delimiter is invalid, and will cause an error to be raised. 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 intercalate s . splitOn s == id splitOn (singleton c) == split (==c)(Note: the string s$ to split on above cannot be empty.)In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).textO(n) Splits a f 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.split (=='a') "aabbaca"["","","bb","c",""]split (=='a') ""[""]textO(n) Splits a f into components of length k. The last element may be shorter than the other chunks, depending on the length of the input. Examples:chunksOf 3 "foobarbaz"["foo","bar","baz"]chunksOf 4 "haskell.org"["hask","ell.","org"]textO(n) The " function takes a character and a f, and returns & if the element is found in the given f, or  otherwise.textO(n) The " function takes a predicate and a f<, and returns the first element matching the predicate, or  if there is no such element.textO(n) The " function takes a predicate and a f, and returns the pair of fs with elements which do and do not satisfy the predicate, respectively; i.e. 1partition p t == (filter p t, filter (not . p) t)textO(n) , applied to a predicate and a f , returns a f9 containing those characters that satisfy the predicate.textO(n+m) Find the first instance of needle (which must be non-) in haystack=. The first element of the returned tuple is the prefix of haystack before needle. is matched. The second is the remainder of haystack, starting with the match. Examples:breakOn "::" "a::b::c"("a","::b::c")breakOn "/" "foobar" ("foobar","")Laws: append prefix match == haystack where (prefix, match) = breakOn needle haystackIf you need to break a string by a substring repeatedly (e.g. you want to break on every instance of a substring), use , instead, as it has lower startup overhead.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).textO(n+m) Similar to +, but searches from the end of the string.9The first element of the returned tuple is the prefix of haystack( up to and including the last match of needle#. The second is the remainder of haystack, following the match.breakOnEnd "::" "a::b::c"("a::b::","c")textO(n+m)' Find all non-overlapping instances of needle in haystack8. Each element of the returned list consists of a pair:The entire string prior to the kth match (i.e. the prefix)The k1th match, followed by the remainder of the string Examples:breakOnAll "::" ""[]breakOnAll "/" "a/b/c/"+[("a","/b/c/"),("a/b","/c/"),("a/b/c","/")]In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).The needle parameter may not be empty.textO(n) f- index (subscript) operator, starting from 0.textO(n) The " function takes a predicate and a f4 and returns the index of the first element in the f satisfying the predicate.textO(n+m) The  function returns the number of times the query string appears in the given f. An empty query string is invalid, and will cause an error to be raised.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).textO(n)  takes two fs and returns a list of corresponding pairs of bytes. If one input f* is short, excess elements of the longer f1 are discarded. This is equivalent to a pair of  operations.textO(n)  generalises  by zipping with the function given as the first argument, instead of a tupling function. Performs replacement on invalid scalar values.textO(n) Breaks a f' up into a list of words, delimited by s representing white space.textO(n) Breaks a f up into a list of fs at newline characters '\n' (LF, line feed). The resulting strings do not contain newlines. does not treat '\r'. (CR, carriage return) as a newline character.textO(n)= Joins lines, after appending a terminating newline to each.textO(n)+ Joins words using single space characters.textO(n) The  function takes two fs and returns 4 if and only if the first is a prefix of the second.textO(n) The  function takes two fs and returns 4 if and only if the first is a suffix of the second.textO(n+m) The  function takes two fs and returns  if and only if the first is contained, wholly and intact, anywhere within the second.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).textO(n) Return the suffix of the second string if its prefix matches the entire first string. Examples:stripPrefix "foo" "foobar" Just "bar"stripPrefix "" "baz" Just "baz"stripPrefix "foo" "quux"Nothing%This is particularly useful with the  ViewPatterns extension to GHC, as follows: {-# LANGUAGE ViewPatterns #-} import Data.Text as T fnordLength :: Text -> Int fnordLength (stripPrefix "fnord" -> Just suf) = T.length suf fnordLength _ = -1textO(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.If the strings do not have a common prefix or either one is empty, this function returns . Examples:!commonPrefixes "foobar" "fooquux"Just ("foo","bar","quux") commonPrefixes "veeble" "fetzer"NothingcommonPrefixes "" "baz"NothingtextO(n) Return the prefix of the second string if its suffix matches the entire first string. Examples:stripSuffix "bar" "foobar" Just "foo"stripSuffix "" "baz" Just "baz"stripSuffix "foo" "quux"Nothing%This is particularly useful with the  ViewPatterns extension to GHC, as follows: {-# LANGUAGE ViewPatterns #-} import Data.Text as T quuxLength :: Text -> Int quuxLength (stripSuffix "quux" -> Just pre) = T.length pre quuxLength _ = -1textO(n) Make a distinct copy of the given string, sharing no storage with the original string.As an example, suppose you read a large string, of which you need only a small portion. If you do not use , the entire original array will be kept alive in memory by the smaller string. Making a copy "breaks the link" to the original array, allowing it to be garbage collected if there are no other live references to it.texttexttextThis instance preserves data abstraction at the cost of inefficiency. We omit reflection services for the sake of data abstraction.>This instance was created by copying the updated behavior of Data.Set.no and Data.Map.pq. If you feel a mistake has been made, please feel free to submit improvements.+The original discussion is archived here: https://mail.haskell.org/pipermail/haskell-cafe/2010-January/072379.html0could we get a Data instance for Data.Text.Text?5The followup discussion that changed the behavior of no and pq is archived here: https://mail.haskell.org/pipermail/libraries/2012-August/018366.html)Proposal: Allow gunfold for Data.Map, ...texttext.Performs replacement on invalid scalar values::set -XOverloadedLists['\55555'] :: Text"\65533"text.Performs replacement on invalid scalar values::set -XOverloadedStrings"\55555" :: Text"\65533"texttextneedle? to search for. If this string is empty, an error will occur.text replacement to replace needle with.texthaystack in which to search.textString to split on. If this string is empty, an error will occur.text Input text.textneedle to search fortexthaystack in which to searchfhjfhj5(c) 2010, 2011 Bryan O'Sullivan BSD-stylebos@serpentine.comGHC Trustworthy #textRead some text. If the read succeeds, return its value and the remaining text, otherwise an error message.textRead a decimal integer. The input must begin with at least one decimal digit, and is consumed until a non-digit or end of string is reached.This function does not handle leading sign characters. If you need to handle signed input, use  .Note: For fixed-width integer types, this function does not attempt to detect overflow, so a sufficiently long input may give incorrect results. If you are worried about overflow, use  for your result type.text?Read a hexadecimal integer, consisting of an optional leading "0x" followed by at least one hexadecimal digit. Input is consumed until a non-hex-digit or end of string is reached. This function is case insensitive.This function does not handle leading sign characters. If you need to handle signed input, use  .Note: For fixed-width integer types, this function does not attempt to detect overflow, so a sufficiently long input may give incorrect results. If you are worried about overflow, use  for your result type.text)Read an optional leading sign character ('-' or '+';) and apply it to the result of applying the given reader.textRead a rational number.This function 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 ): rational "3" == Right (3.0, "") rational "3.1" == Right (3.1, "") rational "3e4" == Right (30000.0, "") rational "3.1e4" == Right (31000.0, "") rational ".3" == Left "input does not start with a digit" rational "e3" == Left "input does not start with a digit"Examples of differences from : rational "3.foo" == Right (3.0, ".foo") rational "3e" == Right (3.0, "e")textRead a rational number.8The syntax accepted by this function is the same as for .Note0: This function is almost ten times faster than !, but is slightly less accurate.The  type supports about 16 decimal places of accuracy. For 94.2% of numbers, this function and  give identical results, but for the remaining 5.8%, this function loses precision around the 15th decimal place. For 0.001% of numbers, this function will lose precision at the 13th or 14th decimal place.(c) 2009, 2010 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNone3O textCheck the invariant strictly.textCheck the invariant lazily.text)Display the internal structure of a lazy .textSmart constructor for %. Guarantees the data type invariant.textSmart constructor for .textConsume the chunks of a lazy  with a natural right fold.textConsume the chunks of a lazy 8 with a strict, tail-recursive, accumulating left fold.text=Currently set to 16 KiB, less the memory management overhead.textCurrently set to 128 bytes, less the memory management overhead.textThe memory management overhead. Currently this is tuned for GHC only.r(c) 2013 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNone3(c) 2009, 2010 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNone textO(n+m)5 Find the offsets of all non-overlapping indices of needle within haystack.This function is strict in needle2, and lazy (as far as possible) in the chunks of haystack.In (unlikely) bad cases, this algorithm's complexity degrades towards O(n*m).textSubstring to search for (needle)textText to search in (haystack) (c) 2009, 2010 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNone|textO(n) Convert a  into a 'Stream Char'.textO(n) Convert a 'Stream Char' into a , using the given chunk size.textO(n) Convert a 'Stream Char' into a  , using .textO(n), Returns the number of characters in a text.textO(n) Like unfoldr,  builds a stream from a seed value. However, the length of the result is limited by the first argument to (. This function is more efficient than unfoldr( when the length of the result is known.textO(n)4 stream index (subscript) operator, starting from 0.textO(n) The count function returns the number of times the query element appears in the given stream.!(c) 2009, 2010 Bryan O'Sullivan BSD-stylebos@serpentine.comportable Trustworthytext Decode a  ByteString& containing 7-bit ASCII encoded text.text Decode a  ByteString2 containing Latin-1 (aka ISO-8859-1) encoded text.text Decode a  ByteString containing UTF-8 encoded text.text Decode a  ByteString: containing UTF-8 encoded text that is known to be valid.If the input contains any invalid UTF-8 data, an exception will be thrown that cannot be caught in pure code. For more control over the handling of invalid data, use  or .text Decode a  ByteString containing UTF-8 encoded text..If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.Note: this function is not lazy, as it must decode its entire input before it can return a result. If you need lazy (streaming) decoding, use  in lenient mode.text!Encode text using UTF-8 encoding.textEncode text to a ByteString  using UTF-8 encoding.textEncode text using UTF-8 encoding and escape the ASCII characters using a .Use this function is to implement efficient encoders for text-based formats like JSON or HTML.text/Decode text from little endian UTF-16 encoding.text/Decode text from little endian UTF-16 encoding.If the input contains any invalid little endian UTF-16 data, an exception will be thrown. For more control over the handling of invalid data, use .text,Decode text from big endian UTF-16 encoding.text,Decode text from big endian UTF-16 encoding.If the input contains any invalid big endian UTF-16 data, an exception will be thrown. For more control over the handling of invalid data, use .text0Encode text using little endian UTF-16 encoding.text-Encode text using big endian UTF-16 encoding.text/Decode text from little endian UTF-32 encoding.text/Decode text from little endian UTF-32 encoding.If the input contains any invalid little endian UTF-32 data, an exception will be thrown. For more control over the handling of invalid data, use .text,Decode text from big endian UTF-32 encoding.text,Decode text from big endian UTF-32 encoding.If the input contains any invalid big endian UTF-32 data, an exception will be thrown. For more control over the handling of invalid data, use .text0Encode text using little endian UTF-32 encoding.text-Encode text using big endian UTF-32 encoding.%(c) 2009, 2010, 2012 Bryan O'Sullivan BSD-stylebos@serpentine.comGHC Trustworthy j?textO(n) Convert a  into a .2Performs replacement on invalid scalar values, so  .  is not id:4Data.Text.Lazy.unpack (Data.Text.Lazy.pack "\55555")"\65533"textO(n) Convert a  into a .textO(1) Convert a character into a Text. Performs replacement on invalid scalar values.textO(c) Convert a list of strict fs into a lazy .textO(n) Convert a lazy  into a list of strict fs.textO(n) Convert a lazy  into a strict f.textO(c) Convert a strict f into a lazy .textO(1)$ Adds a character to the front of a .textO(n)" Adds a character to the end of a 0. This copies the entire array in the process.textO(n/c) Appends one  to another.textO(1)+ Returns the first character and rest of a , or  if empty.textO(1)" Returns the first character of a , which must be non-empty. This is a partial function, consider using  instead.textO(1), Returns all characters after the head of a , which must be non-empty. This is a partial function, consider using  instead.textO(n/c)) Returns all but the last character of a , which must be non-empty. This is a partial function, consider using  instead.textO(n/c) Returns the  and  of a , or  if empty.It is no faster than using  and .textO(1) Tests whether a  is empty or not.textO(n/c)! Returns the last character of a , which must be non-empty. This is a partial function, consider using  instead.textO(n)' Returns the number of characters in a .text O(min(n,c))& Compare the count of characters in a  to a number.  t c =  ( t) c This function gives the same answer as comparing against the result of , but can short circuit if the count of characters is greater than the number, and hence be more efficient.textO(n)  f t is the  obtained by applying f to each element of t1. Performs replacement on invalid scalar values.textO(n) The  function takes a  and a list of s and concatenates the list after interspersing the first argument between each element of the list.textO(n) The  function takes a character and places it between the characters of a 1. Performs replacement on invalid scalar values.textO(n) Left-justify a string to the given length, using the specified fill character on the right. Performs replacement on invalid scalar values. Examples: justifyLeft 7 'x' "foo" == "fooxxxx" justifyLeft 3 'x' "foobar" == "foobar"textO(n) Right-justify a string to the given length, using the specified fill character on the left. Performs replacement on invalid scalar values. Examples: justifyRight 7 'x' "bar" == "xxxxbar" justifyRight 3 'x' "foobar" == "foobar"textO(n) Center a string to the given length, using the specified fill character on either side. Performs replacement on invalid scalar values. Examples: center 8 'x' "HS" = "xxxHSxxx"textO(n) The 2 function transposes the rows and columns of its ) argument. Note that this function uses , , and the list version of transpose, and is thus not very efficient.textO(n)  t returns the elements of t in reverse order.textO(m+n)- Replace every non-overlapping occurrence of needle in haystack with  replacement.:This function behaves as though it was defined as follows: (replace needle replacement haystack =  replacement ( needle haystack) As this suggests, each occurrence is replaced exactly once. So if needle occurs in  replacement, that occurrence will not! itself be replaced recursively:  replace "oo" "foo" "oo" == "foo"$In cases where several instances of needle/ overlap, only the first one will be replaced: &replace "ofo" "bar" "ofofo" == "barfo"In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).textO(n)! Convert a string to folded case.This function is mainly useful for performing caseless (or case insensitive) string comparisons. A string x" is a caseless match for a string y if and only if: toCaseFold x == toCaseFold yThe result string may be longer than the input string, and may differ from applying  to the input string. For instance, the Armenian small ligature men now (U+FB13) is case folded to the bigram men now (U+0574 U+0576), while the micro sign (U+00B5) is case folded to the Greek small letter letter mu (U+03BC) instead of itself.textO(n)? Convert a string to lower case, using simple case conversion.The result string may be longer than the input string. For instance, the Latin capital letter I with dot above (U+0130) maps to the sequence Latin small letter i (U+0069) followed by combining dot above (U+0307).textO(n)? Convert a string to upper case, using simple case conversion.The result string may be longer than the input string. For instance, the German eszett (U+00DF) maps to the two-letter sequence SS.textO(n)? Convert a string to title case, using simple case conversion.The first letter of the input is converted to title case, as is every subsequent letter that immediately follows a non-letter. Every letter that immediately follows another letter is converted to lower case.The result string may be longer than the input string. For example, the Latin small ligature  (U+FB02) is converted to the sequence Latin capital letter F (U+0046) followed by Latin small letter l (U+006C).Note: this function does not take language or culture specific rules into account. For instance, in English, different style guides disagree on whether the book name "The Hill of the Red Fox" is correctly title cased@but this function will capitalize every word.textO(n) , applied to a binary operator, a starting value (typically the left-identity of the operator), and a , reduces the / using the binary operator, from left to right.textO(n) A strict version of .textO(n) A variant of  that has no starting value argument, and thus must be applied to a non-empty .textO(n) A strict version of .textO(n) , applied to a binary operator, a starting value (typically the right-identity of the operator), and a , reduces the / using the binary operator, from right to left. is lazy like hJ/ for lists: evaluation actually traverses the 0 from left to right, only as far as it needs to. For example,  can be defined with O(1) complexity using : =head :: Text -> Char head = foldr const (error "head empty") textO(n) A variant of  that has no starting value argument, and thus must be applied to a non-empty .textO(n) Concatenate a list of s.textO(n) Map a function over a  that results in a , and concatenate the results.textO(n)  p t* determines whether any character in the  t satisfies the predicate p.textO(n)  p t+ determines whether all characters in the  t satisfy the predicate p.textO(n) " returns the maximum value from a , which must be non-empty.textO(n) " returns the minimum value from a , which must be non-empty.textO(n)  is similar to , but returns a list of successive reduced values from the left. Performs replacement on invalid scalar values. scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...] Note that $last (scanl f z xs) == foldl f z xs.textO(n)  is a variant of  that has no starting value argument. Performs replacement on invalid scalar values. .scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]textO(n)  is the right-to-left dual of 2. Performs replacement on invalid scalar values. 1scanr f v == reverse . scanl (flip f) v . reversetextO(n)  is a variant of  that has no starting value argument. Performs replacement on invalid scalar values.textO(n) Like a combination of  and +. Applies a function to each element of a , passing an accumulating parameter from left to right, and returns a final 2. Performs replacement on invalid scalar values.textThe ( function behaves like a combination of  and a strict .; it applies a function to each element of a , passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new 1. Performs replacement on invalid scalar values.text x is an infinite , with x the value of every element.textO(n*m)  n t is a  consisting of the input t repeated n times.text ties a finite, non-empty  into a circular one, or equivalently, the infinite repetition of the original .text f x returns an infinite  of repeated applications of f to x: %iterate f x == [x, f x, f (f x), ...]textO(n), where n" is the length of the result. The $ function is analogous to the List .  builds a  from a seed value. The function takes the element and returns  if it is done producing the  , otherwise  (a,b). In this case, a is the next  in the string, and b is the seed value for further production. Performs replacement on invalid scalar values.textO(n) Like ,  builds a  from a seed value. However, the length of the result should be limited by the first argument to (. This function is more efficient than  when the maximum length of the result is known and correct, otherwise its performance is similar to 1. Performs replacement on invalid scalar values.textO(n)  n, applied to a , returns the prefix of the  of length n , or the  itself if n) is greater than the length of the Text.textO(n)  n t, returns the suffix remaining after taking n characters from the end of t. Examples: takeEnd 3 "foobar" == "bar"textO(n)  n, applied to a , returns the suffix of the  after the first n characters, or the empty  if n$ is greater than the length of the .textO(n)  n t. returns the prefix remaining after dropping n characters from the end of t. Examples: dropEnd 3 "foobar" == "foo"textO(n) , applied to a predicate p and a , returns the longest prefix (possibly empty) of elements that satisfy p.textO(n) , applied to a predicate p and a , returns the longest suffix (possibly empty) of elements that satisfy p . Examples: "takeWhileEnd (=='o') "foo" == "oo"textO(n)  p t% returns the suffix remaining after  p t.textO(n)  p t returns the prefix remaining after dropping characters that satisfy the predicate p from the end of t. Examples: &dropWhileEnd (=='.') "foo..." == "foo"textO(n)  p t returns the substring remaining after dropping characters that satisfy the predicate p% from both the beginning and end of t.textO(n): Remove leading white space from a string. Equivalent to: dropWhile isSpacetextO(n); Remove trailing white space from a string. Equivalent to: dropWhileEnd isSpacetextO(n) Remove leading and trailing white space from a string. Equivalent to: dropAround isSpacetextO(n)  n t4 returns a pair whose first element is a prefix of t of length n, and whose second is the remainder of the string. It is equivalent to ( n t,  n t).textO(n+m) Find the first instance of needle (which must be non-) in haystack=. The first element of the returned tuple is the prefix of haystack before needle. is matched. The second is the remainder of haystack, starting with the match. Examples: breakOn "::" "a::b::c" ==> ("a", "::b::c") breakOn "/" "foobar" ==> ("foobar", "")Laws: append prefix match == haystack where (prefix, match) = breakOn needle haystackIf you need to break a string by a substring repeatedly (e.g. you want to break on every instance of a substring), use , instead, as it has lower startup overhead.This function is strict in its first argument, and lazy in its second.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).textO(n+m) Similar to *, but searches from the end of the string.9The first element of the returned tuple is the prefix of haystack( up to and including the last match of needle#. The second is the remainder of haystack, following the match. -breakOnEnd "::" "a::b::c" ==> ("a::b::", "c")textO(n+m)' Find all non-overlapping instances of needle in haystack8. Each element of the returned list consists of a pair:The entire string prior to the kth match (i.e. the prefix)The k1th match, followed by the remainder of the string Examples: breakOnAll "::" "" ==> [] breakOnAll "/" "a/b/c/" ==> [("a", "/b/c/"), ("a/b", "/c/"), ("a/b/c", "/")]This function is strict in its first argument, and lazy in its second.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).The needle parameter may not be empty.textO(n)  is like , but the prefix returned is over elements that fail the predicate p.T.break (=='c') "180cm" ("180","cm")textO(n) , applied to a predicate p and text t, returns a pair whose first element is the longest prefix (possibly empty) of t of elements that satisfy p1, and whose second is the remainder of the text.T.span (=='0') "000AB" ("000","AB")textO(length of prefix) !, applied to a monadic predicate p , a text t, returns a pair (t1, t2) where t1 is the longest prefix of t whose elements satisfy p, and t2 is the remainder of the text.T.spanM (\c -> state $ \i -> (fromEnum c == i, i+1)) "abcefg" `runState` 97(("abc","efg"),101) is  specialized to ij: -- for all p :: Char -> Bool  p = ik .  ( . p) textO(length of suffix) !, applied to a monadic predicate p , a text t, returns a pair (t1, t2) where t2 is the longest suffix of t whose elements satisfy p, and t1 is the remainder of the text.T.spanEndM (\c -> state $ \i -> (fromEnum c == i, i-1)) "tuvxyz" `runState` 122(("tuv","xyz"),118)  p .  = fmap (lm  ) .  p textThe  function takes a  and returns a list of s 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.textThe + function is the non-overloaded version of .textO(n)* Return all initial segments of the given , shortest first.textO(n)( Return all final segments of the given , longest first.textO(m+n) Break a $ into pieces separated by the first  argument (which cannot be an empty string), consuming the delimiter. An empty delimiter is invalid, and will cause an error to be raised. 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 intercalate s . splitOn s == id splitOn (singleton c) == split (==c)(Note: the string s$ to split on above cannot be empty.)This function is strict in its first argument, and lazy in its second.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).textO(n) Splits a  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. split (=='a') "aabbaca" == ["","","bb","c",""] split (=='a') [] == [""]textO(n) Splits a  into components of length k. The last element may be shorter than the other chunks, depending on the length of the input. Examples: chunksOf 3 "foobarbaz" == ["foo","bar","baz"] chunksOf 4 "haskell.org" == ["hask","ell.","org"]textO(n) Breaks a  up into a list of s at newline characters '\n' (LF, line feed). The resulting strings do not contain newlines. does not treat '\r'. (CR, carriage return) as a newline character.textO(n) Breaks a ' up into a list of words, delimited by s representing white space.textO(n)= Joins lines, after appending a terminating newline to each.textO(n)+ Joins words using single space characters.textO(n) The  function takes two s and returns 4 if and only if the first is a prefix of the second.textO(n) The  function takes two s and returns 4 if and only if the first is a suffix of the second.textO(n+m) The  function takes two s and returns  if and only if the first is contained, wholly and intact, anywhere within the second.This function is strict in its first argument, and lazy in its second.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).textO(n) Return the suffix of the second string if its prefix matches the entire first string. Examples: stripPrefix "foo" "foobar" == Just "bar" stripPrefix "" "baz" == Just "baz" stripPrefix "foo" "quux" == Nothing%This is particularly useful with the  ViewPatterns extension to GHC, as follows: {-# LANGUAGE ViewPatterns #-} import Data.Text.Lazy as T fnordLength :: Text -> Int fnordLength (stripPrefix "fnord" -> Just suf) = T.length suf fnordLength _ = -1textO(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.If the strings do not have a common prefix or either one is empty, this function returns . Examples: commonPrefixes "foobar" "fooquux" == Just ("foo","bar","quux") commonPrefixes "veeble" "fetzer" == Nothing commonPrefixes "" "baz" == NothingtextO(n) Return the prefix of the second string if its suffix matches the entire first string. Examples: stripSuffix "bar" "foobar" == Just "foo" stripSuffix "" "baz" == Just "baz" stripSuffix "foo" "quux" == Nothing%This is particularly useful with the  ViewPatterns extension to GHC, as follows: {-# LANGUAGE ViewPatterns #-} import Data.Text.Lazy as T quuxLength :: Text -> Int quuxLength (stripSuffix "quux" -> Just pre) = T.length pre quuxLength _ = -1textO(n) , applied to a predicate and a  , returns a 9 containing those characters that satisfy the predicate.textO(n) The " function takes a predicate and a ?, and returns the first element in matching the predicate, or  if there is no such element.textO(n) The " function takes a character and a , and returns & if the element is found in the given , or  otherwise.textO(n) The " function takes a predicate and a , and returns the pair of s with elements which do and do not satisfy the predicate, respectively; i.e. 1partition p t == (filter p t, filter (not . p) t)textO(n) - index (subscript) operator, starting from 0.textO(n+m) The  function returns the number of times the query string appears in the given . An empty query string is invalid, and will cause an error to be raised.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).textO(n)  takes two s and returns a list of corresponding pairs of bytes. If one input * is short, excess elements of the longer 1 are discarded. This is equivalent to a pair of  operations.textO(n)  generalises  by zipping with the function given as the first argument, instead of a tupling function. Performs replacement on invalid scalar values.texttexttextThis instance preserves data abstraction at the cost of inefficiency. We omit reflection services for the sake of data abstraction.>This instance was created by copying the updated behavior of  Data.Text.stexttext.Performs replacement on invalid scalar values::set -XOverloadedLists!['\55555'] :: Data.Text.Lazy.Text"\65533"text.Performs replacement on invalid scalar values::set -XOverloadedStrings"\55555" :: Data.Text.Lazy.Text"\65533"texttextneedle? to search for. If this string is empty, an error will occur.text replacement to replace needle with.texthaystack in which to search.textneedle to search fortexthaystack in which to searchtextString to split on. If this string is empty, an error will occur.text Input text.5"(c) 2010, 2011 Bryan O'Sullivan BSD-stylebos@serpentine.comGHC Trustworthy vtextRead some text. If the read succeeds, return its value and the remaining text, otherwise an error message.textRead a decimal integer. The input must begin with at least one decimal digit, and is consumed until a non-digit or end of string is reached.This function does not handle leading sign characters. If you need to handle signed input, use  .Note: For fixed-width integer types, this function does not attempt to detect overflow, so a sufficiently long input may give incorrect results. If you are worried about overflow, use  for your result type.text?Read a hexadecimal integer, consisting of an optional leading "0x" followed by at least one hexadecimal digit. Input is consumed until a non-hex-digit or end of string is reached. This function is case insensitive.This function does not handle leading sign characters. If you need to handle signed input, use  .Note: For fixed-width integer types, this function does not attempt to detect overflow, so a sufficiently long input may give incorrect results. If you are worried about overflow, use  for your result type.text)Read an optional leading sign character ('-' or '+';) and apply it to the result of applying the given reader.textRead a rational number.This function 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: rational "3" == Right (3.0, "") rational "3.1" == Right (3.1, "") rational "3e4" == Right (30000.0, "") rational "3.1e4" == Right (31000.0, "") rational ".3" == Left "input does not start with a digit" rational "e3" == Left "input does not start with a digit"Examples of differences from : rational "3.foo" == Right (3.0, ".foo") rational "3e" == Right (3.0, "e")textRead a rational number.8The syntax accepted by this function is the same as for .Note0: This function is almost ten times faster than !, but is slightly less accurate.The  type supports about 16 decimal places of accuracy. For 94.2% of numbers, this function and  give identical results, but for the remaining 5.8%, this function loses precision around the 15th decimal place. For 0.001% of numbers, this function will lose precision at the 13th or 14th decimal place.#(c) 2009, 2010 Bryan O'Sullivan, (c) 2009 Simon Marlow BSD-stylebos@serpentine.com experimentalGHCNone#$xZtextRead a single line of input from a handle, constructing a list of decoded chunks as we go. When we're done, transform them into the destination type.textRead a single chunk of strict text from a buffer. Used by both the strict and lazy implementations of hGetContents.%>(c) 2013 Bryan O'Sullivan (c) 2010 Johan TibellBSD-style (see LICENSE)%Johan Tibell  experimentalportable to Hugs and GHCNone textA Builder# is an efficient way to build lazy Text values. There are several functions for constructing builders, but only one to inspect them: to extract any data, you have to turn them into lazy Text values using  toLazyText.(Internally, a builder constructs a lazy Text by filling arrays piece by piece. As each buffer is filled, it is 'popped' off, to become a new chunk of the resulting lazy Text,. All this is hidden from the user of the Builder.textO(1). A Builder& taking a single character, satisfying  ( c) =  ctextO(1). A Builder taking a f , satisfying  ( t) =  [t]textO(1). A Builder taking a String , satisfying  ( s) =  [S.pack s].Performs replacement on invalid scalar values:fromString "\55555""\65533"textO(1). A Builder taking a lazy Text , satisfying  ( t) = ttextO(n). Extract a lazy Text from a Builder with a default buffer size. The construction work takes place if and when the relevant part of the lazy Text is demanded.textO(n). Extract a lazy Text from a Builder, using the given size for the initial buffer. The construction work takes place if and when the relevant part of the lazy Text is demanded.If the initial buffer is too small to hold all data, subsequent buffers will be the default buffer size.textO(1). Pop the strict Text we have constructed so far, if any, yielding a new chunk in the result lazy Text.textEnsure that there are at least n many elements available.text Ensure that n+ many elements are available, and then use f) to write some elements into the memory.text.Performs replacement on invalid scalar values::set -XOverloadedStrings"\55555" :: Builder"\65533"  $>(c) 2013 Bryan O'Sullivan (c) 2010 Johan TibellBSD-style (see LICENSE)%Johan Tibell portable to Hugs and GHC Trustworthy &(c) 2011 MailRank, Inc. BSD-stylebos@serpentine.com experimentalGHCNonetext%Unsafe conversion for decimal digits.text The normal 4 function with right associativity instead of left.4' TrustworthyV('(c) The University of Glasgow 1994-2002see libraries/base/LICENSE Trustworthy text0Control the rendering of floating point numbers.textScientific notation (e.g. 2.3e123).textStandard decimal notation.text(Use decimal notation for values between 0.1 and  9,999,999$, and scientific notation otherwise.textShow a signed  value to full precision, using standard decimal notation for arguments whose absolute value lies between 0.1 and  9,999,999$, and scientific notation otherwise.textEncode a signed  according to $ and optionally requested precision.This corresponds to the show{E,F,G}Float operations provided by base's Numeric module.NOTE: The functions in  base-4.12) changed the serialisation in case of a Just 0 precision; this version of text5 still provides the serialisation as implemented in  base-4.11. The next major version of text! will switch to the more correct  base-4.12 serialisation.text#Number of decimal places to render.)(c) 2009, 2010 Bryan O'Sullivan, (c) 2009 Simon Marlow BSD-stylebos@serpentine.comGHC Trustworthy#$ textThe  function reads a file and returns the contents of the file as a string. The entire file is read strictly, as with .(Beware that this function (similarly to tu) is locale-dependent. Unexpected system locale may cause your application to read corrupted data or throw runtime exceptions about "invalid argument (invalid byte sequence)" or "invalid argument (invalid character)". This is also slow, because GHC first converts an entire input to UTF-32, which is afterwards converted to UTF-8.If your data is UTF-8, using v  wu) is a much faster and safer alternative.textWrite a string to a file. The file is truncated to zero length before writing begins.text$Write a string to the end of a file.text Experimental., Read a single chunk of strict text from a . The size of the chunk depends on the amount of input currently buffered.This function blocks only if there is no data available, and EOF has not yet been reached. Once EOF is reached, this function returns an empty string instead of throwing an exception.text!Read the remaining contents of a  as a string. The  is closed once the contents have been read, or if an exception is thrown.Internally, this function reads a chunk at a time from the lower-level buffering abstraction, and concatenates the chunks into a single string once the entire file has been read.As a result, it requires approximately twice as much memory as its result to construct its result. For files more than a half of available RAM in size, this may result in memory exhaustion.text!Read a single line from a handle.textWrite a string to a handle.text2Write a string to a handle, followed by a newline.textThe # function takes a function of type  Text -> Text as its argument. The entire input from the standard input device is passed to this function as its argument, and the resulting string is output on the standard output device.textRead all user input on  as a single string.text&Read a single line of user input from .textWrite a string to .textWrite a string to , followed by a newline.  *(c) 2009, 2010 Bryan O'Sullivan, (c) 2009 Simon Marlow BSD-stylebos@serpentine.comGHC Trustworthy#$@ textRead a file and return its contents as a string. The file is read lazily, as with .(Beware that this function (similarly to tu) is locale-dependent. Unexpected system locale may cause your application to read corrupted data or throw runtime exceptions about "invalid argument (invalid byte sequence)" or "invalid argument (invalid character)". This is also slow, because GHC first converts an entire input to UTF-32, which is afterwards converted to UTF-8.If your data is UTF-8, using !v  xu) is a much faster and safer alternative.textWrite a string to a file. The file is truncated to zero length before writing begins.text$Write a string to the end of a file.text(Lazily read the remaining contents of a . The 7 will be closed after the read completes, or on error.text!Read a single line from a handle.textWrite a string to a handle.text2Write a string to a handle, followed by a newline.textThe # function takes a function of type  Text -> Text as its argument. The entire input from the standard input device is passed (lazily) to this function as its argument, and the resulting string is output on the standard output device.textLazily read all user input on  as a single string.text&Read a single line of user input from .textWrite a string to .textWrite a string to , followed by a newline.  yz{|}~                                               ss4.2345:<=>?@ABCDEFGHIJKLNOPQRSUVWXYZ]_0-dcT\^`fg1ggg.--v/235:<=>?dABcDCEFGHIJKLNOPQRefSTUVWXZ[]\^_Ys 0  - d T \ `!!!!v!!!!!!!!!!!!!!!!/1.234:5=>?<dABcDCEFGHIJKLNOPQRefSTUVWXY][Z\_""""""##%%.%%%%%%%%%%%%%%%&&''(((((((((()u))))))))))))*u***********yyyyyyyyyBy5y=gyySyyyyyyyy!text-2.0.1-Gqa0FVNWhjDLeOotIijsccData.Text.UnsafeData.Text.ArrayData.Text.Encoding.Error%Data.Text.Internal.Builder.Int.Digits.Data.Text.Internal.Builder.RealFloat.Functions#Data.Text.Internal.ByteStringCompat!Data.Text.Internal.Encoding.Utf32%Data.Text.Internal.Fusion.CaseMappingData.Text.Internal.PrimCompat Data.Text.Internal.Encoding.Utf8!Data.Text.Internal.Encoding.Utf16Data.Text.Internal.ReadData.Text.Internal.UnsafeData.Text.Internal.Unsafe.Char Data.TextData.Text.InternalData.Text.Internal.Fusion.SizeData.Text.Internal.Fusion.Types Data.Text.Internal.Fusion.CommonData.Text.Internal.SearchData.Text.Internal.PrivateData.Text.Internal.Fusion)Data.Text.Internal.Encoding.Fusion.Common'Data.Text.Internal.Lazy.Encoding.Fusion"Data.Text.Internal.Encoding.FusionData.Text.EncodingData.Text.ForeignData.Text.ReadData.Text.LazyData.Text.Internal.LazyData.Text.Internal.Lazy.SearchData.Text.Internal.Lazy.FusionData.Text.Lazy.EncodingData.Text.Lazy.ReadData.Text.Internal.IOData.Text.Lazy.BuilderData.Text.Internal.Builder$Data.Text.Internal.Builder.FunctionsData.Text.Lazy.Builder.Int Data.Text.Lazy.Builder.RealFloat Data.Text.IOData.Text.Lazy.IO Data.Char Surrogateunstream singletonpackstreamunpackconssnocappendhead Data.Functorfmap Data.Tuplefstunconssndlasttailinitnull isSingletonmap interspersetoUppertoLowertoTitlefoldlfoldl'foldl1foldl1'foldrfoldr1concatData.Text.Fusion concatMapanyallmaximumminimumunfoldrunfoldrNtakedrop takeWhile dropWhile isPrefixOfelemfindindexfilter findIndexzipWith countChar Data.Functionidreverselengthscanr mapAccumLData.Text.Show Data.ListData.Functor.IdentityIdentity runIdentityData.BifunctorbimapData.SetSetData.MapMapData.Text.Lazy.InternalTextPreludereadFile decodeUtf8Data.ByteStringData.ByteString.Lazybase GHC.IO.UnsafeunsafeDupablePerformIOMArrayMutableByteArrayArray ByteArraynew newPinned newFilledtile unsafeFreeze unsafeIndexgetSizeofMArray unsafeWritetoListemptyrunrun2resizeMshrinkMcopyMcopyIcopyFromPointer copyToPointerequalcompareUnicodeException DecodeError EncodeError OnEncodeError OnDecodeErrorOnError strictDecode lenientDecode strictEncodeignorereplace$fNFDataUnicodeException$fExceptionUnicodeException$fShowUnicodeException$fEqUnicodeExceptiondigitsroundTomkBSwithBSvalidateunI64 upperMapping lowerMapping titleMapping foldMapping word8ToWord# word16ToWord# word32ToWord# wordToWord8# wordToWord16# wordToWord32# DecoderResultAccept IncompleteReject CodePoint DecoderState utf8Lengthutf8LengthByLeaderord2ord3ord4chr2chr3chr4 validate1 validate2 validate3 validate4utf8DecodeStartutf8DecodeContinue$fEqDecoderStateTIParserPrunPIReaderperhaps hexDigitToInt digitToInt$fMonadIParser$fApplicativeIParser$fFunctorIParserinlinePerformIOinlineInterleaveSTunsafeWithForeignPtrord unsafeChr16 unsafeChr8 unsafeChr32empty_texttextPshowTextsafefirstfmulmul64mul32SizeexactlycharSizecodePointsSize exactSizemaxSize betweenSize unionSize unknownSizesmallerlarger upperBound lowerBound compareSizeisEmpty $fNumSize$fEqSize $fShowSizeStreamStepDoneSkipYieldScanScan1Scan2PairS:*:RSRS0RS1RS2RS3CC $fOrdStream $fEqStream streamList unstreamListstreamCString#lengthIcompareLengthI toCaseFold justifyLeftI intercalatescanlreplicateCharI replicateI unfoldrNIfindByindexI findIndexI countCharIIter unsafeHead unsafeTailiter iterArrayiter_ reverseIterreverseIterArray reverseIter_ lengthWord8 takeWord8 dropWord8 $fShowIterindicesspan_ spanAscii_runText reverseStream reverseScanrunpackCString#unpackCStringAscii#restreamUtf16BErestreamUtf16LErestreamUtf32BErestreamUtf32LE streamUtf8 streamUtf16LE streamUtf16BE streamUtf32BE streamUtf32LE streamASCIIDecodingSome decodeASCII decodeLatin1decodeUtf8WithstreamDecodeUtf8streamDecodeUtf8With decodeUtf8'decodeUtf8LenientencodeUtf8BuilderencodeUtf8BuilderEscaped encodeUtf8decodeUtf16LEWith decodeUtf16LEdecodeUtf16BEWith decodeUtf16BE encodeUtf16LE encodeUtf16BEdecodeUtf32LEWith decodeUtf32LEdecodeUtf32BEWith decodeUtf32BE encodeUtf32LE encodeUtf32BE$fShowDecodingI8fromPtrfromPtr0unsafeCopyToPtruseAsPtr asForeignPtr withCStringpeekCStringLenwithCStringLen $fBoundedI8$fEnumI8$fEqI8 $fIntegralI8$fNumI8$fOrdI8$fReadI8$fRealI8$fShowI8unsnoc compareLength justifyLeft justifyRightcenter transposefoldr'scanl1scanr1 mapAccumR replicate measureOfftakeEnddropEnd takeWhileEnd dropWhileEnd dropAround stripStartstripEndstripsplitAtspanbreakspanMspanEndMgroupBygroupinitstailssplitOnsplitchunksOf partitionbreakOn breakOnEnd breakOnAllcountzipwordslinesunlinesunwords isSuffixOf isInfixOf stripPrefixcommonPrefixes stripSuffixcopy$fPrintfArgText$fLiftLiftedRepText $fDataText $fBinaryText $fNFDataText $fIsListText$fIsStringText $fMonoidText$fSemigroupText $fReadText $fOrdText$fEqTextReaderdecimal hexadecimalsignedrationaldoubleEmptyChunkstrictInvariant lazyInvariant showStructurechunk foldrChunks foldlChunksdefaultChunkSizesmallChunkSize chunkOverheadunstreamChunks fromChunkstoChunkstoStrict fromStrictrepeatcycleiterate $fShowText hGetLineWith readChunkBuilderfromText fromString fromLazyText toLazyTexttoLazyTextWithflush ensureFreewriteNappend' $fOrdBuilder $fEqBuilder $fShowBuilder$fIsStringBuilder$fMonoidBuilder$fSemigroupBuilderi2d<>FPFormatExponentFixedGeneric realFloatformatRealFloat$fEnumFPFormat$fReadFPFormat$fShowFPFormat$fBoundedFPFormat writeFile appendFile hGetChunk hGetContentshGetLinehPutStr hPutStrLninteract getContentsgetLineputStrputStrLnGHC.BaseString GHC.MaybeNothingJustGHC.Errerror GHC.ExceptionthrowGHC.STSTGHC.WordWord8GHC.Showshowghc-prim GHC.TypesChar Data.OldListTrueGHC.List GHC.CStringunpackCStringUtf8#addrLenbytestring-0.10.10.0Data.ByteString.Lazy.Internal ByteStringData.ByteString.Internal Data.ByteString.Builder.Internal%Data.ByteString.Builder.Prim.Internal BoundedPrimGHC.PtrPtr GHC.ClassespureFalseinteger-wired-inGHC.Integer.TypeInteger Text.ReadreadDoublemappend GHC.Float RealFloat.GHC.IO.Handle.TypesHandleGHC.IO.Handle.FDstdinstdout