<!O>      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  !"#$%&'()*+,-./0123456789:;<='portable experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-Infered>>>portable experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-Infered?Minimum of two size hints. @Maximum of two size hints. A8Compute the maximum size from a size hint, if possible. BCDEF?@AGH BCDEF?@AG BCDEF?@AGH Safe-InferedIIIGHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-InferedJ=Allow a function over a stream to switch between two states. K%Specialised, strict Maybe-like type. L'Specialised tuple for case conversion. MThe empty stream. NOPQRSJTUVWXYZ[\]K^_L`MabNOPQRSJTUVWXYZ[\]K^_L`M NOPSRQJUTVWX\[ZY]K_^L`Mab Safe-InferedcdecdecdeGHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-Infered <An exception type for representing Unicode encoding errors. :Tried to encode a character that could not be represented > under the given encoding, or ran out of input in mid-encode. >Could not decode a byte sequence because it was invalid under 8 the given encoding, or ran out of input in mid-decode. !A handler for an encoding error.  A handler for a decoding error. @Function type for handling a coding error. It is supplied with  two inputs:  A f that describes the error. < The input value that caused the error. If the error arose C because the end of input was reached or could not be identified ! precisely, this value will be g. ,If the handler returns a value wrapped with h, that value will E be used in the output as the replacement for the invalid input. If  it returns g', no value will be used in the output. ;Should the handler need to abort processing, it should use i  or j an exception (preferably a  ). It may @ use the description provided to construct a more helpful error  report. Throw a  if decoding fails. ;Replace 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.  kl    klGHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-Inferedm=This is a workaround for poor optimisation in GHC 6.8.2. It C fails to notice constant-width shifts, and adds a test and branch < to every shift. This imposes about a 10% performance hit. BThese functions are undefined when the amount being shifted by is / greater than the size in bits of a machine Int#. mnopqrsmnomnopqrsportable experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-InferedtFJust like unsafePerformIO, but we inline it. Big performance gains as 0 it exposes lots of things to further inlining.  Very unsafe. In : particular, you should do no memory allocation inside an  t block. On Hugs this is just unsafePerformIO. u Allow an v3 computation to be deferred lazily. When passed an  action of type v s a), the action will only be performed when  the value of a is demanded. DThis function is identical to the normal unsafeInterleaveST, but is  inlined and hence faster. Note7: This operation is highly unsafe, as it can introduce , externally visible non-determinism into an v action. tututuGHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-InferedwxywxywxyGHC experimentalbos@serpentine.com Safe-Inferedz>A lazier version of Data.List.intersperse. The other version  causes space leaks! zzzGHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-Infered+{O(n)1 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)A Returns the first character of a Text, which must be non-empty.  Subject to array fusion. O(1)0 Returns the first character and remainder of a 'Stream  Char', or g% if empty. Subject to array fusion. O(n)! Returns the last character of a ' Stream Char' , which must  be non-empty. O(1)D Returns all characters after the head of a Stream Char, which must  be non-empty. O(1)< 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); Compares the count of characters in a string to a number.  Subject to fusion. DThis function gives the same answer as comparing against the result  of 6, but can short circuit if the count of characters is 7 greater than the number, and hence be more efficient. O(n)9 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)3 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 y?The result string may be longer than the input string, and may  differ from applying % to the input string. For instance, D the Armenian small ligature men now (U+FB13) is case folded to the B bigram men now (U+0574 U+0576), while the micro sign (U+00B5) is E case folded to the Greek small letter letter mu (U+03BC) instead of  itself. O(n)3 Convert a string to upper case, using simple case E conversion. The result string may be longer than the input string. A For instance, the German eszett (U+00DF) maps to the two-letter  sequence SS. O(n)3 Convert a string to lower case, using simple case E conversion. The result string may be longer than the input string. B 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). Efoldl, applied to a binary operator, a starting value (typically the L left-identity of the operator), and a Stream, reduces the Stream using the & binary operator, from left to right. A strict version of foldl. Bfoldl1 is a variant of foldl that has no starting value argument, 0 and thus must be applied to non-empty Streams. A strict version of foldl1. @, applied to a binary operator, a starting value (typically the M right-identity of the operator), and a stream, reduces the stream using the & binary operator, from right to left. foldr1 is a variant of & that has no starting value argument, 0 and thus must be applied to non-empty streams.  Subject to array fusion. O(n)9 Concatenate a list of streams. Subject to array fusion. JMap 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 satisifes the predicate p. O(n) all p 'xs determines if all characters in the Text  xs satisify the predicate p. O(n)@ 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 n3 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 B (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 ,  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)8 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)8 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 p 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 Ns and returns  * iff the first is a prefix of the second. O(n)* elem is the stream membership predicate. O(n) The * function takes a predicate and a stream, = and returns the first element in matching the predicate, or g  if there is no such element. O(n)5 Stream index (subscript) operator, starting from 0. O(n) ', 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 E returns the index of the first element in the stream satisfying the  predicate. zipWith generalises zip' by zipping with the function given as 4 the first argument, instead of a tupling function. O(n) The * function returns the number of times the , query element appears in the given stream. 3{|}~3{|}~3{|}~portable experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-Infered -Mutable array type, for use in the ST monad. Immutable array type. 'Create an uninitialized mutable array. *Freeze a mutable array. Do not mutate the   afterwards! =Unchecked read of an immutable array. May return garbage or # crash on an out-of-bounds access. AUnchecked write of a mutable array. May return garbage or crash  on an out-of-bounds access. &Convert an immutable array to a list. An empty immutable array. ?Run an action in the ST monad and return an immutable array of  its result. ?Run 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. ACompare portions of two arrays for equality. No bounds checking  is performed.   Destination Destination offset Source Source offset Count  Destination Destination offset Source Source offset First offset in destination not to  copy (i.e. not length) First Offset into first Second Offset into second Count      GHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-Infered?Write a character into the array at the given offset. Returns  the number of  s written. GHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-Infered6A space efficient, packed, unboxed Unicode text type. Smart constructor. O(1) The empty .  Construct a - without invisibly pinning its byte array in , memory if its length has dwindled to zero.  A useful '-like function for debugging purposes. Map a  to a  -safe value. DUTF-16 surrogate code points are not included in the set of Unicode 8 scalar values, but are unfortunately admitted as valid  5 values by Haskell. They cannot be represented in a . This > function remaps those code points to the Unicode replacement  character ""*, and leaves other code points unchanged. !;Apply a function to the first element of an optional pair.  ! ! ! !GHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-Infered O(n) Convert a  into a ' Stream Char'. O(n) Convert a  into a ' Stream Char', but iterate  backwards. O(n) Convert a ' Stream Char' into a . O(n)% Reverse the characters of a string. O(n) Perform the equivalent of scanr over a list, only with  the input and result reversed. O(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. O(n)5 stream index (subscript) operator, starting from 0. The - function takes a predicate and a stream and 6 returns the index of the first element in the stream  satisfying the predicate. O(n) The count0 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 , passing an accumulating 3 parameter from left to right, and returns a final . NOPQRS portable experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-InferedO(1) A variant of  for non-empty .  B omits the check for the empty case, so there is an obligation on , the programmer to provide a proof that the  is non-empty. O(1) A variant of  for non-empty .  B omits the check for the empty case, so there is an obligation on , the programmer to provide a proof that the  is non-empty. O(1)7 Iterate (unsafely) one step forwards through a UTF-16 E array, returning the current character and the delta to add to give  the next offset to iterate at. O(1)8 Iterate one step through a UTF-16 array, returning the 5 delta to add to give the next offset to iterate at. O(1)4 Iterate one step backwards through a UTF-16 array, > returning the current character and the delta to add (i.e. a 9 negative number) to give the next offset to iterate at. "O(1) Return the length of a  in units of Word16. This @ is useful for sizing a target array appropriately before using  unsafeCopyToPtr. O(1) Unchecked take of k Word16s from the front of a . O(1) Unchecked drop of k Word16s from the front of a . " tu" "GHC experimentalbos@serpentine.com Safe-InferedGHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-Infered    portable experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-InferedO(n): Convert a Stream Char into a UTF-8 encoded Stream Word8. !portable experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-InferedO(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  into a ' Stream Char' , using big  endian UTF-16 encoding. O(n) Convert a  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 N  to a .  "portable experimentalQbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-InferedO(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  into a ' Stream Char' , using big  endian UTF-16 encoding. O(n) Convert a  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 N  to a lazy .  portable experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-Infered# Deprecated . Decode a  containing 7-bit ASCII  encoded text. "This function is deprecated. Use % instead. $ Decode a  containing UTF-8 encoded text. % Decode a - containing UTF-8 encoded text that is known  to be valid. CIf the input contains any invalid UTF-8 data, an exception will be C 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.. ;If the input contains any invalid UTF-8 data, the relevant 9 exception will be returned, otherwise the decoded text. '"Encode text using UTF-8 encoding. (0Decode text from little endian UTF-16 encoding. )0Decode text from little endian UTF-16 encoding. @If the input contains any invalid little endian UTF-16 data, an B 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 B exception will be thrown. For more control over the handling of  invalid data, use *. ,1Encode text using little endian UTF-16 encoding. -.Encode text using big endian UTF-16 encoding. .0Decode text from little endian UTF-32 encoding. /0Decode text from little endian UTF-32 encoding. @If the input contains any invalid little endian UTF-32 data, an B exception will be thrown. For more control over the handling of  invalid data, use .. 0-Decode text from big endian UTF-32 encoding. 1-Decode text from big endian UTF-32 encoding. =If the input contains any invalid big endian UTF-32 data, an B exception will be thrown. For more control over the handling of  invalid data, use 0. 21Encode text using little endian UTF-32 encoding. 3.Encode text using big endian UTF-32 encoding. #$%&'()*+,-./0123#$%&'()*+,-./0123#%)+/1&$(*.0',-23#$%&'()*+,-./0123#GHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-InferedO(n+m)4 Find the offsets of all non-overlapping indices of  needle within haystack". The offsets returned represent # locations in the low-level array. 'In (unlikely) bad cases, this algorithm's complexity degrades  towards O(n*m). Substring to search for (needle) Text to search in (haystack) GHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.orgNone43A type representing a number of UTF-16 code units. 5O(n) Create a new  from a   by copying the  contents of the array. 6O(1) Return the prefix of the  of n  units in  length. If n would cause the % to end inside a surrogate pair, the 6 end of the prefix will be advanced by one additional  unit  to maintain its validity. 7O(1) Return the suffix of the , with n  units  dropped from its beginning. If n would cause the ' to begin inside a surrogate pair, the < beginning of the suffix will be advanced by one additional   unit to maintain its validity. 8O(n) Copy a . to an array. The array is assumed to be big + enough to hold the contents of the entire . 9O(n)5 Perform an action on a temporary, mutable copy of a  4. The copy is freed as soon as the action returns. :O(n) Make a mutable copy of a . 45 source array length of source array (in  units) 6789:"456789:459:"876456789:GHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-InferedW;O(n) Convert a f into a . Subject to 9 fusion. Performs replacement on invalid scalar values. <O(n)3 Convert a Text into a String. Subject to fusion. =O(1)6 Convert a character into a Text. Subject to fusion. 0 Performs replacement on invalid scalar values. >O(n)$ Adds a character to the front of a . This function  is more costly than its List! counterpart because it requires C copying a new array. Subject to fusion. Performs replacement on  invalid scalar values. ?O(n)" Adds a character to the end of a . This copies the @ entire array in the process, unless fused. Subject to fusion. 0 Performs replacement on invalid scalar values. @O(n) Appends one & to the other by copying both of them  into a new . Subject to fusion. AO(1)" Returns the first character of a , which must be  non-empty. Subject to fusion. BO(1)+ Returns the first character and rest of a , or  g if empty. Subject to fusion. CO(1)! Returns the last character of a , which must be  non-empty. Subject to fusion. DO(1), Returns all characters after the head of a , which ( must be non-empty. Subject to fusion. EO(1)) Returns all but the last character of a  , which must # be non-empty. Subject to fusion. FO(1) Tests whether a  is empty or not. Subject to  fusion. GO(n)' Returns the number of characters in a .  Subject to fusion. HO(n)& Compare the count of characters in a  to a number.  Subject to fusion. DThis function gives the same answer as comparing against the result  of G6, but can short circuit if the count of characters is 7 greater than the number, and hence be more efficient. IO(n) I f t is the  obtained by applying f to  each element of t/. Subject to fusion. Performs replacement on  invalid scalar values. JO(n) The J function takes a  and a list of  :s and concatenates the list after interspersing the first , argument between each element of the list. KO(n) The K* function takes a character and places it  between the characters of a  . Subject to fusion. Performs ' replacement on invalid scalar values. LO(n)8 Reverse the characters of a string. Subject to fusion. MO(m+n)9 Replace every occurrence of one substring with another. &In (unlikely) bad cases, this function's time complexity degrades  towards O(n*m). NO(n); Convert a string to folded case. This function is mainly A 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 y?The result string may be longer than the input string, and may  differ from applying O% 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. OO(n)3 Convert a string to lower case, using simple case E conversion. 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). PO(n)3 Convert a string to upper case, using simple case E 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". QO(n)6 Left-justify a string to the given length, using the ; specified fill character on the right. Subject to fusion. 0 Performs replacement on invalid scalar values.  Examples: ) justifyLeft 7 'x' "foo" == "fooxxxx" ( justifyLeft 3 'x' "foobar" == "foobar" RO(n)7 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" SO(n): Center a string to the given length, using the specified A fill character on either side. Performs replacement on invalid  scalar values.  Examples:  center 8 'x' "HS" = "xxxHSxxx" TO(n) The T* 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. UO(n) U1, applied to a binary operator, a starting value 6 (typically the left-identity of the operator), and a ,  reduces the 0 using the binary operator, from left to right.  Subject to fusion. VO(n) A strict version of U. Subject to fusion. WO(n) A variant of U& that has no starting value argument, ) and thus must be applied to a non-empty . Subject to fusion. XO(n) A strict version of W. Subject to fusion. YO(n) Y1, applied to a binary operator, a starting value 7 (typically the right-identity of the operator), and a ,  reduces the 0 using the binary operator, from right to left.  Subject to fusion. ZO(n) A variant of Y& 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 satisifes the predicate p. Subject to fusion. ^O(n) ^ p t* determines whether all characters in the   t satisify 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. aO(n) a is similar to U, but returns a list of = successive reduced values from the left. Subject to fusion. 0 Performs replacement on invalid scalar values.  B 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. bO(n) b is a variant of a that has no starting > value argument. Subject to fusion. Performs replacement on  invalid scalar values. 0 scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...] cO(n) c is the right-to-left dual of a . Performs ' replacement on invalid scalar values. 3 scanr f v == reverse . scanl (flip f) v . reverse dO(n) d is a variant of c that has no starting > value argument. Subject to fusion. Performs replacement on  invalid scalar values. eO(n) Like a combination of I and V . Applies a  function to each element of a , passing an accumulating 3 parameter from left to right, and returns a final  . Performs ' replacement on invalid scalar values. fThe f( function behaves like a combination of I and  a strict Y-; it applies a function to each element of a  <, passing an accumulating parameter from right to left, and C returning a final value of this accumulator together with the new  . 0 Performs replacement on invalid scalar values. gO(n*m) g n t is a  consisting of the input  t repeated n times. hO(n), where n" is the length of the result. The h # function is analogous to the List . h builds a  7 from a seed value. The function takes the element and  returns g if it is done producing the  , otherwise  h (a,b). In this case, a is the next  in the  string, and b3 is the seed value for further production. Subject < to fusion. Performs replacement on invalid scalar values. iO(n) Like h, i builds a  from a seed C value. However, the length of the result should be limited by the  first argument to i'. This function is more efficient than  h4 when the maximum length of the result is known and 2 correct, otherwise its performance is similar to h . Subject < to fusion. Performs replacement on invalid scalar values. jO(n) j 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. kO(n) k 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. lO(n) l, applied to a predicate p and a , > returns the longest prefix (possibly empty) of elements that  satisfy p. Subject to fusion. mO(n) m p t$ returns the suffix remaining after  l p t. Subject to fusion. nO(n) n p t$ returns the prefix remaining after - dropping characters that fail the predicate p from the end of  t. Subject to fusion.  Examples: ( dropWhileEnd (=='.') "foo..." == "foo" oO(n) o p t' returns the substring remaining after - dropping characters that fail the predicate p from both the  beginning and end of t. Subject to fusion. pO(n); Remove leading white space from a string. Equivalent to:  dropWhile isSpace qO(n)< Remove trailing white space from a string. Equivalent to:  dropWhileEnd isSpace rO(n)8 Remove leading and trailing white space from a string.  Equivalent to:  dropAround isSpace sO(n) s n t) 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 (j n t, k n t). tO(n) t, applied to a predicate p and text t , returns C a pair whose first element is the longest prefix (possibly empty)  of t of elements that satisfy p, and whose second is the  remainder of the list. uO(n) u is like t, but the prefix returned is ' over elements that fail the predicate p. vO(n)8 Group characters in a string according to a predicate. wO(n)+ Group characters in a string by equality. xO(n)* Return all initial segments of the given  , shortest  first. yO(n)( Return all final segments of the given  , longest  first. zO(m+n) Break a $ into pieces separated by the first  : argument, consuming the delimiter. An empty delimiter is 0 invalid, and will cause an error to be raised.  Examples:  8 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 2 splitOn (singleton c) == split (==c) &In (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 C resulting components do not contain the separators. Two adjacent = separators result in an empty component in the output. eg. 0 split (=='a') "aabbaca" == ["","","bb","c",""] ! split (=='a') "" == [""] |O(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: 1 chunksOf 3 "foobarbaz" == ["foo","bar","baz"] 3 chunksOf 4 "haskell.org" == ["hask","ell.","org"] }O(n) The }" function takes a predicate and a , and 6 returns the first element matching the predicate, or g if  there is no such element. ~O(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. 3 partition p t == (filter p t, filter (not . p) t) O(n) , applied to a predicate and a ,  returns a . containing those characters that satisfy the  predicate. O(n+m) Find the first instance of needle (which must be  non-F) 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 3 where (prefix, match) = breakOn needle haystack BIf you need to break a string by a substring repeatedly (e.g. you 6 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). 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  haystack9. Each element of the returned list consists of a pair:  The entire string prior to the kth match (i.e. the prefix)  The k2th match, followed by the remainder of the string  Examples:   breakOnAll "::" ""  ==> []  breakOnAll "/" "a/b/c/" 6 ==> [("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. O(n) . index (subscript) operator, starting from 0. O(n) The " function takes a predicate and a  3 and returns the index of the first element in the  satisfying # the predicate. Subject to fusion. O(n+m) The * function returns the number of times the # query string appears in the given . An empty query string is 0 invalid, and will cause an error to be raised. &In (unlikely) bad cases, this function's time complexity degrades  towards O(n*m). O(n)  takes two s and returns a list of , corresponding pairs of bytes. If one input  is short,  excess elements of the longer  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. 0 Performs replacement on invalid scalar values. O(n) Breaks a ' up into a list of words, delimited by s  representing white space. O(n) Breaks a  up into a list of s at  newline 2s. The resulting strings do not contain newlines. O(n)7 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  > iff the first is a prefix of the second. Subject to fusion. O(n) The  function takes two s and returns  * iff the first is a suffix of the second. O(n+m) The  function takes two s and returns  9 iff 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). O(n)6 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 4 fnordLength _ = -1 O(n)9 Find the longest non-empty common prefix of two strings E and return it, along with the suffixes of each string at which they  no longer match. CIf the strings do not have a common prefix or either one is empty,  this function returns g.  Examples: @ commonPrefixes "foobar" "fooquux" == Just ("foo","bar","quux") . commonPrefixes "veeble" "fetzer" == Nothing . commonPrefixes "" "baz" == Nothing O(n)6 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 2 quuxLength _ = -1 _;<=>?@ABCDEFGHIJKLMText to search for Replacement text  Input text NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~needle to search for haystack in which to search Y;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Y;<=>?@BACDEFGHIJKTLMNOPQRSUVWXYZ[\]^_`abcdefghijklmnorpqsutwvxyz{|}~_;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~$GHC experimentalbos@serpentine.com Safe-InferedBRead 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. ?Read a single chunk of strict text from a buffer. Used by both 6 the strict and lazy implementations of hGetContents. GHC experimentalbos@serpentine.com Safe-Infered The 3 function reads a file and returns the contents of B the file as a string. The entire file is read strictly, as with  . @Write a string to a file. The file is truncated to zero length  before writing begins. "Write a string the end of a file. !Read the remaining contents of a  as a string. The  6 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 E lower-level buffering abstraction, and concatenates the chunks into 5 a single string once the entire file has been read. CAs 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. "Read a single line from a handle. Write a string to a handle. 3Write a string to a handle, followed by a newline. The # function takes a function of type  Text -> Text E as its argument. The entire input from the standard input device is C 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. GHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-Infered 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  with a strict, tail-recursive,  accumulating left fold. >Currently set to 16 KiB, less the memory management overhead. ACurrently set to 128 bytes, less the memory management overhead. FThe memory management overhead. Currently this is tuned for GHC only. %GHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-InferedO(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,  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)5 stream index (subscript) operator, starting from 0. O(n) The count0 function returns the number of times the query & element appears in the given stream. &GHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-InferedO(n+m)4 Find the offsets of all non-overlapping indices of  needle within haystack. This function is strict in needle , and lazy (as far as possible)  in the chunks of haystack. 'In (unlikely) bad cases, this algorithm's complexity degrades  towards O(n*m). Substring to search for (needle) Text to search in (haystack)  GHC experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-InferedZO(n) Convert a f into a . CSubject to fusion. Performs replacement on invalid scalar values. O(n) Convert a  into a f.  Subject to fusion. O(1)6 Convert a character into a Text. Subject to fusion. 0 Performs replacement on invalid scalar values. O(c) Convert a list of strict s into a lazy . O(n) Convert a lazy  into a list of strict s. O(n) Convert a lazy  into a strict . O(c) Convert a strict  into a lazy . O(n)$ Adds a character to the front of a . This function  is more costly than its List! counterpart because it requires * copying a new array. Subject to fusion. O(n)" Adds a character to the end of a . 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  g 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(1)) 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)! 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. DThis function gives the same answer as comparing against the result  of 6, but can short circuit if the count of characters is 7 greater than the number, and hence be more efficient. O(n)  f t is the  obtained by applying f to  each element of t/. Subject to fusion. Performs replacement on  invalid scalar values. O(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. O(n) The * function takes a character and places it  between the characters of a  . Subject to fusion. Performs ' replacement on invalid scalar values. O(n)6 Left-justify a string to the given length, using the E specified fill character on the right. Subject to fusion. Performs ' replacement on invalid scalar values.  Examples: ) justifyLeft 7 'x' "foo" == "fooxxxx" ( justifyLeft 3 'x' "foobar" == "foobar" O(n)7 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" O(n): Center a string to the given length, using the specified A fill character on either side. Performs replacement on invalid  scalar values.  Examples:  center 8 'x' "HS" = "xxxHSxxx" O(n) The * 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. O(n)  t returns the elements of t in reverse order. O(m+n)9 Replace every occurrence of one substring with another. &In (unlikely) bad cases, this function's time complexity degrades  towards O(n*m). 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 y?The result string may be longer than the input string, and may  differ from applying % to the input string. For instance, D the Armenian small ligature men now (U+FB13) is case folded to the B bigram men now (U+0574 U+0576), while the micro sign (U+00B5) is E case folded to the Greek small letter letter mu (U+03BC) instead of  itself. O(n)3 Convert a string to lower case, using simple case E conversion. The result string may be longer than the input string. B 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)3 Convert a string to upper case, using simple case E conversion. The result string may be longer than the input string. A For instance, the German eszett (U+00DF) maps to the two-letter  sequence SS. O(n) 1, applied to a binary operator, a starting value 6 (typically the left-identity of the operator), and a ,  reduces the 0 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 & 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) 1, applied to a binary operator, a starting value 7 (typically the right-identity of the operator), and a ,  reduces the 0 using the binary operator, from right to left.  Subject to fusion. O(n) A variant of & 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 satisifes the predicate p. Subject to fusion. O(n)  p t* determines whether all characters in the   t satisify 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. 0 Performs replacement on invalid scalar values.  B 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  that has no starting > value argument. Subject to fusion. Performs replacement on  invalid scalar values. 0 scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...] O(n)  is the right-to-left dual of  . Performs ' replacement on invalid scalar values. 3 scanr f v == reverse . scanl (flip f) v . reverse O(n)  is a variant of  that has no starting A value argument. Performs replacement on invalid scalar values. O(n) Like a combination of  and  . Applies a  function to each element of a , passing an accumulating 3 parameter from left to right, and returns a final  . 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 C returning a final value of this accumulator together with the new  2. Performs replacement on invalid scalar values. O(n*m)  n t is a  consisting of the input  t repeated n times. O(n), where n" is the length of the result. The  # function is analogous to the List .  builds a  7 from a seed value. The function takes the element and  returns g if it is done producing the  , otherwise  h (a,b). In this case, a is the next  in the  string, and b5 is the seed value for further production. Performs ' replacement on invalid scalar values. O(n) Like ,  builds a  from a seed C value. However, the length of the result should be limited by the  first argument to '. This function is more efficient than  4 when the maximum length of the result is known and 2 correct, otherwise its performance is similar to . 0 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, 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) , applied to a predicate p and a , > returns the longest prefix (possibly empty) of elements that  satisfy p. Subject to fusion. O(n)  p t$ returns the suffix remaining after   p t. Subject to fusion. O(n)  p t$ returns the prefix remaining after - dropping characters that fail the predicate p from the end of  t.  Examples: ( dropWhileEnd (=='.') "foo..." == "foo" O(n)  p t' returns the substring remaining after - dropping characters that fail 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 isSpace O(n)< Remove trailing white space from a string. Equivalent to:  dropWhileEnd isSpace O(n)8 Remove leading and trailing white space from a string.  Equivalent to:  dropAround isSpace O(n)  n t) 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). 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:  , breakOn "::" "a::b::c" ==> ("a", "::b::c") + breakOn "/" "foobar" ==> ("foobar", "") Laws:  ! append prefix match == haystack 3 where (prefix, match) = breakOn needle haystack BIf you need to break a string by a substring repeatedly (e.g. you 6 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). 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  haystack9. Each element of the returned list consists of a pair:  The entire string prior to the kth match (i.e. the prefix)  The k2th match, followed by the remainder of the string  Examples:   breakOnAll "::" ""  ==> []  breakOnAll "/" "a/b/c/" 6 ==> [("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. O(n)  is like ", but the prefix returned is over " elements that fail the predicate p. O(n) , applied to a predicate p and text t , returns C a pair whose first element is the longest prefix (possibly empty)  of t of elements that satisfy p, and whose second is the  remainder of the list. The  function takes a  and returns a list of s E such that the concatenation of the result is equal to the argument. D 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. 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, consuming the delimiter. An empty delimiter is 0 invalid, and will cause an error to be raised.  Examples:  8 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 2 splitOn (singleton c) == split (==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). O(n) Splits a * into components delimited by separators, @ where the predicate returns True for a separator element. The C resulting components do not contain the separators. Two adjacent = separators result in an empty component in the output. eg. 0 split (=='a') "aabbaca" == ["","","bb","c",""] ! split (=='a') [] == [""] O(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: 1 chunksOf 3 "foobarbaz" == ["foo","bar","baz"] 3 chunksOf 4 "haskell.org" == ["hask","ell.","org"] O(n) Breaks a  up into a list of s at  newline 2s. The resulting strings do not contain newlines. O(n) Breaks a ' up into a list of words, delimited by s  representing white space. O(n)7 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  > iff the first is a prefix of the second. Subject to fusion. O(n) The  function takes two s and returns  * iff the first is a suffix of the second. O(n+m) The  function takes two s and returns  9 iff 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). O(n)6 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 4 fnordLength _ = -1 O(n)9 Find the longest non-empty common prefix of two strings E and return it, along with the suffixes of each string at which they  no longer match. CIf the strings do not have a common prefix or either one is empty,  this function returns g.  Examples: @ commonPrefixes "foobar" "fooquux" == Just ("foo","bar","quux") . commonPrefixes "veeble" "fetzer" == Nothing . commonPrefixes "" "baz" == Nothing O(n)6 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 2 quuxLength _ = -1 O(n) , applied to a predicate and a ,  returns a . containing those characters that satisfy the  predicate. O(n) The " function takes a predicate and a , and 9 returns the first element in matching the predicate, or g  if there is no such element. O(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. 3 partition p t == (filter p t, filter (not . p) t) O(n) . index (subscript) operator, starting from 0. O(n+m) The * function returns the number of times the # query string appears in the given . An empty query string is 0 invalid, and will cause an error to be raised. &In (unlikely) bad cases, this function's time complexity degrades  towards O(n*m). O(n)  takes two s and returns a list of , corresponding pairs of bytes. If one input  is short,  excess elements of the longer  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. 0 Performs replacement on invalid scalar values. bText to search for Replacement text  Input text needle to search for haystack in which to search Text to split on  Input text     ^^b    GHC experimentalbos@serpentine.com Safe-Infered@Read some text. If the read succeeds, return its value and the - remaining text, otherwise an error message. @Read a decimal integer. The input must begin with at least one C decimal digit, and is consumed until a non-digit or end of string  is reached. DThis function does not handle leading sign characters. If you need  to handle signed input, use  . Note8: For fixed-width integer types, this function does not C attempt to detect overflow, so a sufficiently long input may give < incorrect results. If you are worried about overflow, use    for your result type. >Read a hexadecimal integer, consisting of an optional leading  "0x"; followed by at least one decimal digit. Input is consumed C until a non-hex-digit or end of string is reached. This function  is case insensitive. DThis function does not handle leading sign characters. If you need  to handle signed input, use  . Note8: For fixed-width integer types, this function does not C attempt to detect overflow, so a sufficiently long input may give < incorrect results. If you are worried about overflow, use    for your result type. )Read an optional leading sign character ('-' or '+') and 6 apply it to the result of applying the given reader.  Read a rational number. CThis function accepts an optional leading sign character, followed E 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")  Read 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 4 type supports about 16 decimal places of accuracy. ) For 94.2% of numbers, this function and   give identical D results, but for the remaining 5.8%, this function loses precision = around the 15th decimal place. For 0.001% of numbers, this A function will lose precision at the 13th or 14th decimal place.          GHC experimentalbos@serpentine.com Safe-Infered  >Read a file and return its contents as a string. The file is  read lazily, as with .  @Write 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. "Read a single line from a handle. Write a string to a handle. 3Write a string to a handle, followed by a newline. The # function takes a function of type  Text -> Text E as its argument. The entire input from the standard input device is E passed (lazily) to this function as its argument, and the resulting 1 string is output on the standard output device. Lazily 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.                 portable to Hugs and GHC experimental%Johan Tibell <johan.tibell@gmail.com> Safe-InferedA Builder# is an efficient way to build lazy Text values. E There are several functions for constructing builders, but only one B 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 2 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). A Builder' taking a single character, satisfying   ( c) =  cO(1). A Builder taking a  , 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) = tO(n). Extract a lazy Text from a Builder with a default A 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 D 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. O(1). Pop the strict Text% we have constructed so far, if any, ) yielding a new chunk in the result lazy Text.  'GHC experimentalbos@serpentine.com Safe-Infered&Unsafe conversion for decimal digits.  The normal . function with right associativity instead of  left.   Safe-Infered     Safe-Infered!1Control the rendering of floating point numbers. "(Use decimal notation for values between 0.1 and   9,999,999%, and scientific notation otherwise. #Standard decimal notation. $Scientific notation (e.g. 2.3e123). %Show a signed  value to full precision, I using standard decimal notation for arguments whose absolute value lies  between 0.1 and  9,999,999%, and scientific notation otherwise. !"#$%&$Number of decimal places to render. !"#$%&!$#"%&!$#"%&portable experimentalPbos@serpentine.com, rtomharper@googlemail.com, duncan@haskell.org Safe-Infered' Deprecated . Decode a  ByteString containing 7-bit ASCII  encoded text. "This function is deprecated. Use ) instead. ( Decode a  ByteString containing UTF-8 encoded text. ) Decode a  ByteString- containing UTF-8 encoded text that is known  to be valid. CIf the input contains any invalid UTF-8 data, an exception will be C 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.. ;If the input contains any invalid UTF-8 data, the relevant 9 exception will be returned, otherwise the decoded text. Note: this function is not$ lazy, as it must decode its entire D input before it can return a result. If you need lazy (streaming)  decoding, use ( in lenient mode. ,0Decode text from little endian UTF-16 encoding. -0Decode text from little endian UTF-16 encoding. @If the input contains any invalid little endian UTF-16 data, an B 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 B exception will be thrown. For more control over the handling of  invalid data, use .. 01Encode text using little endian UTF-16 encoding. 1.Encode text using big endian UTF-16 encoding. 20Decode text from little endian UTF-32 encoding. 30Decode text from little endian UTF-32 encoding. @If the input contains any invalid little endian UTF-32 data, an B exception will be thrown. For more control over the handling of  invalid data, use 2. 4-Decode text from big endian UTF-32 encoding. 5-Decode text from big endian UTF-32 encoding. =If the input contains any invalid big endian UTF-32 data, an B exception will be thrown. For more control over the handling of  invalid data, use 4. 61Encode text using little endian UTF-32 encoding. 7.Encode text using big endian UTF-32 encoding. '()*+,-./01234567'()*+,-./01234567')-/35*(,.24+0167'()*+,-./01234567GHC experimentalbos@serpentine.com Safe-Infered8@Read some text. If the read succeeds, return its value and the - remaining text, otherwise an error message. 9@Read a decimal integer. The input must begin with at least one C decimal digit, and is consumed until a non-digit or end of string  is reached. DThis function does not handle leading sign characters. If you need  to handle signed input, use ; 9. Note8: For fixed-width integer types, this function does not C attempt to detect overflow, so a sufficiently long input may give < incorrect results. If you are worried about overflow, use    for your result type. :>Read a hexadecimal integer, consisting of an optional leading  "0x"; followed by at least one decimal digit. Input is consumed C until a non-hex-digit or end of string is reached. This function  is case insensitive. DThis function does not handle leading sign characters. If you need  to handle signed input, use ; :. Note8: For fixed-width integer types, this function does not C attempt to detect overflow, so a sufficiently long input may give < incorrect results. If you are worried about overflow, use    for your result type. ;)Read an optional leading sign character ('-' or '+') and 6 apply it to the result of applying the given reader. <Read a rational number. CThis function accepts an optional leading sign character, followed E 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") =Read 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 4 type supports about 16 decimal places of accuracy. ) For 94.2% of numbers, this function and < give identical D results, but for the remaining 5.8%, this function loses precision = around the 15th decimal place. For 0.001% of numbers, this A function will lose precision at the 13th or 14th decimal place. 89:;<=89:;<=89:;<=89:;<=()*+,-./0123456789:;<=>?@ABBC<DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr2stuvwxyz{|}~B< a b c d e f h g j k l i m n o p q v w x y r 2 s t u z { | } ~    c IJKLMNOPQRSTUVWXY<            !"#qdefghijkl$%&oqstuz{|}~'()*+,-./c012p34: 56789: ;<()=>?@rABmC DgE DjFGH\]IIJKLM!NO"#PQ R S T U V!WXYZ![!\!]!^!@ 5_!`"WXaZ"["\"]"^"@#b cd efghijklm$n$o pq rs rt%>%u%@%m%%%B&b f g h i j k l mvwx yz(){ | } ~   ''  |text-0.11.1.13Data.Text.Encoding.ErrorData.Text.ArrayData.Text.InternalData.Text.ForeignData.Text.Encoding Data.Text Data.Text.IOData.Text.Lazy.InternalData.Text.LazyData.Text.Lazy.ReadData.Text.Lazy.IOData.Text.Lazy.BuilderData.Text.Lazy.Builder.Int Data.Text.Lazy.Builder.RealFloatData.Text.Lazy.EncodingData.Text.ReadData.Text.Encoding.Utf32Data.Text.Fusion.Size*Data.Text.Lazy.Builder.RealFloat.FunctionsData.Text.Fusion.InternalData.Text.Fusion.CaseMappingData.Text.UnsafeShiftData.Text.Unsafe.BaseData.Text.Encoding.Utf16Data.Text.UtilData.Text.Fusion.CommonData.Text.UnsafeCharData.Text.FusionData.Text.UnsafeData.Text.PrivateData.Text.Encoding.Utf8 Data.Text.Encoding.Fusion.CommonData.Text.Encoding.FusionData.Text.Lazy.Encoding.FusionData.Text.SearchData.Text.IO.InternalData.Text.Lazy.FusionData.Text.Lazy.Search Data.Text.Lazy.Builder.FunctionsUnicodeException EncodeError DecodeError OnEncodeError OnDecodeErrorOnError strictDecode lenientDecode strictEncodeignorereplaceMArraymaBAArrayaBAnew unsafeFreeze unsafeIndex unsafeWritetoListemptyrunrun2copyMcopyIequalTexttexttextPshowTextsafefirstf lengthWord16 decodeASCIIdecodeUtf8With decodeUtf8 decodeUtf8' encodeUtf8decodeUtf16LEWith decodeUtf16LEdecodeUtf16BEWith decodeUtf16BE encodeUtf16LE encodeUtf16BEdecodeUtf32LEWith decodeUtf32LEdecodeUtf32BEWith decodeUtf32BE encodeUtf32LE encodeUtf32BEI16fromPtr takeWord16 dropWord16unsafeCopyToPtruseAsPtr asForeignPtrpackunpack singletonconssnocappendheadunconslasttailinitnulllength compareLengthmap intercalate interspersereverse toCaseFoldtoLowertoUpper justifyLeft justifyRightcenter transposefoldlfoldl'foldl1foldl1'foldrfoldr1concat concatMapanyallmaximumminimumscanlscanl1scanrscanr1 mapAccumL mapAccumR replicateunfoldrunfoldrNtakedrop takeWhile dropWhile dropWhileEnd dropAround stripStartstripEndstripsplitAtspanbreakgroupBygroupinitstailssplitOnsplitchunksOffind partitionfilterbreakOn breakOnEnd breakOnAllindex findIndexcountzipzipWithwordslinesunlinesunwords isPrefixOf isSuffixOf isInfixOf stripPrefixcommonPrefixes stripSuffixreadFile writeFile appendFile hGetContentshGetLinehPutStr hPutStrLninteract getContentsgetLineputStrputStrLnChunkEmptystrictInvariant lazyInvariant showStructurechunk foldrChunks foldlChunksdefaultChunkSizesmallChunkSize chunkOverhead fromChunkstoChunkstoStrict fromStrictReaderdecimal hexadecimalsignedrationaldoubleBuilderfromText fromString fromLazyText toLazyTexttoLazyTextWithflushFPFormatGenericFixedExponent realFloatformatRealFloatvalidatesmallerlarger upperBoundSizeexactly exactSizemaxSize unknownSizeisEmpty $fNumSizeroundToSwitchMCCStreamStepYieldSkipDoneS2S1PairS:*:RSRS3RS2RS1RS0M8JN $fOrdStream $fEqStream upperMapping lowerMapping foldMappingbaseGHC.BaseString Data.MaybeNothingJustGHC.Errerror GHC.Exceptionthrow$fExceptionUnicodeException$fShowUnicodeException UnsafeShiftshiftLshiftR$fUnsafeShiftInt$fUnsafeShiftWord64$fUnsafeShiftWord32$fUnsafeShiftWord16inlinePerformIOinlineInterleaveSTGHC.STSTchr2 validate1 validate2lengthIcompareLengthI isSingleton unfoldrNIghc-prim GHC.TypesTrueelemfindByindexI findIndexI countCharI streamList unstreamList justifyLeftIreplicateCharI replicateIGHC.WordWord16ord unsafeChr unsafeChr8 unsafeChr32GHC.ShowshowCharstream reverseStreamunstream reverseScanr countChar unsafeHeadGHC.List unsafeTailiteriter_ reverseIterIterspan_ord2ord3ord4chr3chr4 validate3 validate4 restreamUtf8restreamUtf16BErestreamUtf16LErestreamUtf32BErestreamUtf32LE streamUtf8bytestring-0.9.2.1Data.ByteString.Internal ByteString streamUtf16LE streamUtf16BE streamUtf32BE streamUtf32LEWord8 streamASCIIData.ByteString.Lazy.InternalindicesGHC.PtrPtr Data.List $fDataText $fNFDataText$fIsStringText $fMonoidText $fReadText $fShowText $fOrdText$fEqText hGetLineWith readChunkGHC.IO.Handle.TypesHandleGHC.IO.Handle.FDstdinstdoutunstreamChunks integer-gmpGHC.Integer.TypeInteger Text.ReadreadDouble $fMonadParser $fOrdBuilder $fEqBuilder $fShowBuilder$fIsStringBuilder$fMonoidBuilderi2d<> Data.Monoidmappend GHC.Float RealFloat