&U        ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M NOPQRSTUVWXYZ[\]^_`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),(c) Bryan O'Sullivan 2009 BSD-stylebos@serpentine.com experimentalGHCNoneBThis is a workaround for poor optimisation in GHC 6.8.2. It fails to notice constant-width shifts, and adds a test and branch to every shift. This imposes about a 10% performance hit.sThese functions are undefined when the amount being shifted by is greater than the size in bits of a machine Int#.*%(c) 2009, 2010, 2011 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalportableNoneBvJust 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. On Hugs this is just unsafePerformIO.  Allow an UC computation to be deferred lazily. When passed an action of type U 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.Notec: This operation is highly unsafe, as it can introduce externally visible non-determinism into an U action.    (c) 2014 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCSafe        2010 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCSafe0RA lazier version of Data.List.intersperse. The other version causes space leaks!p(c) 2008, 2009 Tom Harper, (c) 2009, 2010 Bryan O'Sullivan, (c) 2009 Duncan Coutts BSD-stylebos@serpentine.com experimentalportableSafej(c) 2008, 2009 Tom Harper, (c) 2009 Bryan O'Sullivan, (c) 2009 Duncan Coutts BSD-stylebos@serpentine.com experimentalGHCNoneB'(c) The University of Glasgow 1994-2002see libraries/base/LICENSESafeSafe (c) Bryan O'Sullivan 2009 BSD-stylebos@serpentine.com experimentalGHCSafe0 ;An exception type for representing Unicode encoding errors.uCould not decode a byte sequence because it was invalid under the given encoding, or ran out of input in mid-decode.wTried to encode a character that could not be represented under the given encoding, or ran out of input in mid-encode.  A handler for an encoding error.!A handler for a decoding error."LFunction type for handling a coding error. It is supplied with two inputs:A V 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 W.,If the handler returns a value wrapped with Xc, that value will be used in the output as the replacement for the invalid input. If it returns W&, no value will be used in the output.;Should the handler need to abort processing, it should use Y or Z an exception (preferably a S). It may use the description provided to construct a more helpful error report.#Throw a  if decoding fails.$MReplace an invalid input byte with the Unicode replacement character U+FFFD.%Throw a  if encoding fails.&<Ignore an invalid input, substituting nothing in the output.'-Replace an invalid input with a valid output. !"[#$%&'()*  !"#$%&' "! $#%&'  !"[#$%&'()* %(c) 2009, 2010, 2011 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalportableNone !"BOT,,Mutable array type, for use in the ST monad./Immutable array type.2&Create an uninitialized mutable array.3*Freeze a mutable array. Do not mutate the , afterwards!\FIndicate how many bytes would be used for an array of the given size.4_Unchecked read of an immutable array. May return garbage or crash on an out-of-bounds access.5]Unchecked write of a mutable array. May return garbage or crash on an out-of-bounds access.6%Convert an immutable array to a list.7An empty immutable array.8KRun an action in the ST monad and return an immutable array of its result.9xRun an action in the ST monad and return an immutable array of its result paired with whatever else the action returns.:&Copy some elements of a mutable array.;)Copy some elements of an immutable array.<OCompare portions of two arrays for equality. No bounds checking is performed.,-./01]^_2`3\456789: DestinationDestination offsetSource Source offsetCount; DestinationDestination offsetSource Source offsetFirst offset in destination not to copy (i.e. not length)<FirstOffset into firstSecondOffset into secondCount,-./0123456789:;</01,-.:;7<8963425,-./01]^_2`3\456789:;< p(c) 2008, 2009 Tom Harper, (c) 2009, 2010 Bryan O'Sullivan, (c) 2009 Duncan Coutts BSD-stylebos@serpentine.com experimentalGHCNoneBANWrite a character into the array at the given offset. Returns the number of a s written.=>?@A=>?@A=>?@A=>?@A p(c) 2008, 2009 Tom Harper, (c) 2009, 2010 Bryan O'Sullivan, (c) 2009 Duncan Coutts BSD-stylebos@serpentine.com experimentalGHCNone0 B5A space efficient, packed, unboxed Unicode text type.bSmart constructor.DO(1) The empty B.EA non-inlined version of D.F Construct a BX without invisibly pinning its byte array in memory if its length has dwindled to zero.H A useful c&-like function for debugging purposes.IMap a d to a B -safe value.|UTF-16 surrogate code points are not included in the set of Unicode scalar values, but are unfortunately admitted as valid d6 values by Haskell. They cannot be represented in a B. This function remaps those code points to the Unicode replacement character (U+FFFD, ''), and leaves other code points unchanged.J:Apply a function to the first element of an optional pair.KChecked multiplication. Calls Y if the result would overflow.LChecked multiplication. Calls Y if the result would overflow.MChecked multiplication. Calls Y if the result would overflow.BCbDEFGHIJKLeM BCDEFGHIJKLM BCFGIDEJKMLH BCbDEFGHIJKLeMK7L7M7E(c) Roman Leshchinskiy 2008, (c) Bryan O'Sullivan 2009 BSD-stylebos@serpentine.com experimentalportableNonefLower and upper bounds on size.g Unknown size.TMinimum of two size hints.UMaximum of two size hints.V7Compute the maximum size from a size hint, if possible.W7Compute the maximum size from a size hint, if possible.NfgOPQRShijkTUVWXYlZ NOPQRSTUVWXY NOPQRSTUVWXYNfgOPQRShijkTUVWXYlZ(c) Tom Harper 2008-2009, (c) Bryan O'Sullivan 2009, (c) Duncan Coutts 2009, (c) Jasper Van der Jeugt 2011 BSD-stylebos@serpentine.com experimentalGHCNoneAT_-Intermediate result in a processing pipeline.c!An intermediate result in a scan.f Strict pair.hRestreaming state.m&Specialised tuple for case conversion.mO(n)% Determines if two streams are equal.oThe empty stream.]^_`abcdefghijklmnmnopq]^_`abcdefghijklmnomnfgcdehijkl_`ab]^o ]^_`abcdefghijklmnmnopqg2NoneOTrsturstursturstu(c) Bryan O'Sullivan 2009, 2012 BSD-stylebos@serpentine.com experimentalGHCNoneBOT/oStrict triple.ycStream the UTF-8-like packed encoding used by GHC to represent constant strings in generated code.bThis encoding uses the byte sequence "xc0x80" to represent NUL, and the string is NUL-terminated.zO(n)0 Adds a character to the front of a Stream Char.{O(n)) Adds a character to the end of a stream.|O(n)! Appends one Stream to the other.}O(1)Z Returns the first character of a Text, which must be non-empty. Subject to array fusion.~O(1)C Returns the first character and remainder of a 'Stream Char', or W$ if empty. Subject to array fusion.O(n)I Returns the last character of a 'Stream Char', which must be non-empty.O(1)R Returns all characters after the head of a Stream Char, which must be non-empty.O(1)O Returns all but the last character of a Stream Char, which must be non-empty.O(1)- Tests whether a Stream Char is empty or not.O(n). Returns the number of characters in a string.O(n)N Compares the count of characters in a string to a number. Subject to fusion.HThis 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.O(n)8 Indicate whether a string contains exactly one element.O(n)  f +xs is the Stream Char obtained by applying f to each element of xs.O(n)R Take a character and place it between each of the characters of a 'Stream Char'.O(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 yUThe 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.O(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.O(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).O(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.foldl, applied to a binary operator, a starting value (typically the left-identity of the operator), and a Stream, reduces the Stream using the binary operator, from left to right.A strict version of foldl.qfoldl1 is a variant of foldl that has no starting value argument, and thus must be applied to non-empty Streams.A strict version of foldl1., 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.foldr1 is a variant of o that has no starting value argument, and thus must be applied to non-empty streams. Subject to array fusion.O(n)8 Concatenate a list of streams. Subject to array fusion.SMap a function over a stream that results in a stream and concatenate the results.O(n) any p .xs determines if any character in the stream xs satisfies the predicate p.O(n) all p 'xs determines if all characters in the Text xs satisfy the predicate p.O(n)K maximum returns the maximum value from a stream, which must be non-empty.O(n)* minimum returns the minimum value from a Text, which must be non-empty.O(n), where nM 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.O(n) Like , l 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.O(n)J take 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.O(n)P drop 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."takeWhile, applied to a predicate pW and a stream, returns the longest prefix (possibly empty) of elements that satisfy p. dropWhile p 0xs returns the suffix remaining after takeWhile p xs.O(n) The  function takes two ]s and returns p) iff the first is a prefix of the second.O(n)) elem is the stream membership predicate.O(n) The g function takes a predicate and a stream, and returns the first element in matching the predicate, or W if there is no such element.O(n)4 Stream index (subscript) operator, starting from 0.O(n) q, applied to a predicate and a stream, returns a stream containing those characters that satisfy the predicate.The } function takes a predicate and a stream and returns the index of the first element in the stream satisfying the predicate.qThe qz function takes a predicate and a stream and returns all indices of the elements in the stream satisfying the predicate.zipWith generalises zipZ by zipping with the function given as the first argument, instead of a tupling function.O(n) The U function returns the number of times the query element appears in the given stream.Vorstuvwxyz{|}~vwxyz{|}~q5vwxyz{|}~5vwxyz{|}~Dorstuvwxyz{|}~vwxyz{|}~q(c) Bryan O'Sullivan 2009 BSD-stylebos@serpentine.com experimentalGHCNoneTO(n+m)5 Find the offsets of all non-overlapping indices of needle within haystack{. The offsets returned represent uncorrected indices in the low-level "needle" array, to which its offset must be added.GIn (unlikely) bad cases, this algorithm's complexity degrades towards O(n*m).Substring to search for (needle)Text to search in (haystack)p(c) 2008, 2009 Tom Harper, (c) 2009, 2010 Bryan O'Sullivan, (c) 2009 Duncan Coutts BSD-stylebos@serpentine.com experimentalGHCNoneB  byte to check lower bound upper bound %(c) 2009, 2010, 2011 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalportableNoneB O(1) A variant of  for non-empty B. o omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the B is non-empty.O(1) A variant of  for non-empty B. o omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the B is non-empty.O(1) Iterate (unsafely) one step forwards through a UTF-16 array, returning the current character and the delta to add to give the next offset to iterate at.O(1)l Iterate one step through a UTF-16 array, returning the delta to add to give the next offset to iterate at.O(1) Iterate one step backwards through a UTF-16 array, returning the current character and the delta to add (i.e. a negative number) to give the next offset to iterate at.O(1) Iterate one step backwards through a UTF-16 array, returning the delta to add (i.e. a negative number) to give the next offset to iterate at.O(1) Return the length of a B in units of Word16I. This is useful for sizing a target array appropriately before using unsafeCopyToPtr.O(1) Unchecked take of k Word16s from the front of a B.O(1) Unchecked drop of k Word16s from the front of a B.    (c) 2011 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNoneOTn(c) Tom Harper 2008-2009, (c) Bryan O'Sullivan 2009-2010, (c) Duncan Coutts 2009 BSD-stylebos@serpentine.com experimentalGHCNoneB O(n) Convert a B into a 'Stream Char'.O(n) Convert a B. into a 'Stream Char', but iterate backwards.O(n) Convert a 'Stream Char' into a B.O(n)$ Reverse the characters of a string.O(n) Perform the equivalent of scanr7 over a list, only with the input and result reversed.O(n) Like unfoldr, l 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.O(n)4 stream index (subscript) operator, starting from 0.The } function takes a predicate and a stream and returns the index of the first element in the stream satisfying the predicate.O(n) The countU function returns the number of times the query element appears in the given stream.O(n) Like a combination of map and foldl'+. Applies a function to each element of a BM, passing an accumulating parameter from left to right, and returns a final B. ]^_`ab]^_`ab (c) Tom Harper 2008-2009, (c) Bryan O'Sullivan 2009, (c) Duncan Coutts 2009, (c) Jasper Van der Jeugt 2011 BSD-stylebos@serpentine.com experimentalportableNonei(c) Tom Harper 2008-2009, (c) Bryan O'Sullivan 2009, (c) Duncan Coutts 2009 BSD-stylebos@serpentine.com experimentalportableNoneOTO(n) Convert a - into a 'Stream Char', using UTF-8 encoding.O(n) Convert a < into a 'Stream Char', using little endian UTF-16 encoding.O(n) Convert a 9 into a 'Stream Char', using big endian UTF-16 encoding.O(n) Convert a 9 into a 'Stream Char', using big endian UTF-32 encoding.O(n) Convert a < into a 'Stream Char', using little endian UTF-32 encoding.O(n) Convert a ]  to a . (c) 2009, 2010 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalportableNoneOTO(n) Convert a lazy - into a 'Stream Char', using UTF-8 encoding.O(n) Convert a < into a 'Stream Char', using little endian UTF-16 encoding.O(n) Convert a 9 into a 'Stream Char', using big endian UTF-16 encoding.O(n) Convert a 9 into a 'Stream Char', using big endian UTF-32 encoding.O(n) Convert a < into a 'Stream Char', using little endian UTF-32 encoding.O(n) Convert a ]  to a lazy .O(n) Convert a ]  to a lazy .  +(c) 2009-2015 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHC TrustworthyBO(n) Convert a B into a V. Subject to fusion.O(n)! Convert a literal string into a B. Subject to fusion.<This is exposed solely for people writing GHC rewrite rules.O(1)e Convert a character into a Text. Subject to fusion. Performs replacement on invalid scalar values.v(c) 2009, 2010, 2011 Bryan O'Sullivan, (c) 2009 Duncan Coutts, (c) 2008, 2009 Tom Harper BSD-stylebos@serpentine.com experimentalportable Trustworthy BI"A stream oriented decoding result. Deprecated . Decode a & containing 7-bit ASCII encoded text. Decode a 2 containing Latin-1 (aka ISO-8859-1) encoded text.! is semantically equivalent to -Data.Text.pack . Data.ByteString.Char8.unpack Decode a  containing UTF-8 encoded 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 .$Decode, in a stream oriented way, a  containing UTF-8 encoded 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 . Decode a  containing UTF-8 encoded text.sIf the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.Encode text to a ByteString  using UTF-8 encoding.JEncode 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.!Encode text using UTF-8 encoding./Decode text from little endian UTF-16 encoding./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 .,Decode text from big endian UTF-16 encoding.,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 .0Encode text using little endian UTF-16 encoding.-Encode text using big endian UTF-16 encoding./Decode text from little endian UTF-32 encoding./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 .,Decode text from big endian UTF-32 encoding.,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 .0Encode text using little endian UTF-32 encoding.-Encode text using big endian UTF-32 encoding.!(c) 2009, 2010 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNoneI 2A type representing a number of UTF-16 code units.O(n) Create a new B from a  a' by copying the contents of the array.O(1) Return the prefix of the B of n a units in length.If n would cause the B[ to end inside a surrogate pair, the end of the prefix will be advanced by one additional a unit to maintain its validity.O(1) Return the suffix of the B, with n a# units dropped from its beginning.If n would cause the Bc to begin inside a surrogate pair, the beginning of the suffix will be advanced by one additional a unit to maintain its validity.O(n) Copy a BY to an array. The array is assumed to be big enough to hold the contents of the entire B.O(n)6 Perform an action on a temporary, mutable copy of a B3. The copy is freed as soon as the action returns. O(n) Make a mutable copy of a B. O(n)p Decode a C string with explicit length, which is assumed to have been encoded as UTF-8. If decoding fails, a UnicodeException is thrown.  Marshal a B 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.  source arraylength of source array (in a units)             |(c) 2009, 2010, 2011, 2012 Bryan O'Sullivan, (c) 2009 Duncan Coutts, (c) 2008, 2009 Tom Harper BSD-stylebos@serpentine.com experimentalGHC Trustworthy BDORTcO(n) Compare two B values lexicographically.O(n) Convert a V into a BF. Subject to fusion. Performs replacement on invalid scalar values.O(n)$ Adds a character to the front of a B*. This function is more costly than its List{ counterpart because it requires copying a new array. Subject to fusion. Performs replacement on invalid scalar values.O(n)" Adds a character to the end of a B. This copies the entire array in the process, unless fused. Subject to fusion. Performs replacement on invalid scalar values.O(n) Appends one B2 to the other by copying both of them into a new B. Subject to fusion.O(1)" Returns the first character of a B/, which must be non-empty. Subject to fusion.O(1)+ Returns the first character and rest of a B, or W if empty. Subject to fusion.*Lifted from Control.Arrow and specialized.O(1)! Returns the last character of a B/, which must be non-empty. Subject to fusion.O(1), Returns all characters after the head of a B/, which must be non-empty. Subject to fusion.O(1)) Returns all but the last character of a B/, which must be non-empty. Subject to fusion.O(1) Tests whether a B& is empty or not. Subject to fusion.O(1) Tests whether a B4 contains exactly one character. Subject to fusion.O(n)' Returns the number of characters in a B. Subject to fusion. O(n)& Compare the count of characters in a B! to a number. Subject to fusion.HThis function gives the same answer as comparing against the result of l, but can short circuit if the count of characters is greater than the number, and hence be more efficient.!O(n) ! f t is the B obtained by applying f to each element of tF. Subject to fusion. Performs replacement on invalid scalar values."O(n) The " function takes a B and a list of Bes and concatenates the list after interspersing the first argument between each element of the list.#O(n) The #G function takes a character and places it between the characters of a BF. Subject to fusion. Performs replacement on invalid scalar values.$O(n)7 Reverse the characters of a string. Subject to fusion.%O(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 (V needle haystack) DAs 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"KIn (unlikely) bad cases, this function's time complexity degrades towards O(n*m).&O(n)5 Convert a string to folded case. Subject to fusion.lThis 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 yUThe 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 "t" (men, U+0574) followed by "v" (now, U+0576), while the Greek "" (micro sign, U+00B5) is case folded to "" (small letter mu, U+03BC) instead of itself.'O(n)S Convert a string to lower case, using simple case conversion. Subject to fusion.The result string may be longer than the input string. For instance, "0" (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).(O(n)S Convert a string to upper case, using simple case conversion. Subject to fusion.The result string may be longer than the input string. For instance, the German "" (eszett, U+00DF) maps to the two-letter sequence "SS".)O(n)R Convert a string to title case, using simple case conversion. Subject to fusion.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.*O(n) Left-justify a string to the given length, using the specified fill character on the right. Subject to fusion. Performs replacement on invalid scalar values. Examples: NjustifyLeft 7 'x' "foo" == "fooxxxx" justifyLeft 3 'x' "foobar" == "foobar"+O(n) Right-justify a string to the given length, using the specified fill character on the left. Performs replacement on invalid scalar values. Examples: PjustifyRight 7 'x' "bar" == "xxxxbar" justifyRight 3 'x' "foobar" == "foobar",O(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"-O(n) The -2 function transposes the rows and columns of its B) argument. Note that this function uses , E, and the list version of transpose, and is thus not very efficient..O(n) .g, applied to a binary operator, a starting value (typically the left-identity of the operator), and a B, reduces the BC using the binary operator, from left to right. Subject to fusion./O(n) A strict version of .. Subject to fusion.0O(n) A variant of .O that has no starting value argument, and thus must be applied to a non-empty B. Subject to fusion.1O(n) A strict version of 0. Subject to fusion.2O(n) 2h, applied to a binary operator, a starting value (typically the right-identity of the operator), and a B, reduces the BC using the binary operator, from right to left. Subject to fusion.3O(n) A variant of 2O that has no starting value argument, and thus must be applied to a non-empty B. Subject to fusion.4O(n) Concatenate a list of Bs.5O(n) Map a function over a B that results in a B, and concatenate the results.6O(n) 6 p t* determines whether any character in the B t satisfies the predicate p. Subject to fusion.7O(n) 7 p t+ determines whether all characters in the B t satisfy the predicate p. Subject to fusion.8O(n) 8" returns the maximum value from a B., which must be non-empty. Subject to fusion.9O(n) 9" returns the minimum value from a B., which must be non-empty. Subject to fusion.:O(n) : is similar to ., but returns a list of successive reduced values from the left. Subject to fusion. 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.;O(n) ; is a variant of :k that has no starting value argument. Subject to fusion. Performs replacement on invalid scalar values. .scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]<O(n) < is the right-to-left dual of :2. Performs replacement on invalid scalar values. 1scanr f v == reverse . scanl (flip f) v . reverse=O(n) = is a variant of <k that has no starting value argument. Subject to fusion. Performs replacement on invalid scalar values.>O(n) Like a combination of ! and /+. Applies a function to each element of a BM, passing an accumulating parameter from left to right, and returns a final B2. Performs replacement on invalid scalar values.?The ?( function behaves like a combination of ! and a strict 2.; it applies a function to each element of a B, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new B1. Performs replacement on invalid scalar values.@O(n*m) @ n t is a B consisting of the input t repeated n times.O(n)  n c is a B of length n with c0 the value of every element. Subject to fusion.AO(n), where n" is the length of the result. The A$ function is analogous to the List . A builds a B@ from a seed value. The function takes the element and returns W if it is done producing the B , otherwise X (a,b). In this case, a is the next d in the string, and bn is the seed value for further production. Subject to fusion. Performs replacement on invalid scalar values.BO(n) Like A, B builds a Bc from a seed value. However, the length of the result should be limited by the first argument to B(. This function is more efficient than Af when the maximum length of the result is known and correct, otherwise its performance is similar to AE. Subject to fusion. Performs replacement on invalid scalar values.CO(n) C n, applied to a B, returns the prefix of the B of length n , or the B itself if n< is greater than the length of the Text. Subject to fusion.DO(n) D n t, returns the suffix remaining after taking n characters from the end of t. Examples: takeEnd 3 "foobar" == "bar"EO(n) E n, applied to a B, returns the suffix of the B after the first n characters, or the empty B if n$ is greater than the length of the B. Subject to fusion.FO(n) F n t. returns the prefix remaining after dropping n characters from the end of t. Examples: dropEnd 3 "foobar" == "foo"GO(n) G, applied to a predicate p and a BI, returns the longest prefix (possibly empty) of elements that satisfy p. Subject to fusion.HO(n) H, applied to a predicate p and a BI, returns the longest suffix (possibly empty) of elements that satisfy p . Subject to fusion. Examples: "takeWhileEnd (=='o') "foo" == "oo"IO(n) I p t% returns the suffix remaining after G p t. Subject to fusion.JO(n) J p tT returns the prefix remaining after dropping characters that satisfy the predicate p from the end of t. Subject to fusion. Examples: &dropWhileEnd (=='.') "foo..." == "foo"KO(n) K p tW returns the substring remaining after dropping characters that satisfy the predicate p% from both the beginning and end of t. Subject to fusion.LO(n): Remove leading white space from a string. Equivalent to: dropWhile isSpaceMO(n); Remove trailing white space from a string. Equivalent to: dropWhileEnd isSpaceNO(n)G Remove leading and trailing white space from a string. Equivalent to: dropAround isSpaceOO(n) O n t4 returns a pair whose first element is a prefix of t of length nH, and whose second is the remainder of the string. It is equivalent to (C n t, E n t).PO(n) P, applied to a predicate p and text tQ, 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 list.QO(n) Q is like PD, but the prefix returned is over elements that fail the predicate p.RO(n)7 Group characters in a string according to a predicate. Returns the array index (in units of Word16/) at which a character may be found. This is not1 the same as the logical index returned by e.g. `.SO(n)* Group characters in a string by equality.TO(n)* Return all initial segments of the given B, shortest first.UO(n)( Return all final segments of the given B, longest first.VO(m+n) Break a B$ into pieces separated by the first B 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 Xintercalate s . splitOn s == id splitOn (singleton c) == split (==c)(Note: the string s$ to split on above cannot be empty.)KIn (unlikely) bad cases, this function's time complexity degrades towards O(n*m).WO(n) Splits a B 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. Nsplit (=='a') "aabbaca" == ["","","bb","c",""] split (=='a') "" == [""]XO(n) Splits a B into components of length kk. The last element may be shorter than the other chunks, depending on the length of the input. Examples: achunksOf 3 "foobarbaz" == ["foo","bar","baz"] chunksOf 4 "haskell.org" == ["hask","ell.","org"]YO(n) The Y" function takes a predicate and a B<, and returns the first element matching the predicate, or W if there is no such element.ZO(n) The Z" function takes a predicate and a B, and returns the pair of BNs with elements which do and do not satisfy the predicate, respectively; i.e. 1partition p t == (filter p t, filter (not . p) t)[O(n) [, applied to a predicate and a B , returns a B9 containing those characters that satisfy the predicate.\O(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: TbreakOn "::" "a::b::c" ==> ("a", "::b::c") breakOn "/" "foobar" ==> ("foobar", "")Laws: Qappend prefix match == haystack where (prefix, match) = breakOn needle haystackxIf 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.KIn (unlikely) bad cases, this function's time complexity degrades towards O(n*m).]O(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")^O(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: fbreakOnAll "::" "" ==> [] breakOnAll "/" "a/b/c/" ==> [("a", "/b/c/"), ("a/b", "/c/"), ("a/b/c", "/")]KIn (unlikely) bad cases, this function's time complexity degrades towards O(n*m).The needle parameter may not be empty._O(n) B- index (subscript) operator, starting from 0.`O(n) The `" function takes a predicate and a B4 and returns the index of the first element in the B. satisfying the predicate. Subject to fusion.aO(n+m) The aM function returns the number of times the query string appears in the given BJ. An empty query string is invalid, and will cause an error to be raised.KIn (unlikely) bad cases, this function's time complexity degrades towards O(n*m).O(n) The N function returns the number of times the query element appears in the given B. Subject to fusion.bO(n) b takes two BDs and returns a list of corresponding pairs of bytes. If one input B* is short, excess elements of the longer B1 are discarded. This is equivalent to a pair of  operations.cO(n) c generalises b by zipping with the function given as the first argument, instead of a tupling function. Performs replacement on invalid scalar values.dO(n) Breaks a B' up into a list of words, delimited by ds representing white space.eO(n) Breaks a B up into a list of Bs at newline d1s. The resulting strings do not contain newlines.fO(n)= Joins lines, after appending a terminating newline to each.gO(n)+ Joins words using single space characters.hO(n) The h function takes two Bs and returns p= iff the first is a prefix of the second. Subject to fusion.iO(n) The i function takes two Bs and returns p) iff the first is a suffix of the second.jO(n+m) The j function takes two Bs and returns pL iff the first is contained, wholly and intact, anywhere within the second.KIn (unlikely) bad cases, this function's time complexity degrades towards O(n*m).kO(n)W Return the suffix of the second string if its prefix matches the entire first string. Examples: wstripPrefix "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 _ = -1lO(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.ZIf the strings do not have a common prefix or either one is empty, this function returns W. Examples: commonPrefixes "foobar" "fooquux" == Just ("foo","bar","quux") commonPrefixes "veeble" "fetzer" == Nothing commonPrefixes "" "baz" == NothingmO(n)W Return the prefix of the second string if its suffix matches the entire first string. Examples: wstripSuffix "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 _ = -1<Add a list of non-negative numbers. Errors out on overflow.nO(n)X Make a distinct copy of the given string, sharing no storage with the original string.lAs an example, suppose you read a large string, of which you need only a small portion. If you do not use n, 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.oOnly defined for  base-4.7.0.0 and laterpThis 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.,- and Data.Map../Q. If you feel a mistake has been made, please feel free to submit improvements.+The original discussion is archived here: bhttp://groups.google.com/group/haskell-cafe/browse_thread/thread/b5bbb1b28a7e525d/0639d46852575b930could we get a Data instance for Data.Text.Text?5The followup discussion that changed the behavior of ,- and ./ is archived here: ]http://markmail.org/message/trovdc6zkphyi3cr#query:+page:1+mid:a46der3iacwjcf6n+state:results)Proposal: Allow gunfold for Data.Map, ...r !"#$%needle? to search for. If this string is empty, an error will occur. replacement to replace needle with.haystack in which to search.&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVBString to split on. If this string is empty, an error will occur. Input text.WXYZ[\]^needle to search forhaystack in which to search_`abcdefghijklmnopqrstuvwxy_BD !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn_BD !"#-$%&'()*+,./0123456789:;<=>?@ABCDEFGHIJKNLMO\]QPSRTUVWXedfghijkml[^YZ_`abcnr !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy5E(c) 2009, 2010 Bryan O'Sullivan, (c) 2009 Simon Marlow BSD-stylebos@serpentine.com experimentalGHCNone!"zRead 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.{tRead a single chunk of strict text from a buffer. Used by both the strict and lazy implementations of hGetContents.z{z{z{z{E(c) 2009, 2010 Bryan O'Sullivan, (c) 2009 Simon Marlow BSD-stylebos@serpentine.com experimentalGHC Trustworthy!"T|The |v function reads a file and returns the contents of the file as a string. The entire file is read strictly, as with .}WWrite a string to a file. The file is truncated to zero length before writing begins.~!Write a string the end of a file. Experimental., Read a single chunk of strict text from a K. 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.!Read the remaining contents of a  as a string. The K 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.%Use a more efficient buffer size if we're reading in block-buffered mode with the default buffer size. When we can determine the size of the handle we're reading, set the buffer size to that, so that we can read the entire file in one chunk. Otherwise, use a buffer size of at least 16KB.!Read a single line from a handle.Write a string to a handle.2Write a string to a handle, followed by a newline.The # 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.Read all user input on  as a single string.&Read a single line of user input from .Write a string to .Write a string to , followed by a newline.|}~ |}~ |}~|}~(c) 2009, 2010 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNone0 Check the invariant strictly.Check the invariant lazily.)Display the internal structure of a lazy .Smart constructor for %. Guarantees the data type invariant.Smart constructor for .Consume the chunks of a lazy  with a natural right fold.Consume the chunks of a lazy 8 with a strict, tail-recursive, accumulating left fold.=Currently set to 16 KiB, less the memory management overhead.@Currently set to 128 bytes, less the memory management overhead.EThe memory management overhead. Currently this is tuned for GHC only.    (c) 2009, 2010 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNoneO(n) Convert a  into a 'Stream Char'.O(n) Convert a 'Stream Char' into a , using the given chunk size.O(n) Convert a 'Stream Char' into a  , using .O(n), Returns the number of characters in a text.O(n) Like unfoldr, l 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.O(n)4 stream index (subscript) operator, starting from 0.O(n) The countU function returns the number of times the query element appears in the given stream. (c) 2009, 2010 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNoneTO(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.GIn (unlikely) bad cases, this algorithm's complexity degrades towards O(n*m)."Fast index into a partly unpacked g. We take into account the possibility that the caller might try to access one element past the end. A variant of " that scans linearly for a single a.The number of a values in a .Substring to search for (needle)Text to search in (haystack)0(c) 2013 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNone0 !(c) 2009, 2010 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalportable Trustworthy Deprecated . Decode a  ByteString& containing 7-bit ASCII encoded text. Decode a  ByteString2 containing Latin-1 (aka ISO-8859-1) encoded text. Decode a  ByteString containing UTF-8 encoded 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 . Decode a  ByteString containing UTF-8 encoded text..sIf the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.Note: this function is notw lazy, as it must decode its entire input before it can return a result. If you need lazy (streaming) decoding, use  in lenient mode./Decode text from little endian UTF-16 encoding./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 .,Decode text from big endian UTF-16 encoding.,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 .0Encode text using little endian UTF-16 encoding.-Encode text using big endian UTF-16 encoding./Decode text from little endian UTF-32 encoding./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 .,Decode text from big endian UTF-32 encoding.,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 .0Encode text using little endian UTF-32 encoding.-Encode text using big endian UTF-32 encoding.%(c) 2009, 2010, 2012 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHC TrustworthyBDRiO(n) Convert a V into a .BSubject to fusion. Performs replacement on invalid scalar values.O(n) Convert a  into a V. Subject to fusion.O(n)& Convert a literal string into a Text.O(1)e Convert a character into a Text. Subject to fusion. Performs replacement on invalid scalar values.O(c) Convert a list of strict Bs into a lazy .O(n) Convert a lazy  into a list of strict Bs.O(n) Convert a lazy  into a strict B.O(c) Convert a strict B into a lazy .O(n)$ Adds a character to the front of a *. This function is more costly than its ListJ counterpart because it requires copying a new array. Subject to fusion.O(n)" Adds a character to the end of a R. This copies the entire array in the process, unless fused. Subject to fusion.O(n/c) Appends one  to another. Subject to fusion.O(1)+ Returns the first character and rest of a , or W if empty. Subject to fusion.O(1)" Returns the first character of a /, which must be non-empty. Subject to fusion.O(1), Returns all characters after the head of a /, which must be non-empty. Subject to fusion.O(n/c)) Returns all but the last character of a /, which must be non-empty. Subject to fusion.O(1) Tests whether a & is empty or not. Subject to fusion.O(1) Tests whether a 4 contains exactly one character. Subject to fusion.O(n/c)! Returns the last character of a /, which must be non-empty. Subject to fusion.O(n)' Returns the number of characters in a . Subject to fusion.O(n)& Compare the count of characters in a ! to a number. Subject to fusion.HThis function gives the same answer as comparing against the result of l, but can short circuit if the count of characters is greater than the number, and hence be more efficient.O(n)  f t is the  obtained by applying f to each element of tF. Subject to fusion. Performs replacement on invalid scalar values.O(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.O(n) The G function takes a character and places it between the characters of a F. Subject to fusion. Performs replacement on invalid scalar values.O(n) Left-justify a string to the given length, using the specified fill character on the right. Subject to fusion. Performs replacement on invalid scalar values. Examples: NjustifyLeft 7 'x' "foo" == "fooxxxx" justifyLeft 3 'x' "foobar" == "foobar"O(n) Right-justify a string to the given length, using the specified fill character on the left. Performs replacement on invalid scalar values. Examples: PjustifyRight 7 'x' "bar" == "xxxxbar" justifyRight 3 'x' "foobar" == "foobar"O(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"O(n) The 2 function transposes the rows and columns of its ) argument. Note that this function uses , E, and the list version of transpose, and is thus not very efficient.O(n)  t returns the elements of t in reverse order.O(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) DAs 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"KIn (unlikely) bad cases, this function's time complexity degrades towards O(n*m).O(n)5 Convert a string to folded case. Subject to fusion.aThis 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 yUThe 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.O(n)S Convert a string to lower case, using simple case conversion. Subject to fusion.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).O(n)S Convert a string to upper case, using simple case conversion. Subject to fusion.The result string may be longer than the input string. For instance, the German eszett (U+00DF) maps to the two-letter sequence SS.O(n)S Convert a string to title case, using simple case conversion. Subject to fusion.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.O(n) g, applied to a binary operator, a starting value (typically the left-identity of the operator), and a , reduces the C using the binary operator, from left to right. Subject to fusion.O(n) A strict version of . Subject to fusion.O(n) A variant of O that has no starting value argument, and thus must be applied to a non-empty . Subject to fusion.O(n) A strict version of . Subject to fusion.O(n) h, applied to a binary operator, a starting value (typically the right-identity of the operator), and a , reduces the C using the binary operator, from right to left. Subject to fusion.O(n) A variant of O that has no starting value argument, and thus must be applied to a non-empty . Subject to fusion.O(n) Concatenate a list of s.O(n) Map a function over a  that results in a , and concatenate the results.O(n)  p t* determines whether any character in the  t satisfies the predicate p. Subject to fusion.O(n)  p t+ determines whether all characters in the  t satisfy the predicate p. Subject to fusion.O(n) " returns the maximum value from a ., which must be non-empty. Subject to fusion.O(n) " returns the minimum value from a ., which must be non-empty. Subject to fusion.O(n)  is similar to , but returns a list of successive reduced values from the left. Subject to fusion. 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.O(n)  is a variant of k that has no starting value argument. Subject to fusion. Performs replacement on invalid scalar values. .scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]O(n)  is the right-to-left dual of 2. Performs replacement on invalid scalar values. 1scanr f v == reverse . scanl (flip f) v . reverseO(n)  is a variant of V that has no starting value argument. Performs replacement on invalid scalar values.O(n) Like a combination of  and +. Applies a function to each element of a M, passing an accumulating parameter from left to right, and returns a final 2. Performs replacement on invalid scalar values.The ( 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. x is an infinite , with x the value of every element.O(n*m)  n t is a  consisting of the input t repeated n times. ties a finite, non-empty P into a circular one, or equivalently, the infinite repetition of the original . f x returns an infinite  of repeated applications of f to x: %iterate f x == [x, f x, f (f x), ...]O(n)  n c is a  of length n with c0 the value of every element. Subject to fusion.O(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 W if it is done producing the  , otherwise X (a,b). In this case, a is the next d in the string, and b[ is the seed value for further production. Performs replacement on invalid scalar values.O(n) Like ,  builds a c from a seed value. However, the length of the result should be limited by the first argument to (. This function is more efficient than f when the maximum length of the result is known and correct, otherwise its performance is similar to 1. Performs replacement on invalid scalar values.O(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. Subject to fusion.O(n)  n t, returns the suffix remaining after taking n characters from the end of t. Examples: takeEnd 3 "foobar" == "bar"O(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 . Subject to fusion.O(n)  n t. returns the prefix remaining after dropping n characters from the end of t. Examples: dropEnd 3 "foobar" == "foo"O(n)  n returns the suffix with n Word16 values dropped, or the empty  if n is greater than the number of Word16 values present.O(n) , applied to a predicate p and a I, returns the longest prefix (possibly empty) of elements that satisfy p. Subject to fusion.O(n) , applied to a predicate p and a I, returns the longest suffix (possibly empty) of elements that satisfy p . Examples: "takeWhileEnd (=='o') "foo" == "oo"O(n)  p t% returns the suffix remaining after  p t. Subject to fusion.O(n)  p tT returns the prefix remaining after dropping characters that satisfy the predicate p from the end of t. Examples: &dropWhileEnd (=='.') "foo..." == "foo"O(n)  p tW returns the substring remaining after dropping characters that satisfy the predicate p% from both the beginning and end of t. Subject to fusion.O(n): Remove leading white space from a string. Equivalent to: dropWhile isSpaceO(n); Remove trailing white space from a string. Equivalent to: dropWhileEnd isSpaceO(n)G Remove leading and trailing white space from a string. Equivalent to: dropAround isSpaceO(n)  n t4 returns a pair whose first element is a prefix of t of length nH, and whose second is the remainder of the string. It is equivalent to ( n t,  n t).O(n)  n t; returns a strict pair whose first element is a prefix of t whose chunks contain n Word16: values, and whose second is the remainder of the string.O(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: TbreakOn "::" "a::b::c" ==> ("a", "::b::c") breakOn "/" "foobar" ==> ("foobar", "")Laws: Qappend prefix match == haystack where (prefix, match) = breakOn needle haystackxIf 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.GThis function is strict in its first argument, and lazy in its second.KIn (unlikely) bad cases, this function's time complexity degrades towards O(n*m).O(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")O(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: fbreakOnAll "::" "" ==> [] breakOnAll "/" "a/b/c/" ==> [("a", "/b/c/"), ("a/b", "/c/"), ("a/b/c", "/")]GThis function is strict in its first argument, and lazy in its second.KIn (unlikely) bad cases, this function's time complexity degrades towards O(n*m).The needle parameter may not be empty.O(n)  is like D, but the prefix returned is over elements that fail the predicate p.O(n) , applied to a predicate p and text tQ, 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 list.The  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 A, which allows the programmer to supply their own equality test.The + function is the non-overloaded version of .O(n)* Return all initial segments of the given , shortest first.O(n)( Return all final segments of the given , longest first.O(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 Xintercalate s . splitOn s == id splitOn (singleton c) == split (==c)(Note: the string s$ to split on above cannot be empty.)GThis function is strict in its first argument, and lazy in its second.KIn (unlikely) bad cases, this function's time complexity degrades towards O(n*m).O(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. Nsplit (=='a') "aabbaca" == ["","","bb","c",""] split (=='a') [] == [""]O(n) Splits a  into components of length kk. The last element may be shorter than the other chunks, depending on the length of the input. Examples: achunksOf 3 "foobarbaz" == ["foo","bar","baz"] chunksOf 4 "haskell.org" == ["hask","ell.","org"]O(n) Breaks a  up into a list of s at newline d1s. The resulting strings do not contain newlines.O(n) Breaks a ' up into a list of words, delimited by ds representing white space.O(n)= Joins lines, after appending a terminating newline to each.O(n)+ Joins words using single space characters.O(n) The  function takes two s and returns p= iff the first is a prefix of the second. Subject to fusion.O(n) The  function takes two s and returns p) iff the first is a suffix of the second.O(n+m) The  function takes two s and returns pL iff the first is contained, wholly and intact, anywhere within the second.GThis function is strict in its first argument, and lazy in its second.KIn (unlikely) bad cases, this function's time complexity degrades towards O(n*m). O(n)W Return the suffix of the second string if its prefix matches the entire first string. Examples: wstripPrefix "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 _ = -1 O(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.ZIf the strings do not have a common prefix or either one is empty, this function returns W. Examples: commonPrefixes "foobar" "fooquux" == Just ("foo","bar","quux") commonPrefixes "veeble" "fetzer" == Nothing commonPrefixes "" "baz" == Nothing O(n)W Return the prefix of the second string if its suffix matches the entire first string. Examples: wstripSuffix "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 _ = -1 O(n)  , applied to a predicate and a  , returns a 9 containing those characters that satisfy the predicate. O(n) The  " function takes a predicate and a ?, and returns the first element in matching the predicate, or W if there is no such element.O(n) The " function takes a predicate and a , and returns the pair of Ns with elements which do and do not satisfy the predicate, respectively; i.e. 1partition p t == (filter p t, filter (not . p) t)O(n) - index (subscript) operator, starting from 0.O(n+m) The M function returns the number of times the query string appears in the given J. An empty query string is invalid, and will cause an error to be raised.KIn (unlikely) bad cases, this function's time complexity degrades towards O(n*m).O(n) The N function returns the number of times the query element appears in the given . Subject to fusion.O(n)  takes two Ds 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.O(n)  generalises  by zipping with the function given as the first argument, instead of a tupling function. Performs replacement on invalid scalar values.Only defined for  base-4.7.0.0 and laterThis 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. 1zneedle? to search for. If this string is empty, an error will occur. replacement to replace needle with.haystack in which to search.needle to search forhaystack in which to searchBString to split on. If this string is empty, an error will occur. Input text.     e     e     z     5#>(c) 2013 Bryan O'Sullivan (c) 2010 Johan TibellBSD-style (see LICENSE)%Johan Tibell <johan.tibell@gmail.com> experimentalportable to Hugs and GHCNoneOTA 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.O(1). The empty Builder , satisfying $  =  O(1). A Builder& taking a single character, satisfying $ (  c) =  cO(1).L The concatenation of two builders, an associative operation with identity  , satisfying $ ( x y) =  ($ x) ($ y)!O(1). A Builder taking a B , satisfying $ (! t) =  [t]"O(1). A Builder taking a String , satisfying $ (" s) =  [S.pack s]#O(1). A Builder taking a lazy Text , satisfying $ (# t) = t$O(n). Extract a lazy Text from a Builderl with a default buffer size. The construction work takes place if and when the relevant part of the lazy Text is demanded.%O(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.iIf the initial buffer is too small to hold all data, subsequent buffers will be the default buffer size.&O(1). Pop the strict TextN we have constructed so far, if any, yielding a new chunk in the result lazy Text.&Sequence an ST operation on the bufferGet the size of the buffer Map the resulting list of texts.'Ensure that there are at least n many elements available.( Ensure that n+ many elements are available, and then use f) to write some elements into the memory. !"#$%&'()*+,-./  !"#$%&'() $% !#"&)'( !"#$%&'()*+,-./">(c) 2013 Bryan O'Sullivan (c) 2010 Johan TibellBSD-style (see LICENSE)%Johan Tibell <johan.tibell@gmail.com> experimentalportable to Hugs and GHC TrustworthyOT !"#$%&$% !#"&$(c) 2011 MailRank, Inc. BSD-stylebos@serpentine.com experimentalGHCNoneB0%Unsafe conversion for decimal digits.1 The normal 4 function with right associativity instead of left.0101100114% TrustworthyBOT23232323&'(c) The University of Glasgow 1994-2002see libraries/base/LICENSE Trustworthy40Control the rendering of floating point numbers.5Scientific notation (e.g. 2.3e123).6Standard decimal notation.7(Use decimal notation for values between 0.1 and  9,999,999$, and scientific notation otherwise.8Show a signed l 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.! takes a base and a non-negative K number, and returns a list of digits and an exponent. In particular, if x>=0, and *floatToDigits base x = ([d1,d2,...,dn], e)then  n >= 1 x = 0.d1d2...dn * (base**e) 0 <= di <= base-1 456789#Number of decimal places to render.476589456789 456789'E(c) 2009, 2010 Bryan O'Sullivan, (c) 2009 Simon Marlow BSD-stylebos@serpentine.com experimentalGHC Trustworthy!" =TRead a file and return its contents as a string. The file is read lazily, as with E.>WWrite a string to a file. The file is truncated to zero length before writing begins.?!Write a string the end of a file.@(Lazily read the remaining contents of a . The 7 will be closed after the read completes, or on error.gUse a more efficient buffer size if we're reading in block-buffered mode with the default buffer size.A!Read a single line from a handle.BWrite a string to a handle.C2Write a string to a handle, followed by a newline.DThe D# 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.ELazily read all user input on  as a single string.F&Read a single line of user input from .GWrite a string to .HWrite a string to , followed by a newline.=>?@ABCDEFGH =>?@ABCDEFGH =>?@ABCDEFGH=>?@ABCDEFGH((c) 2010, 2011 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCSafeIlRead some text. If the read succeeds, return its value and the remaining text, otherwise an error message.JRead 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.aThis function does not handle leading sign characters. If you need to handle signed input, use L J.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.K?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.aThis function does not handle leading sign characters. If you need to handle signed input, use L K.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.L)Read an optional leading sign character ('-' or '+';) and apply it to the result of applying the given reader.MRead 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  : Lrational "3.foo" == Right (3.0, ".foo") rational "3e" == Right (3.0, "e")NRead a rational number.8The syntax accepted by this function is the same as for M.Note0: This function is almost ten times faster than M!, but is slightly less accurate.The  ] type supports about 16 decimal places of accuracy. For 94.2% of numbers, this function and M 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.  IJK LMNIJKLMNIJKLMN  IJK LMN)(c) 2010, 2011 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHC TrustworthyOlRead some text. If the read succeeds, return its value and the remaining text, otherwise an error message.PRead 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.aThis function does not handle leading sign characters. If you need to handle signed input, use R P.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.Q?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.aThis function does not handle leading sign characters. If you need to handle signed input, use R Q.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.R)Read an optional leading sign character ('-' or '+';) and apply it to the result of applying the given reader.SRead 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  : Lrational "3.foo" == Right (3.0, ".foo") rational "3e" == Right (3.0, "e")TRead a rational number.8The syntax accepted by this function is the same as for S.Note0: This function is almost ten times faster than S!, but is slightly less accurate.The  ] type supports about 16 decimal places of accuracy. For 94.2% of numbers, this function and S 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. OPQRSTOPQRSTOPQRST OPQRST23456789:;*<*=>>?@ABCDEFGHIJKLMNO P Q R S T U V W X Y Z [ \ ] ^ _ _ ` a a b c d e f g h i j k l m n o p q f 1 1 h r s t u v w x y z{|}~hIKLM+++      !"#$%&'()*+,-./ 0 1 I Z 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 hijklmnopqrstuvw1xyz{|}h~ !!!!!! !! ! ! ! !!!!!!!!!01I2345Z6789:;<=>?@ABCOPQEDGFHIJKLUTVWXYZ[\MNRS^_`abcdefgh#################$$%%&&&&&&&&&'k'l'm'o'p'q'r's't'u'v'w(((((())))))222222      2 2 >222>>++2      2        222 !"#$%& ' (  )*m +,#h##-#.#/#0#0##1#2#3#4#526%>%>%7%8%9%:%;%<%=%>%?%@%A%B2CD&E&F&G&H&I&J&K''L'MNOP2QRS(T(U(V(W(X)T)U)V)W)XY#text-1.2.2.2-9RlRQEEESJb1LT1TjepTtHData.Text.UnsafeData.Text.Internal.Unsafe.ShiftData.Text.Internal.ReadData.Text.Internal.Functions!Data.Text.Internal.Encoding.Utf32!Data.Text.Internal.Encoding.Utf16.Data.Text.Internal.Builder.RealFloat.Functions%Data.Text.Internal.Builder.Int.DigitsData.Text.Encoding.ErrorData.Text.ArrayData.Text.Internal.Unsafe.Char Data.TextData.Text.InternalData.Text.Internal.Fusion.SizeData.Text.Internal.Fusion.Types%Data.Text.Internal.Fusion.CaseMapping Data.Text.Internal.Fusion.CommonData.Text.Internal.Search Data.Text.Internal.Encoding.Utf8Data.Text.Internal.PrivateData.Text.Internal.Fusion)Data.Text.Internal.Encoding.Fusion.Common"Data.Text.Internal.Encoding.Fusion'Data.Text.Internal.Lazy.Encoding.FusionData.Text.EncodingData.Text.ForeignData.Text.Internal.IO Data.Text.IOData.Text.LazyData.Text.Internal.LazyData.Text.Internal.Lazy.FusionData.Text.Internal.Lazy.SearchData.Text.Lazy.EncodingData.Text.Lazy.BuilderData.Text.Internal.Builder$Data.Text.Internal.Builder.FunctionsData.Text.Lazy.Builder.Int Data.Text.Lazy.Builder.RealFloatData.Text.Lazy.IOData.Text.Lazy.ReadData.Text.ReadData.Text.Internal.UnsafeData.Text.ShowData.SetSetData.MapMapData.Text.Lazy.InternalTextbase GHC.IO.UnsafeunsafeDupablePerformIO UnsafeShiftshiftLshiftR$fUnsafeShiftInt$fUnsafeShiftWord64$fUnsafeShiftWord32$fUnsafeShiftWord16inlinePerformIOinlineInterleaveSTTIParserPrunPIReaderperhaps hexDigitToInt digitToInt$fMonadIParser$fApplicativeIParser$fFunctorIParser interspersevalidatechr2 validate1 validate2roundTodigitsUnicodeException DecodeError EncodeError OnEncodeError OnDecodeErrorOnError strictDecode lenientDecode strictEncodeignorereplace$fNFDataUnicodeException$fExceptionUnicodeException$fShowUnicodeException$fEqUnicodeExceptionMArraymaBAArrayaBAnew unsafeFreeze unsafeIndex unsafeWritetoListemptyrunrun2copyMcopyIequalord unsafeChr unsafeChr8 unsafeChr32empty_texttextPshowTextsafefirstfmulmul64mul32Sizeexactly exactSizemaxSize betweenSize unknownSizesmallerlarger upperBound lowerBound compareSizeisEmpty $fNumSize$fEqSize $fShowSizeStreamStepDoneSkipYieldScanScan1Scan2PairS:*:RSRS0RS1RS2RS3CC $fOrdStream $fEqStream upperMapping lowerMapping titleMapping foldMapping singleton streamList unstreamListstreamCString#conssnocappendheadunconslasttailinitnulllengthIcompareLengthI isSingletonmap toCaseFoldtoUppertoLowertoTitle justifyLeftIfoldlfoldl'foldl1foldl1'foldrfoldr1 intercalateconcat concatMapanyallmaximumminimumscanlreplicateCharI replicateIunfoldr unfoldrNItakedrop takeWhile dropWhile isPrefixOfelemfindByindexIfilter findIndexIzipWith countCharIindicesord2ord3ord4chr3chr4 validate3 validate4Iter unsafeHead unsafeTailiteriter_ reverseIter reverseIter_ lengthWord16 takeWord16 dropWord16span_runTextstream reverseStreamunstreamlengthreverse reverseScanrunfoldrNindex findIndex countChar mapAccumLrestreamUtf16BErestreamUtf16LErestreamUtf32BErestreamUtf32LE streamASCII streamUtf8 streamUtf16LE streamUtf16BE streamUtf32BE streamUtf32LEunpackunpackCString#DecodingSome decodeASCII decodeLatin1decodeUtf8WithstreamDecodeUtf8streamDecodeUtf8With decodeUtf8 decodeUtf8'encodeUtf8BuilderencodeUtf8BuilderEscaped encodeUtf8decodeUtf16LEWith decodeUtf16LEdecodeUtf16BEWith decodeUtf16BE encodeUtf16LE encodeUtf16BEdecodeUtf32LEWith decodeUtf32LEdecodeUtf32BEWith decodeUtf32BE encodeUtf32LE encodeUtf32BE$fShowDecoding $fEqCodePoint$fShowCodePoint$fNumCodePoint$fStorableCodePoint$fEqDecoderState$fShowDecoderState$fNumDecoderState$fStorableDecoderStateI16fromPtrunsafeCopyToPtruseAsPtr asForeignPtrpeekCStringLenwithCStringLen $fBoundedI16 $fEnumI16$fEqI16 $fIntegralI16$fNumI16$fOrdI16 $fReadI16 $fRealI16 $fShowI16pack compareLength justifyLeft justifyRightcenter transposescanl1scanrscanr1 mapAccumR replicatetakeEnddropEnd takeWhileEnd dropWhileEnd dropAround stripStartstripEndstripsplitAtspanbreakgroupBygroupinitstailssplitOnsplitchunksOffind partitionbreakOn breakOnEnd breakOnAllcountzipwordslinesunlinesunwords isSuffixOf isInfixOf stripPrefixcommonPrefixes stripSuffixcopy$fPrintfArgText $fDataText $fBinaryText $fNFDataText $fIsListText$fIsStringText $fMonoidText$fSemigroupText $fReadText $fOrdText$fEqText hGetLineWith readChunkreadFile writeFile appendFile hGetChunk hGetContentshGetLinehPutStr hPutStrLninteract getContentsgetLineputStrputStrLnEmptyChunkstrictInvariant lazyInvariant showStructurechunk foldrChunks foldlChunksdefaultChunkSizesmallChunkSize chunkOverheadunstreamChunks fromChunkstoChunkstoStrict fromStrictrepeatcycleiterate $fShowTextBuilderfromText fromString fromLazyText toLazyTexttoLazyTextWithflush ensureFreewriteNappend' $fOrdBuilder $fEqBuilder $fShowBuilder$fIsStringBuilder$fMonoidBuilder$fSemigroupBuilderi2d<>decimal hexadecimalFPFormatExponentFixedGeneric realFloatformatRealFloat$fEnumFPFormat$fReadFPFormat$fShowFPFormatReadersignedrationaldoubleGHC.STSTGHC.BaseStringNothingJustGHC.Errerror GHC.ExceptionthrowshowUnicodeException bytesInArraymemcpyMmemcmpmemcpyIarray_size_errorGHC.WordWord16text_GHC.Showshowghc-prim GHC.TypesCharmul64_BetweenUnknownaddaddSize subtractSizemulSize overflowErroreqcmpZipTrue findIndicesIZ1Z2DropNSJSRIJustifyJust1Just2II1I2I3InitInit0Init1ELRSnocNJCC0C1 head_empty caseConvert streamError emptyError internalError:*betweenGHC.Listbytestring-0.10.8.1Data.ByteString.Internal ByteStringWord8 decodeErrorData.ByteString.Lazy.InternalSS0S1S2S3S4 singleton_ Data.ByteString.Builder.Internal%Data.ByteString.Builder.Prim.Internal BoundedPrim DecoderState CodePoint c_encode_utf8c_decode_latin1c_decode_utf8_with_state c_decode_utf8GHC.PtrPtr compareTextsecond replicateChar Data.OldListfindAIndexOrEndsumP packConstr textDataTypeiterNiterNEnd hGetLineLoopmaybeFillReadBuffer unpack_nlgetSomeCharacters sizeErrorGHC.IO.Handle.TypesHandlechooseGoodBufferingGHC.IO.Handle.FDstdinstdout catchError hPutChars writeLineswriteBlocksCRLFwriteBlocksRawgetSpareBuffer commitBuffer indicesOne wordLength dropWords splitAtWord revChunksimpossibleError withBufferwithSize mapBuilderBuffer runBuilder copyLimit writeAtMost writeBuffer newBuffermappendboundedDecimaldecimal'positive posDecimalminuszeroi2w countDigits hexInteger hexErrMsghexDigitinteger GHC.Float RealFloat floatToDigitsminExptmaxExptexptexpts maxExpt10expts10lazyReadlazyReadBuffered integer-gmpGHC.Integer.TypeInteger Text.ReadreadDoubleParserhexsignacharfloaty