This file is indexed.

/usr/share/doc/libghc-text-doc/html/Data-Text-Internal-Fusion-Common.html is in libghc-text-doc 1.2.2.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Data.Text.Internal.Fusion.Common</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-Text-Internal-Fusion-Common.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Text-Internal-Fusion-Common.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">text-1.2.2.2: An efficient packed Unicode text type.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>(c) Bryan O'Sullivan 2009 2012</td></tr><tr><th>License</th><td>BSD-style</td></tr><tr><th>Maintainer</th><td>bos@serpentine.com</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>GHC</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Data.Text.Internal.Fusion.Common</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Creation and elimination</a></li><li><a href="#g:2">Basic interface</a></li><li><a href="#g:3">Transformations</a><ul><li><a href="#g:4">Case conversion</a></li><li><a href="#g:5">Justification</a></li></ul></li><li><a href="#g:6">Folds</a><ul><li><a href="#g:7">Special folds</a></li></ul></li><li><a href="#g:8">Construction</a><ul><li><a href="#g:9">Scans</a></li><li><a href="#g:10">Generation and unfolding</a></li></ul></li><li><a href="#g:11">Substrings</a><ul><li><a href="#g:12">Breaking strings</a></li></ul></li><li><a href="#g:13">Predicates</a></li><li><a href="#g:14">Searching</a></li><li><a href="#g:15">Indexing</a></li><li><a href="#g:16">Zipping and unzipping</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p><em>Warning</em>: this is an internal module, and does not have a stable
 API or name. Functions in this module may not check or enforce
 preconditions expected by public modules. Use at your own risk!</p><p>Common stream fusion functionality for text.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:singleton">singleton</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:streamList">streamList</a> :: [a] -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> a</li><li class="src short"><a href="#v:unstreamList">unstreamList</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> a -&gt; [a]</li><li class="src short"><a href="#v:streamCString-35-">streamCString#</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Prim.html#t:Addr-35-">Addr#</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:cons">cons</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:snoc">snoc</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:append">append</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:head">head</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:uncons">uncons</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>, <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>)</li><li class="src short"><a href="#v:last">last</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:tail">tail</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:init">init</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:null">null</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:lengthI">lengthI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; a</li><li class="src short"><a href="#v:compareLengthI">compareLengthI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a></li><li class="src short"><a href="#v:isSingleton">isSingleton</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:map">map</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:intercalate">intercalate</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; [<a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>] -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:intersperse">intersperse</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:toCaseFold">toCaseFold</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:toLower">toLower</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:toTitle">toTitle</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:toUpper">toUpper</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:justifyLeftI">justifyLeftI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:foldl">foldl</a> :: (b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; b) -&gt; b -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; b</li><li class="src short"><a href="#v:foldl-39-">foldl'</a> :: (b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; b) -&gt; b -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; b</li><li class="src short"><a href="#v:foldl1">foldl1</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:foldl1-39-">foldl1'</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:foldr">foldr</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; b</li><li class="src short"><a href="#v:foldr1">foldr1</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:concat">concat</a> :: [<a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>] -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:concatMap">concatMap</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:any">any</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:all">all</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:maximum">maximum</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:minimum">minimum</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:scanl">scanl</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:replicateCharI">replicateCharI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:replicateI">replicateI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int64">Int64</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:unfoldr">unfoldr</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>, a)) -&gt; a -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:unfoldrNI">unfoldrNI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; (b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>, b)) -&gt; b -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:take">take</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:drop">drop</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:takeWhile">takeWhile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:dropWhile">dropWhile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:isPrefixOf">isPrefixOf</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> a -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:elem">elem</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:filter">filter</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:findBy">findBy</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:indexI">indexI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:findIndexI">findIndexI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a</li><li class="src short"><a href="#v:countCharI">countCharI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; a</li><li class="src short"><a href="#v:zipWith">zipWith</a> :: (a -&gt; a -&gt; b) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> a -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> a -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> b</li></ul></div><div id="interface"><h1 id="g:1">Creation and elimination</h1><div class="top"><p class="src"><a id="v:singleton" class="def">singleton</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#singleton" class="link">Source</a> <a href="#v:singleton" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:streamList" class="def">streamList</a> :: [a] -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> a <a href="src/Data-Text-Internal-Fusion-Common.html#streamList" class="link">Source</a> <a href="#v:streamList" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:unstreamList" class="def">unstreamList</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> a -&gt; [a] <a href="src/Data-Text-Internal-Fusion-Common.html#unstreamList" class="link">Source</a> <a href="#v:unstreamList" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:streamCString-35-" class="def">streamCString#</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Prim.html#t:Addr-35-">Addr#</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#streamCString%23" class="link">Source</a> <a href="#v:streamCString-35-" class="selflink">#</a></p><div class="doc"><p>Stream the UTF-8-like packed encoding used by GHC to represent
 constant strings in generated code.</p><p>This encoding uses the byte sequence &quot;xc0x80&quot; to represent NUL,
 and the string is NUL-terminated.</p></div></div><h1 id="g:2">Basic interface</h1><div class="top"><p class="src"><a id="v:cons" class="def">cons</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#cons" class="link">Source</a> <a href="#v:cons" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Adds a character to the front of a Stream Char.</p></div></div><div class="top"><p class="src"><a id="v:snoc" class="def">snoc</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#snoc" class="link">Source</a> <a href="#v:snoc" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Adds a character to the end of a stream.</p></div></div><div class="top"><p class="src"><a id="v:append" class="def">append</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#append" class="link">Source</a> <a href="#v:append" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Appends one Stream to the other.</p></div></div><div class="top"><p class="src"><a id="v:head" class="def">head</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#head" class="link">Source</a> <a href="#v:head" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> Returns the first character of a Text, which must be non-empty.
 Subject to array fusion.</p></div></div><div class="top"><p class="src"><a id="v:uncons" class="def">uncons</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>, <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>) <a href="src/Data-Text-Internal-Fusion-Common.html#uncons" class="link">Source</a> <a href="#v:uncons" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> Returns the first character and remainder of a 'Stream
 Char', or <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> if empty.  Subject to array fusion.</p></div></div><div class="top"><p class="src"><a id="v:last" class="def">last</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#last" class="link">Source</a> <a href="#v:last" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Returns the last character of a 'Stream Char', which must
 be non-empty.</p></div></div><div class="top"><p class="src"><a id="v:tail" class="def">tail</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#tail" class="link">Source</a> <a href="#v:tail" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> Returns all characters after the head of a Stream Char, which must
 be non-empty.</p></div></div><div class="top"><p class="src"><a id="v:init" class="def">init</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#init" class="link">Source</a> <a href="#v:init" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> Returns all but the last character of a Stream Char, which
 must be non-empty.</p></div></div><div class="top"><p class="src"><a id="v:null" class="def">null</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Text-Internal-Fusion-Common.html#null" class="link">Source</a> <a href="#v:null" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> Tests whether a Stream Char is empty or not.</p></div></div><div class="top"><p class="src"><a id="v:lengthI" class="def">lengthI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; a <a href="src/Data-Text-Internal-Fusion-Common.html#lengthI" class="link">Source</a> <a href="#v:lengthI" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Returns the number of characters in a string.</p></div></div><div class="top"><p class="src"><a id="v:compareLengthI" class="def">compareLengthI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="src/Data-Text-Internal-Fusion-Common.html#compareLengthI" class="link">Source</a> <a href="#v:compareLengthI" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Compares the count of characters in a string to a number.
 Subject to fusion.</p><p>This function gives the same answer as comparing against the result
 of <code><a href="Data-Text-Internal-Fusion-Common.html#v:lengthI">lengthI</a></code>, 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.</p></div></div><div class="top"><p class="src"><a id="v:isSingleton" class="def">isSingleton</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Text-Internal-Fusion-Common.html#isSingleton" class="link">Source</a> <a href="#v:isSingleton" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Indicate whether a string contains exactly one element.</p></div></div><h1 id="g:3">Transformations</h1><div class="top"><p class="src"><a id="v:map" class="def">map</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#map" class="link">Source</a> <a href="#v:map" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> <code><a href="Data-Text-Internal-Fusion-Common.html#v:map">map</a></code> <code>f </code>xs is the Stream Char obtained by applying <code>f</code>
 to each element of <code>xs</code>.</p></div></div><div class="top"><p class="src"><a id="v:intercalate" class="def">intercalate</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; [<a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>] -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#intercalate" class="link">Source</a> <a href="#v:intercalate" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:intersperse" class="def">intersperse</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#intersperse" class="link">Source</a> <a href="#v:intersperse" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Take a character and place it between each of the
 characters of a 'Stream Char'.</p></div></div><h2 id="g:4">Case conversion</h2><div class="doc"><p>With Unicode text, it is incorrect to use combinators like <code>map
 toUpper</code> to case convert each character of a string individually.
 Instead, use the whole-string case conversion functions from this
 module.  For correctness in different writing systems, these
 functions may map one input character to two or three output
 characters.</p></div><div class="top"><p class="src"><a id="v:toCaseFold" class="def">toCaseFold</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#toCaseFold" class="link">Source</a> <a href="#v:toCaseFold" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Convert a string to folded case.  This function is mainly
 useful for performing caseless (or case insensitive) string
 comparisons.</p><p>A string <code>x</code> is a caseless match for a string <code>y</code> if and only if:</p><pre>toCaseFold x == toCaseFold y</pre><p>The result string may be longer than the input string, and may
 differ from applying <code><a href="Data-Text-Internal-Fusion-Common.html#v:toLower">toLower</a></code> 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.</p></div></div><div class="top"><p class="src"><a id="v:toLower" class="def">toLower</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#toLower" class="link">Source</a> <a href="#v:toLower" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> 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).</p></div></div><div class="top"><p class="src"><a id="v:toTitle" class="def">toTitle</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#toTitle" class="link">Source</a> <a href="#v:toTitle" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Convert a string to title case, using simple case
 conversion.</p><p>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.</p><p>The result string may be longer than the input string. For example,
 the Latin small ligature &#64258; (U+FB02) is converted to the
 sequence Latin capital letter F (U+0046) followed by Latin small
 letter l (U+006C).</p><p><em>Note</em>: 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 &quot;The Hill of the Red
 Fox&quot; is correctly title cased&#8212;but this function will
 capitalize <em>every</em> word.</p></div></div><div class="top"><p class="src"><a id="v:toUpper" class="def">toUpper</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#toUpper" class="link">Source</a> <a href="#v:toUpper" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> 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.</p></div></div><h2 id="g:5">Justification</h2><div class="top"><p class="src"><a id="v:justifyLeftI" class="def">justifyLeftI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#justifyLeftI" class="link">Source</a> <a href="#v:justifyLeftI" class="selflink">#</a></p></div><h1 id="g:6">Folds</h1><div class="top"><p class="src"><a id="v:foldl" class="def">foldl</a> :: (b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; b) -&gt; b -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; b <a href="src/Data-Text-Internal-Fusion-Common.html#foldl" class="link">Source</a> <a href="#v:foldl" class="selflink">#</a></p><div class="doc"><p>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.</p></div></div><div class="top"><p class="src"><a id="v:foldl-39-" class="def">foldl'</a> :: (b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; b) -&gt; b -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; b <a href="src/Data-Text-Internal-Fusion-Common.html#foldl%27" class="link">Source</a> <a href="#v:foldl-39-" class="selflink">#</a></p><div class="doc"><p>A strict version of foldl.</p></div></div><div class="top"><p class="src"><a id="v:foldl1" class="def">foldl1</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#foldl1" class="link">Source</a> <a href="#v:foldl1" class="selflink">#</a></p><div class="doc"><p>foldl1 is a variant of foldl that has no starting value argument,
 and thus must be applied to non-empty Streams.</p></div></div><div class="top"><p class="src"><a id="v:foldl1-39-" class="def">foldl1'</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#foldl1%27" class="link">Source</a> <a href="#v:foldl1-39-" class="selflink">#</a></p><div class="doc"><p>A strict version of foldl1.</p></div></div><div class="top"><p class="src"><a id="v:foldr" class="def">foldr</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; b <a href="src/Data-Text-Internal-Fusion-Common.html#foldr" class="link">Source</a> <a href="#v:foldr" class="selflink">#</a></p><div class="doc"><p><code><a href="Data-Text-Internal-Fusion-Common.html#v:foldr">foldr</a></code>, 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.</p></div></div><div class="top"><p class="src"><a id="v:foldr1" class="def">foldr1</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#foldr1" class="link">Source</a> <a href="#v:foldr1" class="selflink">#</a></p><div class="doc"><p>foldr1 is a variant of <code><a href="Data-Text-Internal-Fusion-Common.html#v:foldr">foldr</a></code> that has no starting value argument,
 and thus must be applied to non-empty streams.
 Subject to array fusion.</p></div></div><h2 id="g:7">Special folds</h2><div class="top"><p class="src"><a id="v:concat" class="def">concat</a> :: [<a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>] -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#concat" class="link">Source</a> <a href="#v:concat" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Concatenate a list of streams. Subject to array fusion.</p></div></div><div class="top"><p class="src"><a id="v:concatMap" class="def">concatMap</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#concatMap" class="link">Source</a> <a href="#v:concatMap" class="selflink">#</a></p><div class="doc"><p>Map a function over a stream that results in a stream and concatenate the
 results.</p></div></div><div class="top"><p class="src"><a id="v:any" class="def">any</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Text-Internal-Fusion-Common.html#any" class="link">Source</a> <a href="#v:any" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> any <code>p </code>xs determines if any character in the stream
 <code>xs</code> satisfies the predicate <code>p</code>.</p></div></div><div class="top"><p class="src"><a id="v:all" class="def">all</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Text-Internal-Fusion-Common.html#all" class="link">Source</a> <a href="#v:all" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> all <code>p </code>xs determines if all characters in the <code>Text</code>
 <code>xs</code> satisfy the predicate <code>p</code>.</p></div></div><div class="top"><p class="src"><a id="v:maximum" class="def">maximum</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#maximum" class="link">Source</a> <a href="#v:maximum" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> maximum returns the maximum value from a stream, which must be
 non-empty.</p></div></div><div class="top"><p class="src"><a id="v:minimum" class="def">minimum</a> :: <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#minimum" class="link">Source</a> <a href="#v:minimum" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> minimum returns the minimum value from a <code>Text</code>, which must be
 non-empty.</p></div></div><h1 id="g:8">Construction</h1><h2 id="g:9">Scans</h2><div class="top"><p class="src"><a id="v:scanl" class="def">scanl</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#scanl" class="link">Source</a> <a href="#v:scanl" class="selflink">#</a></p></div><h2 id="g:10">Generation and unfolding</h2><div class="top"><p class="src"><a id="v:replicateCharI" class="def">replicateCharI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#replicateCharI" class="link">Source</a> <a href="#v:replicateCharI" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:replicateI" class="def">replicateI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int64">Int64</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#replicateI" class="link">Source</a> <a href="#v:replicateI" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:unfoldr" class="def">unfoldr</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>, a)) -&gt; a -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#unfoldr" class="link">Source</a> <a href="#v:unfoldr" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em>, where <code>n</code> is the length of the result. The unfoldr function
 is analogous to the List <code><a href="Data-Text-Internal-Fusion-Common.html#v:unfoldr">unfoldr</a></code>. 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.</p></div></div><div class="top"><p class="src"><a id="v:unfoldrNI" class="def">unfoldrNI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; (b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>, b)) -&gt; b -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#unfoldrNI" class="link">Source</a> <a href="#v:unfoldrNI" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Like <code><a href="Data-Text-Internal-Fusion-Common.html#v:unfoldr">unfoldr</a></code>, <code><a href="Data-Text-Internal-Fusion-Common.html#v:unfoldrNI">unfoldrNI</a></code> builds a stream from a seed
 value. However, the length of the result is limited by the
 first argument to <code><a href="Data-Text-Internal-Fusion-Common.html#v:unfoldrNI">unfoldrNI</a></code>. This function is more efficient than
 <code><a href="Data-Text-Internal-Fusion-Common.html#v:unfoldr">unfoldr</a></code> when the length of the result is known.</p></div></div><h1 id="g:11">Substrings</h1><h2 id="g:12">Breaking strings</h2><div class="top"><p class="src"><a id="v:take" class="def">take</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#take" class="link">Source</a> <a href="#v:take" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> take n, applied to a stream, returns the prefix of the
 stream of length <code>n</code>, or the stream itself if <code>n</code> is greater than the
 length of the stream.</p></div></div><div class="top"><p class="src"><a id="v:drop" class="def">drop</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#drop" class="link">Source</a> <a href="#v:drop" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> drop n, applied to a stream, returns the suffix of the
 stream after the first <code>n</code> characters, or the empty stream if <code>n</code>
 is greater than the length of the stream.</p></div></div><div class="top"><p class="src"><a id="v:takeWhile" class="def">takeWhile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#takeWhile" class="link">Source</a> <a href="#v:takeWhile" class="selflink">#</a></p><div class="doc"><p>takeWhile, applied to a predicate <code>p</code> and a stream, returns the
 longest prefix (possibly empty) of elements that satisfy p.</p></div></div><div class="top"><p class="src"><a id="v:dropWhile" class="def">dropWhile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#dropWhile" class="link">Source</a> <a href="#v:dropWhile" class="selflink">#</a></p><div class="doc"><p>dropWhile <code>p </code>xs returns the suffix remaining after takeWhile <code>p </code>xs.</p></div></div><h1 id="g:13">Predicates</h1><div class="top"><p class="src"><a id="v:isPrefixOf" class="def">isPrefixOf</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> a -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Text-Internal-Fusion-Common.html#isPrefixOf" class="link">Source</a> <a href="#v:isPrefixOf" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> The <code><a href="Data-Text-Internal-Fusion-Common.html#v:isPrefixOf">isPrefixOf</a></code> function takes two <code><a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a></code>s and returns
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#v:True">True</a></code> iff the first is a prefix of the second.</p></div></div><h1 id="g:14">Searching</h1><div class="top"><p class="src"><a id="v:elem" class="def">elem</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Text-Internal-Fusion-Common.html#elem" class="link">Source</a> <a href="#v:elem" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> elem is the stream membership predicate.</p></div></div><div class="top"><p class="src"><a id="v:filter" class="def">filter</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#filter" class="link">Source</a> <a href="#v:filter" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> <code><a href="Data-Text-Internal-Fusion-Common.html#v:filter">filter</a></code>, applied to a predicate and a stream,
 returns a stream containing those characters that satisfy the
 predicate.</p></div></div><h1 id="g:15">Indexing</h1><div class="top"><p class="src"><a id="v:findBy" class="def">findBy</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#findBy" class="link">Source</a> <a href="#v:findBy" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> The <code><a href="Data-Text-Internal-Fusion-Common.html#v:findBy">findBy</a></code> function takes a predicate and a stream,
 and returns the first element in matching the predicate, or <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code>
 if there is no such element.</p></div></div><div class="top"><p class="src"><a id="v:indexI" class="def">indexI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Internal-Fusion-Common.html#indexI" class="link">Source</a> <a href="#v:indexI" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> Stream index (subscript) operator, starting from 0.</p></div></div><div class="top"><p class="src"><a id="v:findIndexI" class="def">findIndexI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a <a href="src/Data-Text-Internal-Fusion-Common.html#findIndexI" class="link">Source</a> <a href="#v:findIndexI" class="selflink">#</a></p><div class="doc"><p>The <code><a href="Data-Text-Internal-Fusion-Common.html#v:findIndexI">findIndexI</a></code> function takes a predicate and a stream and
 returns the index of the first element in the stream satisfying the
 predicate.</p></div></div><div class="top"><p class="src"><a id="v:countCharI" class="def">countCharI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -&gt; a <a href="src/Data-Text-Internal-Fusion-Common.html#countCharI" class="link">Source</a> <a href="#v:countCharI" class="selflink">#</a></p><div class="doc"><p><em>O(n)</em> The <code><a href="Data-Text-Internal-Fusion-Common.html#v:countCharI">countCharI</a></code> function returns the number of times the
 query element appears in the given stream.</p></div></div><h1 id="g:16">Zipping and unzipping</h1><div class="top"><p class="src"><a id="v:zipWith" class="def">zipWith</a> :: (a -&gt; a -&gt; b) -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> a -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> a -&gt; <a href="Data-Text-Internal-Fusion-Types.html#t:Stream">Stream</a> b <a href="src/Data-Text-Internal-Fusion-Common.html#zipWith" class="link">Source</a> <a href="#v:zipWith" class="selflink">#</a></p><div class="doc"><p>zipWith generalises <code>zip</code> by zipping with the function given as
 the first argument, instead of a tupling function.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>