This file is indexed.

/usr/share/doc/libghc-extra-doc/html/Extra.html is in libghc-extra-doc 1.4.10-3.

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
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
<!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>Extra</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_Extra.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Extra.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">extra-1.4.10: Extra functions I use.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Extra</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Control.Concurrent.Extra</a></li><li><a href="#g:2">Control.Exception.Extra</a></li><li><a href="#g:3">Control.Monad.Extra</a></li><li><a href="#g:4">Data.Either.Extra</a></li><li><a href="#g:5">Data.IORef.Extra</a></li><li><a href="#g:6">Data.List.Extra</a></li><li><a href="#g:7">Data.Tuple.Extra</a></li><li><a href="#g:8">Data.Typeable.Extra</a></li><li><a href="#g:9">Data.Version.Extra</a></li><li><a href="#g:10">Numeric.Extra</a></li><li><a href="#g:11">System.Directory.Extra</a></li><li><a href="#g:12">System.Environment.Extra</a></li><li><a href="#g:13">System.Info.Extra</a></li><li><a href="#g:14">System.IO.Extra</a></li><li><a href="#g:15">System.Process.Extra</a></li><li><a href="#g:16">System.Time.Extra</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module documents all the functions available in this package.</p><p>Most users should import the specific modules (e.g. <code><a href="Data-List-Extra.html">Data.List.Extra</a></code>), which
   also reexport their non-<code>Extra</code> modules (e.g. <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-List.html">Data.List</a></code>).</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:getNumCapabilities">getNumCapabilities</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:setNumCapabilities">setNumCapabilities</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withNumCapabilities">withNumCapabilities</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:forkFinally">forkFinally</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Concurrent.html#t:ThreadId">ThreadId</a></li><li class="src short"><a href="#v:once">once</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a)</li><li class="src short"><a href="#v:onceFork">onceFork</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a)</li><li class="src short"><span class="keyword">data</span> <a href="#t:Lock">Lock</a></li><li class="src short"><a href="#v:newLock">newLock</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="Extra.html#t:Lock">Lock</a></li><li class="src short"><a href="#v:withLock">withLock</a> :: <a href="Extra.html#t:Lock">Lock</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:withLockTry">withLockTry</a> :: <a href="Extra.html#t:Lock">Lock</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</li><li class="src short"><span class="keyword">data</span> <a href="#t:Var">Var</a> a</li><li class="src short"><a href="#v:newVar">newVar</a> :: a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="Extra.html#t:Var">Var</a> a)</li><li class="src short"><a href="#v:readVar">readVar</a> :: <a href="Extra.html#t:Var">Var</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:modifyVar">modifyVar</a> :: <a href="Extra.html#t:Var">Var</a> a -&gt; (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (a, b)) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> b</li><li class="src short"><a href="#v:modifyVar_">modifyVar_</a> :: <a href="Extra.html#t:Var">Var</a> a -&gt; (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withVar">withVar</a> :: <a href="Extra.html#t:Var">Var</a> a -&gt; (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> b) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> b</li><li class="src short"><span class="keyword">data</span> <a href="#t:Barrier">Barrier</a> a</li><li class="src short"><a href="#v:newBarrier">newBarrier</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="Extra.html#t:Barrier">Barrier</a> a)</li><li class="src short"><a href="#v:signalBarrier">signalBarrier</a> :: <a href="Extra.html#t:Barrier">Barrier</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:waitBarrier">waitBarrier</a> :: <a href="Extra.html#t:Barrier">Barrier</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:waitBarrierMaybe">waitBarrierMaybe</a> :: <a href="Extra.html#t:Barrier">Barrier</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</li><li class="src short"><a href="#v:retry">retry</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:retryBool">retryBool</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; (e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:showException">showException</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> e =&gt; e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:stringException">stringException</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:errorIO">errorIO</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:displayException">displayException</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:ignore">ignore</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:catch_">catch_</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:handle_">handle_</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:try_">try_</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> a)</li><li class="src short"><a href="#v:catchJust_">catchJust_</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; (b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:handleJust_">handleJust_</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b) -&gt; (b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:tryJust_">tryJust_</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b a)</li><li class="src short"><a href="#v:catchBool">catchBool</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; (e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; (e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:handleBool">handleBool</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; (e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; (e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:tryBool">tryBool</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; (e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> e a)</li><li class="src short"><a href="#v:whenJust">whenJust</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Applicative">Applicative</a> m =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a -&gt; (a -&gt; m ()) -&gt; m ()</li><li class="src short"><a href="#v:whenJustM">whenJustM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -&gt; (a -&gt; m ()) -&gt; m ()</li><li class="src short"><a href="#v:unit">unit</a> :: m () -&gt; m ()</li><li class="src short"><a href="#v:maybeM">maybeM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m b -&gt; (a -&gt; m b) -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -&gt; m b</li><li class="src short"><a href="#v:eitherM">eitherM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m c) -&gt; (b -&gt; m c) -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a b) -&gt; m c</li><li class="src short"><a href="#v:loopM">loopM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a b)) -&gt; a -&gt; m b</li><li class="src short"><a href="#v:whileM">whileM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m ()</li><li class="src short"><a href="#v:partitionM">partitionM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; m ([a], [a])</li><li class="src short"><a href="#v:concatMapM">concatMapM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m [b]) -&gt; [a] -&gt; m [b]</li><li class="src short"><a href="#v:concatForM">concatForM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; [a] -&gt; (a -&gt; m [b]) -&gt; m [b]</li><li class="src short"><a href="#v:mconcatMapM">mconcatMapM</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> b) =&gt; (a -&gt; m b) -&gt; [a] -&gt; m b</li><li class="src short"><a href="#v:mapMaybeM">mapMaybeM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b)) -&gt; [a] -&gt; m [b]</li><li class="src short"><a href="#v:findM">findM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</li><li class="src short"><a href="#v:firstJustM">firstJustM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b)) -&gt; [a] -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b)</li><li class="src short"><a href="#v:whenM">whenM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m () -&gt; m ()</li><li class="src short"><a href="#v:unlessM">unlessM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m () -&gt; m ()</li><li class="src short"><a href="#v:ifM">ifM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m a -&gt; m a -&gt; m a</li><li class="src short"><a href="#v:notM">notM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-124--124--94-">(||^)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-38--38--94-">(&amp;&amp;^)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:orM">orM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; [m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>] -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:andM">andM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; [m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>] -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:anyM">anyM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:allM">allM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isLeft">isLeft</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isRight">isRight</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:fromLeft">fromLeft</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> l r -&gt; l</li><li class="src short"><a href="#v:fromRight">fromRight</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> l r -&gt; r</li><li class="src short"><a href="#v:fromEither">fromEither</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a a -&gt; a</li><li class="src short"><a href="#v:modifyIORef-39-">modifyIORef'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#t:IORef">IORef</a> a -&gt; (a -&gt; a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:writeIORef-39-">writeIORef'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#t:IORef">IORef</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:atomicModifyIORef-39-">atomicModifyIORef'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#t:IORef">IORef</a> a -&gt; (a -&gt; (a, b)) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> b</li><li class="src short"><a href="#v:atomicWriteIORef">atomicWriteIORef</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#t:IORef">IORef</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:atomicWriteIORef-39-">atomicWriteIORef'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#t:IORef">IORef</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:lower">lower</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:upper">upper</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:trim">trim</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:trimStart">trimStart</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:trimEnd">trimEnd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:word1">word1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>)</li><li class="src short"><a href="#v:line1">line1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>)</li><li class="src short"><a href="#v:dropEnd">dropEnd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:takeEnd">takeEnd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:splitAtEnd">splitAtEnd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; [a] -&gt; ([a], [a])</li><li class="src short"><a href="#v:breakEnd">breakEnd</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; ([a], [a])</li><li class="src short"><a href="#v:spanEnd">spanEnd</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; ([a], [a])</li><li class="src short"><a href="#v:dropWhileEnd">dropWhileEnd</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:dropWhileEnd-39-">dropWhileEnd'</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:takeWhileEnd">takeWhileEnd</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:stripSuffix">stripSuffix</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> [a]</li><li class="src short"><a href="#v:stripInfix">stripInfix</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> ([a], [a])</li><li class="src short"><a href="#v:stripInfixEnd">stripInfixEnd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> ([a], [a])</li><li class="src short"><a href="#v:wordsBy">wordsBy</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [[a]]</li><li class="src short"><a href="#v:linesBy">linesBy</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [[a]]</li><li class="src short"><a href="#v:breakOn">breakOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; ([a], [a])</li><li class="src short"><a href="#v:breakOnEnd">breakOnEnd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; ([a], [a])</li><li class="src short"><a href="#v:splitOn">splitOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; [[a]]</li><li class="src short"><a href="#v:split">split</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [[a]]</li><li class="src short"><a href="#v:chunksOf">chunksOf</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; [a] -&gt; [[a]]</li><li class="src short"><a href="#v:list">list</a> :: b -&gt; (a -&gt; [a] -&gt; b) -&gt; [a] -&gt; b</li><li class="src short"><a href="#v:uncons">uncons</a> :: [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (a, [a])</li><li class="src short"><a href="#v:unsnoc">unsnoc</a> :: [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> ([a], a)</li><li class="src short"><a href="#v:cons">cons</a> :: a -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:snoc">snoc</a> :: [a] -&gt; a -&gt; [a]</li><li class="src short"><a href="#v:drop1">drop1</a> :: [a] -&gt; [a]</li><li class="src short"><a href="#v:mconcatMap">mconcatMap</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> b =&gt; (a -&gt; b) -&gt; [a] -&gt; b</li><li class="src short"><a href="#v:groupSort">groupSort</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> k =&gt; [(k, v)] -&gt; [(k, [v])]</li><li class="src short"><a href="#v:groupSortOn">groupSortOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> b =&gt; (a -&gt; b) -&gt; [a] -&gt; [[a]]</li><li class="src short"><a href="#v:groupSortBy">groupSortBy</a> :: (a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; [a] -&gt; [[a]]</li><li class="src short"><a href="#v:nubOrd">nubOrd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:nubOrdBy">nubOrdBy</a> :: (a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:nubOrdOn">nubOrdOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> b =&gt; (a -&gt; b) -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:nubOn">nubOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> b =&gt; (a -&gt; b) -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:groupOn">groupOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> b =&gt; (a -&gt; b) -&gt; [a] -&gt; [[a]]</li><li class="src short"><a href="#v:sortOn">sortOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> b =&gt; (a -&gt; b) -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:disjoint">disjoint</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:allSame">allSame</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:anySame">anySame</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:repeatedly">repeatedly</a> :: ([a] -&gt; (b, [a])) -&gt; [a] -&gt; [b]</li><li class="src short"><a href="#v:for">for</a> :: [a] -&gt; (a -&gt; b) -&gt; [b]</li><li class="src short"><a href="#v:firstJust">firstJust</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b) -&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b</li><li class="src short"><a href="#v:concatUnzip">concatUnzip</a> :: [([a], [b])] -&gt; ([a], [b])</li><li class="src short"><a href="#v:concatUnzip3">concatUnzip3</a> :: [([a], [b], [c])] -&gt; ([a], [b], [c])</li><li class="src short"><a href="#v:replace">replace</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:merge">merge</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; [a] -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:mergeBy">mergeBy</a> :: (a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; [a] -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:first">first</a> :: (a -&gt; a') -&gt; (a, b) -&gt; (a', b)</li><li class="src short"><a href="#v:second">second</a> :: (b -&gt; b') -&gt; (a, b) -&gt; (a, b')</li><li class="src short"><a href="#v:-42--42--42-">(***)</a> :: (a -&gt; a') -&gt; (b -&gt; b') -&gt; (a, b) -&gt; (a', b')</li><li class="src short"><a href="#v:-38--38--38-">(&amp;&amp;&amp;)</a> :: (a -&gt; b) -&gt; (a -&gt; c) -&gt; a -&gt; (b, c)</li><li class="src short"><a href="#v:dupe">dupe</a> :: a -&gt; (a, a)</li><li class="src short"><a href="#v:both">both</a> :: (a -&gt; b) -&gt; (a, a) -&gt; (b, b)</li><li class="src short"><a href="#v:fst3">fst3</a> :: (a, b, c) -&gt; a</li><li class="src short"><a href="#v:snd3">snd3</a> :: (a, b, c) -&gt; b</li><li class="src short"><a href="#v:thd3">thd3</a> :: (a, b, c) -&gt; c</li><li class="src short"><a href="#v:typeRep">typeRep</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> k a =&gt; proxy a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Typeable-Internal.html#t:TypeRep">TypeRep</a></li><li class="src short"><span class="keyword">data</span> (k <a href="#t::-126-:">:~:</a> a) b :: <span class="keyword">forall</span> k. k -&gt; k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <span class="keyword">where</span><ul class="subs"><li><a href="#v:Refl">Refl</a> :: <a href="Extra.html#t::-126-:">(:~:)</a> k a a</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Proxy">Proxy</a> k t :: <span class="keyword">forall</span> k. k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> = <a href="#v:Proxy">Proxy</a></li><li class="src short"><a href="#v:makeVersion">makeVersion</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Version.html#t:Version">Version</a></li><li class="src short"><a href="#v:readVersion">readVersion</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Version.html#t:Version">Version</a></li><li class="src short"><a href="#v:showDP">showDP</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:RealFloat">RealFloat</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:intToDouble">intToDouble</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:intToFloat">intToFloat</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Float">Float</a></li><li class="src short"><a href="#v:floatToDouble">floatToDouble</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Float">Float</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:doubleToFloat">doubleToFloat</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Double">Double</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Float">Float</a></li><li class="src short"><a href="#v:withCurrentDirectory">withCurrentDirectory</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:createDirectoryPrivate">createDirectoryPrivate</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:listContents">listContents</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>]</li><li class="src short"><a href="#v:listFiles">listFiles</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>]</li><li class="src short"><a href="#v:listFilesInside">listFilesInside</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>]</li><li class="src short"><a href="#v:listFilesRecursive">listFilesRecursive</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>]</li><li class="src short"><a href="#v:getExecutablePath">getExecutablePath</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:lookupEnv">lookupEnv</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>)</li><li class="src short"><a href="#v:isWindows">isWindows</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isMac">isMac</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:captureOutput">captureOutput</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>, a)</li><li class="src short"><a href="#v:withBuffering">withBuffering</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle.html#t:Handle">Handle</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle.html#t:BufferMode">BufferMode</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:readFileEncoding">readFileEncoding</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Encoding-Types.html#t:TextEncoding">TextEncoding</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:readFileUTF8">readFileUTF8</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:readFileBinary">readFileBinary</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:readFile-39-">readFile'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:readFileEncoding-39-">readFileEncoding'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Encoding-Types.html#t:TextEncoding">TextEncoding</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:readFileUTF8-39-">readFileUTF8'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:readFileBinary-39-">readFileBinary'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:writeFileEncoding">writeFileEncoding</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Encoding-Types.html#t:TextEncoding">TextEncoding</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:writeFileUTF8">writeFileUTF8</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:writeFileBinary">writeFileBinary</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withTempFile">withTempFile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:withTempDir">withTempDir</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:newTempFile">newTempFile</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ())</li><li class="src short"><a href="#v:newTempDir">newTempDir</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ())</li><li class="src short"><a href="#v:fileEq">fileEq</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:system_">system_</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:systemOutput">systemOutput</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-Exit.html#t:ExitCode">ExitCode</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>)</li><li class="src short"><a href="#v:systemOutput_">systemOutput_</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Seconds">Seconds</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:sleep">sleep</a> :: <a href="Extra.html#t:Seconds">Seconds</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:timeout">timeout</a> :: <a href="Extra.html#t:Seconds">Seconds</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</li><li class="src short"><a href="#v:subtractTime">subtractTime</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> -&gt; <a href="Extra.html#t:Seconds">Seconds</a></li><li class="src short"><a href="#v:showDuration">showDuration</a> :: <a href="Extra.html#t:Seconds">Seconds</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:offsetTime">offsetTime</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="Extra.html#t:Seconds">Seconds</a>)</li><li class="src short"><a href="#v:offsetTimeIncrease">offsetTimeIncrease</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="Extra.html#t:Seconds">Seconds</a>)</li><li class="src short"><a href="#v:duration">duration</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="Extra.html#t:Seconds">Seconds</a>, a)</li></ul></div><div id="interface"><h1 id="g:1">Control.Concurrent.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="Control-Concurrent-Extra.html">Control.Concurrent.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:getNumCapabilities" class="def">getNumCapabilities</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="#v:getNumCapabilities" class="selflink">#</a></p><div class="doc"><p>Returns the number of Haskell threads that can run truly
simultaneously (on separate physical processors) at any given time.  To change
this value, use <code><a href="Extra.html#v:setNumCapabilities">setNumCapabilities</a></code>.</p><p><em>Since: 4.4.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:setNumCapabilities" class="def">setNumCapabilities</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="#v:setNumCapabilities" class="selflink">#</a></p><div class="doc"><p>Set the number of Haskell threads that can run truly simultaneously
(on separate physical processors) at any given time.  The number
passed to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Concurrent.html#v:forkOn">forkOn</a></code> is interpreted modulo this value.  The initial
value is given by the <code>+RTS -N</code> runtime flag.</p><p>This is also the number of threads that will participate in parallel
garbage collection.  It is strongly recommended that the number of
capabilities is not set larger than the number of physical processor
cores, and it may often be beneficial to leave one or more cores free
to avoid contention with other processes in the machine.</p><p><em>Since: 4.5.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:withNumCapabilities" class="def">withNumCapabilities</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/Control-Concurrent-Extra.html#withNumCapabilities" class="link">Source</a> <a href="#v:withNumCapabilities" class="selflink">#</a></p><div class="doc"><p>On GHC 7.6 and above with the <code>-threaded</code> flag, brackets a call to <code><a href="Extra.html#v:setNumCapabilities">setNumCapabilities</a></code>.
   On lower versions (which lack <code><a href="Extra.html#v:setNumCapabilities">setNumCapabilities</a></code>) this function just runs the argument action.</p></div></div><div class="top"><p class="src"><a id="v:forkFinally" class="def">forkFinally</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Concurrent.html#t:ThreadId">ThreadId</a> <a href="#v:forkFinally" class="selflink">#</a></p><div class="doc"><p>Fork a thread and call the supplied function when the thread is about
 to terminate, with an exception or a returned value.  The function is
 called with asynchronous exceptions masked.</p><pre>forkFinally action and_then =
  mask $ \restore -&gt;
    forkIO $ try (restore action) &gt;&gt;= and_then</pre><p>This function is useful for informing the parent when a child
 terminates, for example.</p><p><em>Since: 4.6.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:once" class="def">once</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) <a href="src/Control-Concurrent-Extra.html#once" class="link">Source</a> <a href="#v:once" class="selflink">#</a></p><div class="doc"><p>Given an action, produce a wrapped action that runs at most once.
   If the function raises an exception, the same exception will be reraised each time.</p><pre>let x ||| y = do t1 &lt;- onceFork x; t2 &lt;- onceFork y; t1; t2
\(x :: IO Int) -&gt; void (once x) == return ()
\(x :: IO Int) -&gt; join (once x) == x
\(x :: IO Int) -&gt; (do y &lt;- once x; y; y) == x
\(x :: IO Int) -&gt; (do y &lt;- once x; y ||| y) == x</pre></div></div><div class="top"><p class="src"><a id="v:onceFork" class="def">onceFork</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) <a href="src/Control-Concurrent-Extra.html#onceFork" class="link">Source</a> <a href="#v:onceFork" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:once">once</a></code>, but immediately starts running the computation on a background thread.</p><pre>\(x :: IO Int) -&gt; join (onceFork x) == x
\(x :: IO Int) -&gt; (do a &lt;- onceFork x; a; a) == x</pre></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Lock" class="def">Lock</a> <a href="src/Control-Concurrent-Extra.html#Lock" class="link">Source</a> <a href="#t:Lock" class="selflink">#</a></p><div class="doc"><p>Like an MVar, but has no value.
   Used to guarantees single-threaded access, typically to some system resource. 
   As an example:</p><pre>lock &lt;- <code><a href="Extra.html#v:newLock">newLock</a></code>
let output = <code><a href="Extra.html#v:withLock">withLock</a></code> . putStrLn
forkIO $ do ...; output &quot;hello&quot;
forkIO $ do ...; output &quot;world&quot;
</pre><p>Here we are creating a lock to ensure that when writing output our messages
   do not get interleaved. This use of MVar never blocks on a put. It is permissible,
   but rare, that a withLock contains a withLock inside it - but if so,
   watch out for deadlocks.</p></div></div><div class="top"><p class="src"><a id="v:newLock" class="def">newLock</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="Extra.html#t:Lock">Lock</a> <a href="src/Control-Concurrent-Extra.html#newLock" class="link">Source</a> <a href="#v:newLock" class="selflink">#</a></p><div class="doc"><p>Create a new <code><a href="Extra.html#t:Lock">Lock</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:withLock" class="def">withLock</a> :: <a href="Extra.html#t:Lock">Lock</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/Control-Concurrent-Extra.html#withLock" class="link">Source</a> <a href="#v:withLock" class="selflink">#</a></p><div class="doc"><p>Perform some operation while holding <code><a href="Extra.html#t:Lock">Lock</a></code>. Will prevent all other
   operations from using the <code><a href="Extra.html#t:Lock">Lock</a></code> while the action is ongoing.</p></div></div><div class="top"><p class="src"><a id="v:withLockTry" class="def">withLockTry</a> :: <a href="Extra.html#t:Lock">Lock</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) <a href="src/Control-Concurrent-Extra.html#withLockTry" class="link">Source</a> <a href="#v:withLockTry" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:withLock">withLock</a></code> but will never block. If the operation cannot be executed
   immediately it will return <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code>.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Var" class="def">Var</a> a <a href="src/Control-Concurrent-Extra.html#Var" class="link">Source</a> <a href="#t:Var" class="selflink">#</a></p><div class="doc"><p>Like an MVar, but must always be full.
   Used to on a mutable variable in a thread-safe way.
   As an example:</p><pre>hits &lt;- <code><a href="Extra.html#v:newVar">newVar</a></code> 0
forkIO $ do ...; <code><a href="Extra.html#v:modifyVar_">modifyVar_</a></code> hits (+1); ...
i &lt;- <code><a href="Extra.html#v:readVar">readVar</a></code> hits
print (<a href="HITS.html">HITS</a>,i)
</pre><p>Here we have a variable which we modify atomically, so modifications are
   not interleaved. This use of MVar never blocks on a put. No modifyVar
   operation should ever block, and they should always complete in a reasonable
   timeframe. A Var should not be used to protect some external resource, only
   the variable contained within. Information from a readVar should not be subsequently
   inserted back into the Var.</p></div></div><div class="top"><p class="src"><a id="v:newVar" class="def">newVar</a> :: a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="Extra.html#t:Var">Var</a> a) <a href="src/Control-Concurrent-Extra.html#newVar" class="link">Source</a> <a href="#v:newVar" class="selflink">#</a></p><div class="doc"><p>Create a new <code><a href="Extra.html#t:Var">Var</a></code> with a value.</p></div></div><div class="top"><p class="src"><a id="v:readVar" class="def">readVar</a> :: <a href="Extra.html#t:Var">Var</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/Control-Concurrent-Extra.html#readVar" class="link">Source</a> <a href="#v:readVar" class="selflink">#</a></p><div class="doc"><p>Read the current value of the <code><a href="Extra.html#t:Var">Var</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:modifyVar" class="def">modifyVar</a> :: <a href="Extra.html#t:Var">Var</a> a -&gt; (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (a, b)) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> b <a href="src/Control-Concurrent-Extra.html#modifyVar" class="link">Source</a> <a href="#v:modifyVar" class="selflink">#</a></p><div class="doc"><p>Modify a <code><a href="Extra.html#t:Var">Var</a></code> producing a new value and a return result.</p></div></div><div class="top"><p class="src"><a id="v:modifyVar_" class="def">modifyVar_</a> :: <a href="Extra.html#t:Var">Var</a> a -&gt; (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/Control-Concurrent-Extra.html#modifyVar_" class="link">Source</a> <a href="#v:modifyVar_" class="selflink">#</a></p><div class="doc"><p>Modify a <code><a href="Extra.html#t:Var">Var</a></code>, a restricted version of <code><a href="Extra.html#v:modifyVar">modifyVar</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:withVar" class="def">withVar</a> :: <a href="Extra.html#t:Var">Var</a> a -&gt; (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> b) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> b <a href="src/Control-Concurrent-Extra.html#withVar" class="link">Source</a> <a href="#v:withVar" class="selflink">#</a></p><div class="doc"><p>Perform some operation using the value in the <code><a href="Extra.html#t:Var">Var</a></code>,
   a restricted version of <code><a href="Extra.html#v:modifyVar">modifyVar</a></code>.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Barrier" class="def">Barrier</a> a <a href="src/Control-Concurrent-Extra.html#Barrier" class="link">Source</a> <a href="#t:Barrier" class="selflink">#</a></p><div class="doc"><p>Starts out empty, then is filled exactly once. As an example:</p><pre>bar &lt;- <code><a href="Extra.html#v:newBarrier">newBarrier</a></code>
forkIO $ do ...; val &lt;- ...; <code><a href="Extra.html#v:signalBarrier">signalBarrier</a></code> bar val
print =&lt;&lt; <code><a href="Extra.html#v:waitBarrier">waitBarrier</a></code> bar
</pre><p>Here we create a barrier which will contain some computed value.
   A thread is forked to fill the barrier, while the main thread waits
   for it to complete. A barrier has similarities to a future or promise
   from other languages, has been known as an IVar in other Haskell work,
   and in some ways is like a manually managed thunk.</p></div></div><div class="top"><p class="src"><a id="v:newBarrier" class="def">newBarrier</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="Extra.html#t:Barrier">Barrier</a> a) <a href="src/Control-Concurrent-Extra.html#newBarrier" class="link">Source</a> <a href="#v:newBarrier" class="selflink">#</a></p><div class="doc"><p>Create a new <code><a href="Extra.html#t:Barrier">Barrier</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:signalBarrier" class="def">signalBarrier</a> :: <a href="Extra.html#t:Barrier">Barrier</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/Control-Concurrent-Extra.html#signalBarrier" class="link">Source</a> <a href="#v:signalBarrier" class="selflink">#</a></p><div class="doc"><p>Write a value into the Barrier, releasing anyone at <code><a href="Extra.html#v:waitBarrier">waitBarrier</a></code>.
   Any subsequent attempts to signal the <code><a href="Extra.html#t:Barrier">Barrier</a></code> will throw an exception.</p></div></div><div class="top"><p class="src"><a id="v:waitBarrier" class="def">waitBarrier</a> :: <a href="Extra.html#t:Barrier">Barrier</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/Control-Concurrent-Extra.html#waitBarrier" class="link">Source</a> <a href="#v:waitBarrier" class="selflink">#</a></p><div class="doc"><p>Wait until a barrier has been signaled with <code><a href="Extra.html#v:signalBarrier">signalBarrier</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:waitBarrierMaybe" class="def">waitBarrierMaybe</a> :: <a href="Extra.html#t:Barrier">Barrier</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) <a href="src/Control-Concurrent-Extra.html#waitBarrierMaybe" class="link">Source</a> <a href="#v:waitBarrierMaybe" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="Extra.html#v:waitBarrier">waitBarrier</a></code> that never blocks, returning <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code>
   if the barrier has not yet been signaled.</p></div></div><h1 id="g:2">Control.Exception.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="Control-Exception-Extra.html">Control.Exception.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:retry" class="def">retry</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/Control-Exception-Extra.html#retry" class="link">Source</a> <a href="#v:retry" class="selflink">#</a></p><div class="doc"><p>Retry an operation at most <em>n</em> times (<em>n</em> must be positive).
   If the operation fails the <em>n</em>th time it will throw that final exception.</p><pre>retry 1 (print &quot;x&quot;)  == print &quot;x&quot;
retry 3 (fail &quot;die&quot;) == fail &quot;die&quot;</pre></div></div><div class="top"><p class="src"><a id="v:retryBool" class="def">retryBool</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; (e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/Control-Exception-Extra.html#retryBool" class="link">Source</a> <a href="#v:retryBool" class="selflink">#</a></p><div class="doc"><p>Retry an operation at most <em>n</em> times (<em>n</em> must be positive), while the exception value and type match a predicate.
   If the operation fails the <em>n</em>th time it will throw that final exception.</p></div></div><div class="top"><p class="src"><a id="v:showException" class="def">showException</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> e =&gt; e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/Control-Exception-Extra.html#showException" class="link">Source</a> <a href="#v:showException" class="selflink">#</a></p><div class="doc"><p>Show a value, but if the result contains exceptions, produce
   <code>&lt;Exception&gt;</code>. Defined as <code><code><a href="Extra.html#v:stringException">stringException</a></code> . show</code>.
   Particularly useful for printing exceptions to users, remembering that exceptions
   can themselves contain undefined values.</p></div></div><div class="top"><p class="src"><a id="v:stringException" class="def">stringException</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/Control-Exception-Extra.html#stringException" class="link">Source</a> <a href="#v:stringException" class="selflink">#</a></p><div class="doc"><p>Fully evaluate an input String. If the String contains embedded exceptions it will produce <code>&lt;Exception&gt;</code>.</p><pre>stringException &quot;test&quot;                           == return &quot;test&quot;
stringException (&quot;test&quot; ++ undefined)            == return &quot;test&lt;Exception&gt;&quot;
stringException (&quot;test&quot; ++ undefined ++ &quot;hello&quot;) == return &quot;test&lt;Exception&gt;&quot;
stringException ['t','e','s','t',undefined]      == return &quot;test&lt;Exception&gt;&quot;</pre></div></div><div class="top"><p class="src"><a id="v:errorIO" class="def">errorIO</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/Control-Exception-Extra.html#errorIO" class="link">Source</a> <a href="#v:errorIO" class="selflink">#</a></p><div class="doc"><p>Like error, but in the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a></code> monad.
   Note that while <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:fail">fail</a></code> in <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a></code> raises an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:IOException">IOException</a></code>, this function raises an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:ErrorCall">ErrorCall</a></code> exception.</p><pre>try (errorIO &quot;Hello&quot;) == return (Left (ErrorCall &quot;Hello&quot;))</pre></div></div><div class="top"><p class="src"><a id="v:displayException" class="def">displayException</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="#v:displayException" class="selflink">#</a></p><div class="doc"><p>Render this exception value in a human-friendly manner.</p><p>Default implementation: <code><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#v:show">show</a></code></code>.</p><p><em>Since: 4.8.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:ignore" class="def">ignore</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/Control-Exception-Extra.html#ignore" class="link">Source</a> <a href="#v:ignore" class="selflink">#</a></p><div class="doc"><p>Ignore any exceptions thrown by the action.</p><pre>ignore (print 1)    == print 1
ignore (fail &quot;die&quot;) == return ()</pre></div></div><div class="top"><p class="src"><a id="v:catch_" class="def">catch_</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/Control-Exception-Extra.html#catch_" class="link">Source</a> <a href="#v:catch_" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#v:catch">catch</a></code> without the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:Exception">Exception</a></code> context, restricted to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a></code>,
   so catches all exceptions.</p></div></div><div class="top"><p class="src"><a id="v:handle_" class="def">handle_</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/Control-Exception-Extra.html#handle_" class="link">Source</a> <a href="#v:handle_" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:catch_">catch_</a></code> but for <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#v:handle">handle</a></code></p></div></div><div class="top"><p class="src"><a id="v:try_" class="def">try_</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> a) <a href="src/Control-Exception-Extra.html#try_" class="link">Source</a> <a href="#v:try_" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:catch_">catch_</a></code> but for <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#v:try">try</a></code></p></div></div><div class="top"><p class="src"><a id="v:catchJust_" class="def">catchJust_</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; (b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/Control-Exception-Extra.html#catchJust_" class="link">Source</a> <a href="#v:catchJust_" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:catch_">catch_</a></code> but for <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#v:catchJust">catchJust</a></code></p></div></div><div class="top"><p class="src"><a id="v:handleJust_" class="def">handleJust_</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b) -&gt; (b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/Control-Exception-Extra.html#handleJust_" class="link">Source</a> <a href="#v:handleJust_" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:catch_">catch_</a></code> but for <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#v:handleJust">handleJust</a></code></p></div></div><div class="top"><p class="src"><a id="v:tryJust_" class="def">tryJust_</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b a) <a href="src/Control-Exception-Extra.html#tryJust_" class="link">Source</a> <a href="#v:tryJust_" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:catch_">catch_</a></code> but for <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#v:tryJust">tryJust</a></code></p></div></div><div class="top"><p class="src"><a id="v:catchBool" class="def">catchBool</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; (e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; (e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/Control-Exception-Extra.html#catchBool" class="link">Source</a> <a href="#v:catchBool" class="selflink">#</a></p><div class="doc"><p>Catch an exception if the predicate passes, then call the handler with the original exception.
   As an example:</p><pre>readFileExists x == catchBool isDoesNotExistError (readFile &quot;myfile&quot;) (const $ return &quot;&quot;)
</pre></div></div><div class="top"><p class="src"><a id="v:handleBool" class="def">handleBool</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; (e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; (e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/Control-Exception-Extra.html#handleBool" class="link">Source</a> <a href="#v:handleBool" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:catchBool">catchBool</a></code> but for <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#v:handle">handle</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:tryBool" class="def">tryBool</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; (e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> e a) <a href="src/Control-Exception-Extra.html#tryBool" class="link">Source</a> <a href="#v:tryBool" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:catchBool">catchBool</a></code> but for <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#v:try">try</a></code>.</p></div></div><h1 id="g:3">Control.Monad.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="Control-Monad-Extra.html">Control.Monad.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:whenJust" class="def">whenJust</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Applicative">Applicative</a> m =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a -&gt; (a -&gt; m ()) -&gt; m () <a href="src/Control-Monad-Extra.html#whenJust" class="link">Source</a> <a href="#v:whenJust" class="selflink">#</a></p><div class="doc"><p>Perform some operation on <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Just">Just</a></code>, given the field inside the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Just">Just</a></code>.</p><pre>whenJust Nothing  print == return ()
whenJust (Just 1) print == print 1</pre></div></div><div class="top"><p class="src"><a id="v:whenJustM" class="def">whenJustM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -&gt; (a -&gt; m ()) -&gt; m () <a href="src/Control-Monad-Extra.html#whenJustM" class="link">Source</a> <a href="#v:whenJustM" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:whenJust">whenJust</a></code>, but where the test can be monadic.</p></div></div><div class="top"><p class="src"><a id="v:unit" class="def">unit</a> :: m () -&gt; m () <a href="src/Control-Monad-Extra.html#unit" class="link">Source</a> <a href="#v:unit" class="selflink">#</a></p><div class="doc"><p>The identity function which requires the inner argument to be <code>()</code>. Useful for functions
   with overloaded return types.</p><pre>\(x :: Maybe ()) -&gt; unit x == x</pre></div></div><div class="top"><p class="src"><a id="v:maybeM" class="def">maybeM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m b -&gt; (a -&gt; m b) -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -&gt; m b <a href="src/Control-Monad-Extra.html#maybeM" class="link">Source</a> <a href="#v:maybeM" class="selflink">#</a></p><div class="doc"><p>Monadic generalisation of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:maybe">maybe</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:eitherM" class="def">eitherM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m c) -&gt; (b -&gt; m c) -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a b) -&gt; m c <a href="src/Control-Monad-Extra.html#eitherM" class="link">Source</a> <a href="#v:eitherM" class="selflink">#</a></p><div class="doc"><p>Monadic generalisation of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:either">either</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:loopM" class="def">loopM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a b)) -&gt; a -&gt; m b <a href="src/Control-Monad-Extra.html#loopM" class="link">Source</a> <a href="#v:loopM" class="selflink">#</a></p><div class="doc"><p>A looping operation, where the predicate returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Left">Left</a></code> as a seed for the next loop
   or <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Right">Right</a></code> to abort the loop.</p></div></div><div class="top"><p class="src"><a id="v:whileM" class="def">whileM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m () <a href="src/Control-Monad-Extra.html#whileM" class="link">Source</a> <a href="#v:whileM" class="selflink">#</a></p><div class="doc"><p>Keep running an operation until it becomes <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:False">False</a></code>. As an example:</p><pre>whileM $ do sleep 0.1; notM $ doesFileExist &quot;foo.txt&quot;
readFile &quot;foo.txt&quot;
</pre><p>If you need some state persisted between each test, use <code><a href="Extra.html#v:loopM">loopM</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:partitionM" class="def">partitionM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; m ([a], [a]) <a href="src/Control-Monad-Extra.html#partitionM" class="link">Source</a> <a href="#v:partitionM" class="selflink">#</a></p><div class="doc"><p>A version of <code>partition</code> that works with a monadic predicate.</p><pre>partitionM (Just . even) [1,2,3] == Just ([2], [1,3])
partitionM (const Nothing) [1,2,3] == Nothing</pre></div></div><div class="top"><p class="src"><a id="v:concatMapM" class="def">concatMapM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m [b]) -&gt; [a] -&gt; m [b] <a href="src/Control-Monad-Extra.html#concatMapM" class="link">Source</a> <a href="#v:concatMapM" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:concatMap">concatMap</a></code> that works with a monadic predicate.</p></div></div><div class="top"><p class="src"><a id="v:concatForM" class="def">concatForM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; [a] -&gt; (a -&gt; m [b]) -&gt; m [b] <a href="src/Control-Monad-Extra.html#concatForM" class="link">Source</a> <a href="#v:concatForM" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:concatMapM">concatMapM</a></code>, but has its arguments flipped, so can be used
   instead of the common <code>fmap concat $ forM</code> pattern.</p></div></div><div class="top"><p class="src"><a id="v:mconcatMapM" class="def">mconcatMapM</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> b) =&gt; (a -&gt; m b) -&gt; [a] -&gt; m b <a href="src/Control-Monad-Extra.html#mconcatMapM" class="link">Source</a> <a href="#v:mconcatMapM" class="selflink">#</a></p><div class="doc"><p>A version of <code>mconcatMap</code> that works with a monadic predicate.</p></div></div><div class="top"><p class="src"><a id="v:mapMaybeM" class="def">mapMaybeM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b)) -&gt; [a] -&gt; m [b] <a href="src/Control-Monad-Extra.html#mapMaybeM" class="link">Source</a> <a href="#v:mapMaybeM" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:mapMaybe">mapMaybe</a></code> that works with a monadic predicate.</p></div></div><div class="top"><p class="src"><a id="v:findM" class="def">findM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) <a href="src/Control-Monad-Extra.html#findM" class="link">Source</a> <a href="#v:findM" class="selflink">#</a></p><div class="doc"><p>Like <code>find</code>, but where the test can be monadic.</p><pre>findM (Just . isUpper) &quot;teST&quot;             == Just (Just 'S')
findM (Just . isUpper) &quot;test&quot;             == Just Nothing
findM (Just . const True) [&quot;x&quot;,undefined] == Just (Just &quot;x&quot;)</pre></div></div><div class="top"><p class="src"><a id="v:firstJustM" class="def">firstJustM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b)) -&gt; [a] -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b) <a href="src/Control-Monad-Extra.html#firstJustM" class="link">Source</a> <a href="#v:firstJustM" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:findM">findM</a></code>, but also allows you to compute some additional information in the predicate.</p></div></div><div class="top"><p class="src"><a id="v:whenM" class="def">whenM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m () -&gt; m () <a href="src/Control-Monad-Extra.html#whenM" class="link">Source</a> <a href="#v:whenM" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:when">when</a></code>, but where the test can be monadic.</p></div></div><div class="top"><p class="src"><a id="v:unlessM" class="def">unlessM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m () -&gt; m () <a href="src/Control-Monad-Extra.html#unlessM" class="link">Source</a> <a href="#v:unlessM" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:unless">unless</a></code>, but where the test can be monadic.</p></div></div><div class="top"><p class="src"><a id="v:ifM" class="def">ifM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m a -&gt; m a -&gt; m a <a href="src/Control-Monad-Extra.html#ifM" class="link">Source</a> <a href="#v:ifM" class="selflink">#</a></p><div class="doc"><p>Like <code>if</code>, but where the test can be monadic.</p></div></div><div class="top"><p class="src"><a id="v:notM" class="def">notM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Control-Monad-Extra.html#notM" class="link">Source</a> <a href="#v:notM" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:not">not</a></code>, but where the test can be monadic.</p></div></div><div class="top"><p class="src"><a id="v:-124--124--94-" class="def">(||^)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Control-Monad-Extra.html#%7C%7C%5E" class="link">Source</a> <a href="#v:-124--124--94-" class="selflink">#</a></p><div class="doc"><p>The lazy <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:-124--124-">||</a></code> operator lifted to a monad. If the first
   argument evaluates to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:True">True</a></code> the second argument will not
   be evaluated.</p><pre>Just True  ||^ undefined  == Just True
Just False ||^ Just True  == Just True
Just False ||^ Just False == Just False</pre></div></div><div class="top"><p class="src"><a id="v:-38--38--94-" class="def">(&amp;&amp;^)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Control-Monad-Extra.html#%26%26%5E" class="link">Source</a> <a href="#v:-38--38--94-" class="selflink">#</a></p><div class="doc"><p>The lazy <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:-38--38-">&amp;&amp;</a></code> operator lifted to a monad. If the first
   argument evaluates to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:False">False</a></code> the second argument will not
   be evaluated.</p><pre>Just False &amp;&amp;^ undefined  == Just False
Just True  &amp;&amp;^ Just True  == Just True
Just True  &amp;&amp;^ Just False == Just False</pre></div></div><div class="top"><p class="src"><a id="v:orM" class="def">orM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; [m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>] -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Control-Monad-Extra.html#orM" class="link">Source</a> <a href="#v:orM" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:or">or</a></code> lifted to a monad. Retains the short-circuiting behaviour.</p><pre>orM [Just False,Just True ,undefined] == Just True
orM [Just False,Just False,undefined] == undefined
\xs -&gt; Just (or xs) == orM (map Just xs)</pre></div></div><div class="top"><p class="src"><a id="v:andM" class="def">andM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; [m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>] -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Control-Monad-Extra.html#andM" class="link">Source</a> <a href="#v:andM" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:and">and</a></code> lifted to a monad. Retains the short-circuiting behaviour.</p><pre>andM [Just True,Just False,undefined] == Just False
andM [Just True,Just True ,undefined] == undefined
\xs -&gt; Just (and xs) == andM (map Just xs)</pre></div></div><div class="top"><p class="src"><a id="v:anyM" class="def">anyM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Control-Monad-Extra.html#anyM" class="link">Source</a> <a href="#v:anyM" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:any">any</a></code> lifted to a monad. Retains the short-circuiting behaviour.</p><pre>anyM Just [False,True ,undefined] == Just True
anyM Just [False,False,undefined] == undefined
\(f :: Int -&gt; Maybe Bool) xs -&gt; anyM f xs == orM (map f xs)</pre></div></div><div class="top"><p class="src"><a id="v:allM" class="def">allM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Control-Monad-Extra.html#allM" class="link">Source</a> <a href="#v:allM" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:all">all</a></code> lifted to a monad. Retains the short-circuiting behaviour.</p><pre>allM Just [True,False,undefined] == Just False
allM Just [True,True ,undefined] == undefined
\(f :: Int -&gt; Maybe Bool) xs -&gt; anyM f xs == orM (map f xs)</pre></div></div><h1 id="g:4">Data.Either.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="Data-Either-Extra.html">Data.Either.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:isLeft" class="def">isLeft</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:isLeft" class="selflink">#</a></p><div class="doc"><p>Return <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:True">True</a></code> if the given value is a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Left">Left</a></code>-value, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:False">False</a></code> otherwise.</p><h4 id="control.ch:isLeft0" class="caption expander" onclick="toggleSection('ch:isLeft0')">Examples</h4><div id="section.ch:isLeft0" class="hide"><p>Basic usage:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>isLeft (Left &quot;foo&quot;)
</code></strong>True
<code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>isLeft (Right 3)
</code></strong>False
</pre><p>Assuming a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Left">Left</a></code> value signifies some sort of error, we can use
 <code><a href="Extra.html#v:isLeft">isLeft</a></code> to write a very simple error-reporting function that does
 absolutely nothing in the case of success, and outputs &quot;ERROR&quot; if
 any error occurred.</p><p>This example shows how <code><a href="Extra.html#v:isLeft">isLeft</a></code> might be used to avoid pattern
 matching when one does not care about the value contained in the
 constructor:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>import Control.Monad ( when )
</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>let report e = when (isLeft e) $ putStrLn &quot;ERROR&quot;
</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>report (Right 1)
</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>report (Left &quot;parse error&quot;)
</code></strong>ERROR
</pre></div><p><em>Since: 4.7.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:isRight" class="def">isRight</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:isRight" class="selflink">#</a></p><div class="doc"><p>Return <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:True">True</a></code> if the given value is a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Right">Right</a></code>-value, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:False">False</a></code> otherwise.</p><h4 id="control.ch:isRight0" class="caption expander" onclick="toggleSection('ch:isRight0')">Examples</h4><div id="section.ch:isRight0" class="hide"><p>Basic usage:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>isRight (Left &quot;foo&quot;)
</code></strong>False
<code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>isRight (Right 3)
</code></strong>True
</pre><p>Assuming a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Left">Left</a></code> value signifies some sort of error, we can use
 <code><a href="Extra.html#v:isRight">isRight</a></code> to write a very simple reporting function that only
 outputs &quot;SUCCESS&quot; when a computation has succeeded.</p><p>This example shows how <code><a href="Extra.html#v:isRight">isRight</a></code> might be used to avoid pattern
 matching when one does not care about the value contained in the
 constructor:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>import Control.Monad ( when )
</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>let report e = when (isRight e) $ putStrLn &quot;SUCCESS&quot;
</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>report (Left &quot;parse error&quot;)
</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>report (Right 1)
</code></strong>SUCCESS
</pre></div><p><em>Since: 4.7.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:fromLeft" class="def">fromLeft</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> l r -&gt; l <a href="src/Data-Either-Extra.html#fromLeft" class="link">Source</a> <a href="#v:fromLeft" class="selflink">#</a></p><div class="doc"><p>The <code><a href="Extra.html#v:fromLeft">fromLeft</a></code> function extracts the element out of a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Left">Left</a></code> and
   throws an error if its argument is <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Right">Right</a></code>.
   Much like <code>fromJust</code>, using this function in polished code is usually a bad idea.</p><pre>\x -&gt; fromLeft (Left  x) == x
\x -&gt; fromLeft (Right x) == undefined</pre></div></div><div class="top"><p class="src"><a id="v:fromRight" class="def">fromRight</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> l r -&gt; r <a href="src/Data-Either-Extra.html#fromRight" class="link">Source</a> <a href="#v:fromRight" class="selflink">#</a></p><div class="doc"><p>The <code><a href="Extra.html#v:fromRight">fromRight</a></code> function extracts the element out of a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Right">Right</a></code> and
   throws an error if its argument is <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Left">Left</a></code>.
   Much like <code>fromJust</code>, using this function in polished code is usually a bad idea.</p><pre>\x -&gt; fromRight (Right x) == x
\x -&gt; fromRight (Left  x) == undefined</pre></div></div><div class="top"><p class="src"><a id="v:fromEither" class="def">fromEither</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a a -&gt; a <a href="src/Data-Either-Extra.html#fromEither" class="link">Source</a> <a href="#v:fromEither" class="selflink">#</a></p><div class="doc"><p>Pull the value out of an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a></code> where both alternatives
   have the same type.</p><pre>\x -&gt; fromEither (Left x ) == x
\x -&gt; fromEither (Right x) == x</pre></div></div><h1 id="g:5">Data.IORef.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="Data-IORef-Extra.html">Data.IORef.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:modifyIORef-39-" class="def">modifyIORef'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#t:IORef">IORef</a> a -&gt; (a -&gt; a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="#v:modifyIORef-39-" class="selflink">#</a></p><div class="doc"><p>Strict version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#v:modifyIORef">modifyIORef</a></code></p><p><em>Since: 4.6.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:writeIORef-39-" class="def">writeIORef'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#t:IORef">IORef</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/Data-IORef-Extra.html#writeIORef%27" class="link">Source</a> <a href="#v:writeIORef-39-" class="selflink">#</a></p><div class="doc"><p>Evaluates the value before calling <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#v:writeIORef">writeIORef</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:atomicModifyIORef-39-" class="def">atomicModifyIORef'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#t:IORef">IORef</a> a -&gt; (a -&gt; (a, b)) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> b <a href="#v:atomicModifyIORef-39-" class="selflink">#</a></p><div class="doc"><p>Strict version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#v:atomicModifyIORef">atomicModifyIORef</a></code>.  This forces both the value stored
 in the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#t:IORef">IORef</a></code> as well as the value returned.</p><p><em>Since: 4.6.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:atomicWriteIORef" class="def">atomicWriteIORef</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#t:IORef">IORef</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="#v:atomicWriteIORef" class="selflink">#</a></p><div class="doc"><p>Variant of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#v:writeIORef">writeIORef</a></code> with the &quot;barrier to reordering&quot; property that
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#v:atomicModifyIORef">atomicModifyIORef</a></code> has.</p><p><em>Since: 4.6.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:atomicWriteIORef-39-" class="def">atomicWriteIORef'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-IORef.html#t:IORef">IORef</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/Data-IORef-Extra.html#atomicWriteIORef%27" class="link">Source</a> <a href="#v:atomicWriteIORef-39-" class="selflink">#</a></p><div class="doc"><p>Evaluates the value before calling <code><a href="Extra.html#v:atomicWriteIORef">atomicWriteIORef</a></code>.</p></div></div><h1 id="g:6">Data.List.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="Data-List-Extra.html">Data.List.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:lower" class="def">lower</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/Data-List-Extra.html#lower" class="link">Source</a> <a href="#v:lower" class="selflink">#</a></p><div class="doc"><p>Convert a string to lower case.</p><pre>lower &quot;This is A TEST&quot; == &quot;this is a test&quot;
lower &quot;&quot; == &quot;&quot;</pre></div></div><div class="top"><p class="src"><a id="v:upper" class="def">upper</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/Data-List-Extra.html#upper" class="link">Source</a> <a href="#v:upper" class="selflink">#</a></p><div class="doc"><p>Convert a string to upper case.</p><pre>upper &quot;This is A TEST&quot; == &quot;THIS IS A TEST&quot;
upper &quot;&quot; == &quot;&quot;</pre></div></div><div class="top"><p class="src"><a id="v:trim" class="def">trim</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/Data-List-Extra.html#trim" class="link">Source</a> <a href="#v:trim" class="selflink">#</a></p><div class="doc"><p>Remove spaces from either side of a string. A combination of <code><a href="Extra.html#v:trimEnd">trimEnd</a></code> and <code><a href="Extra.html#v:trimStart">trimStart</a></code>.</p><pre>trim      &quot;  hello   &quot; == &quot;hello&quot;
trimStart &quot;  hello   &quot; == &quot;hello   &quot;
trimEnd   &quot;  hello   &quot; == &quot;  hello&quot;
\s -&gt; trim s == trimEnd (trimStart s)</pre></div></div><div class="top"><p class="src"><a id="v:trimStart" class="def">trimStart</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/Data-List-Extra.html#trimStart" class="link">Source</a> <a href="#v:trimStart" class="selflink">#</a></p><div class="doc"><p>Remove spaces from the start of a string, see <code><a href="Extra.html#v:trim">trim</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:trimEnd" class="def">trimEnd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/Data-List-Extra.html#trimEnd" class="link">Source</a> <a href="#v:trimEnd" class="selflink">#</a></p><div class="doc"><p>Remove spaces from the end of a string, see <code><a href="Extra.html#v:trim">trim</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:word1" class="def">word1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>) <a href="src/Data-List-Extra.html#word1" class="link">Source</a> <a href="#v:word1" class="selflink">#</a></p><div class="doc"><p>Split the first word off a string. Useful for when starting to parse the beginning
   of a string, but you want to accurately perserve whitespace in the rest of the string.</p><pre>word1 &quot;&quot; == (&quot;&quot;, &quot;&quot;)
word1 &quot;keyword rest of string&quot; == (&quot;keyword&quot;,&quot;rest of string&quot;)
word1 &quot;  keyword\n  rest of string&quot; == (&quot;keyword&quot;,&quot;rest of string&quot;)
\s -&gt; fst (word1 s) == concat (take 1 $ words s)
\s -&gt; words (snd $ word1 s) == drop 1 (words s)</pre></div></div><div class="top"><p class="src"><a id="v:line1" class="def">line1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>) <a href="src/Data-List-Extra.html#line1" class="link">Source</a> <a href="#v:line1" class="selflink">#</a></p><div class="doc"><p>Split the first line off a string.</p><pre>line1 &quot;&quot; == (&quot;&quot;, &quot;&quot;)
line1 &quot;test&quot; == (&quot;test&quot;,&quot;&quot;)
line1 &quot;test\n&quot; == (&quot;test&quot;,&quot;&quot;)
line1 &quot;test\nrest&quot; == (&quot;test&quot;,&quot;rest&quot;)
line1 &quot;test\nrest\nmore&quot; == (&quot;test&quot;,&quot;rest\nmore&quot;)</pre></div></div><div class="top"><p class="src"><a id="v:dropEnd" class="def">dropEnd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; [a] -&gt; [a] <a href="src/Data-List-Extra.html#dropEnd" class="link">Source</a> <a href="#v:dropEnd" class="selflink">#</a></p><div class="doc"><p>Drop a number of elements from the end of the list.</p><pre>dropEnd 3 &quot;hello&quot;  == &quot;he&quot;
dropEnd 5 &quot;bye&quot;    == &quot;&quot;
dropEnd (-1) &quot;bye&quot; == &quot;bye&quot;
\i xs -&gt; dropEnd i xs `isPrefixOf` xs
\i xs -&gt; length (dropEnd i xs) == max 0 (length xs - max 0 i)
\i -&gt; take 3 (dropEnd 5 [i..]) == take 3 [i..]</pre></div></div><div class="top"><p class="src"><a id="v:takeEnd" class="def">takeEnd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; [a] -&gt; [a] <a href="src/Data-List-Extra.html#takeEnd" class="link">Source</a> <a href="#v:takeEnd" class="selflink">#</a></p><div class="doc"><p>Take a number of elements from the end of the list.</p><pre>takeEnd 3 &quot;hello&quot;  == &quot;llo&quot;
takeEnd 5 &quot;bye&quot;    == &quot;bye&quot;
takeEnd (-1) &quot;bye&quot; == &quot;&quot;
\i xs -&gt; takeEnd i xs `isSuffixOf` xs
\i xs -&gt; length (takeEnd i xs) == min (max 0 i) (length xs)</pre></div></div><div class="top"><p class="src"><a id="v:splitAtEnd" class="def">splitAtEnd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; [a] -&gt; ([a], [a]) <a href="src/Data-List-Extra.html#splitAtEnd" class="link">Source</a> <a href="#v:splitAtEnd" class="selflink">#</a></p><div class="doc"><p><code><code><a href="Extra.html#v:splitAtEnd">splitAtEnd</a></code> n xs</code> returns a split where the second element tries to
   contain <code>n</code> elements.</p><pre>splitAtEnd 3 &quot;hello&quot; == (&quot;he&quot;,&quot;llo&quot;)
splitAtEnd 3 &quot;he&quot;    == (&quot;&quot;, &quot;he&quot;)
\i xs -&gt; uncurry (++) (splitAt i xs) == xs
\i xs -&gt; splitAtEnd i xs == (dropEnd i xs, takeEnd i xs)</pre></div></div><div class="top"><p class="src"><a id="v:breakEnd" class="def">breakEnd</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; ([a], [a]) <a href="src/Data-List-Extra.html#breakEnd" class="link">Source</a> <a href="#v:breakEnd" class="selflink">#</a></p><div class="doc"><p>Break, but from the end.</p><pre>breakEnd isLower &quot;youRE&quot; == (&quot;you&quot;,&quot;RE&quot;)
breakEnd isLower &quot;youre&quot; == (&quot;youre&quot;,&quot;&quot;)
breakEnd isLower &quot;YOURE&quot; == (&quot;&quot;,&quot;YOURE&quot;)
\f xs -&gt; breakEnd (not . f) xs == spanEnd f  xs</pre></div></div><div class="top"><p class="src"><a id="v:spanEnd" class="def">spanEnd</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; ([a], [a]) <a href="src/Data-List-Extra.html#spanEnd" class="link">Source</a> <a href="#v:spanEnd" class="selflink">#</a></p><div class="doc"><p>Span, but from the end.</p><pre>spanEnd isUpper &quot;youRE&quot; == (&quot;you&quot;,&quot;RE&quot;)
spanEnd (not . isSpace) &quot;x y z&quot; == (&quot;x y &quot;,&quot;z&quot;)
\f xs -&gt; uncurry (++) (spanEnd f xs) == xs
\f xs -&gt; spanEnd f xs == swap (both reverse (span f (reverse xs)))</pre></div></div><div class="top"><p class="src"><a id="v:dropWhileEnd" class="def">dropWhileEnd</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [a] <a href="#v:dropWhileEnd" class="selflink">#</a></p><div class="doc"><p>The <code><a href="Extra.html#v:dropWhileEnd">dropWhileEnd</a></code> function drops the largest suffix of a list
 in which the given predicate holds for all elements.  For example:</p><pre>dropWhileEnd isSpace &quot;foo\n&quot; == &quot;foo&quot;
dropWhileEnd isSpace &quot;foo bar&quot; == &quot;foo bar&quot;
dropWhileEnd isSpace (&quot;foo\n&quot; ++ undefined) == &quot;foo&quot; ++ undefined</pre><p><em>Since: 4.5.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:dropWhileEnd-39-" class="def">dropWhileEnd'</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [a] <a href="src/Data-List-Extra.html#dropWhileEnd%27" class="link">Source</a> <a href="#v:dropWhileEnd-39-" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="Extra.html#v:dropWhileEnd">dropWhileEnd</a></code> but with different strictness properties.
   The function <code><a href="Extra.html#v:dropWhileEnd">dropWhileEnd</a></code> can be used on an infinite list and tests the property
   on each character. In contrast, <code><a href="Extra.html#v:dropWhileEnd-39-">dropWhileEnd'</a></code> is strict in the spine of the list
   but only tests the trailing suffix.
   This version usually outperforms <code><a href="Extra.html#v:dropWhileEnd">dropWhileEnd</a></code> if the list is short or the test is expensive.
   Note the tests below cover both the prime and non-prime variants.</p><pre>dropWhileEnd  isSpace &quot;ab cde  &quot; == &quot;ab cde&quot;
dropWhileEnd' isSpace &quot;ab cde  &quot; == &quot;ab cde&quot;
last (dropWhileEnd  even [undefined,3]) == undefined
last (dropWhileEnd' even [undefined,3]) == 3
head (dropWhileEnd  even (3:undefined)) == 3
head (dropWhileEnd' even (3:undefined)) == undefined</pre></div></div><div class="top"><p class="src"><a id="v:takeWhileEnd" class="def">takeWhileEnd</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [a] <a href="src/Data-List-Extra.html#takeWhileEnd" class="link">Source</a> <a href="#v:takeWhileEnd" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:takeWhile">takeWhile</a></code> operating from the end.</p><pre>takeWhileEnd even [2,3,4,6] == [4,6]</pre></div></div><div class="top"><p class="src"><a id="v:stripSuffix" class="def">stripSuffix</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> [a] <a href="src/Data-List-Extra.html#stripSuffix" class="link">Source</a> <a href="#v:stripSuffix" class="selflink">#</a></p><div class="doc"><p>Return the prefix of the second string if its suffix
 matches the entire first string.</p><p>Examples:</p><pre>stripSuffix &quot;bar&quot; &quot;foobar&quot; == Just &quot;foo&quot;
stripSuffix &quot;&quot;    &quot;baz&quot;    == Just &quot;baz&quot;
stripSuffix &quot;foo&quot; &quot;quux&quot;   == Nothing</pre></div></div><div class="top"><p class="src"><a id="v:stripInfix" class="def">stripInfix</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> ([a], [a]) <a href="src/Data-List-Extra.html#stripInfix" class="link">Source</a> <a href="#v:stripInfix" class="selflink">#</a></p><div class="doc"><p>Return the the string before and after the search string,
   or <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code> if the search string is not present.</p><p>Examples:</p><pre>stripInfix &quot;::&quot; &quot;a::b::c&quot; == Just (&quot;a&quot;, &quot;b::c&quot;)
stripInfix &quot;/&quot; &quot;foobar&quot;   == Nothing</pre></div></div><div class="top"><p class="src"><a id="v:stripInfixEnd" class="def">stripInfixEnd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> ([a], [a]) <a href="src/Data-List-Extra.html#stripInfixEnd" class="link">Source</a> <a href="#v:stripInfixEnd" class="selflink">#</a></p><div class="doc"><p>Similar to <code><a href="Extra.html#v:stripInfix">stripInfix</a></code>, but searches from the end of the
 string.</p><pre>stripInfixEnd &quot;::&quot; &quot;a::b::c&quot; == Just (&quot;a::b&quot;, &quot;c&quot;)</pre></div></div><div class="top"><p class="src"><a id="v:wordsBy" class="def">wordsBy</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [[a]] <a href="src/Data-List-Extra.html#wordsBy" class="link">Source</a> <a href="#v:wordsBy" class="selflink">#</a></p><div class="doc"><p>A variant of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:words">words</a></code> with a custom test. In particular,
   adjacent separators are discarded, as are leading or trailing separators.</p><pre>wordsBy (== ':') &quot;::xyz:abc::123::&quot; == [&quot;xyz&quot;,&quot;abc&quot;,&quot;123&quot;]
\s -&gt; wordsBy isSpace s == words s</pre></div></div><div class="top"><p class="src"><a id="v:linesBy" class="def">linesBy</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [[a]] <a href="src/Data-List-Extra.html#linesBy" class="link">Source</a> <a href="#v:linesBy" class="selflink">#</a></p><div class="doc"><p>A variant of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:lines">lines</a></code> with a custom test. In particular,
   if there is a trailing separator it will be discarded.</p><pre>linesBy (== ':') &quot;::xyz:abc::123::&quot; == [&quot;&quot;,&quot;&quot;,&quot;xyz&quot;,&quot;abc&quot;,&quot;&quot;,&quot;123&quot;,&quot;&quot;]
\s -&gt; linesBy (== '\n') s == lines s
linesBy (== ';') &quot;my;list;here;&quot; == [&quot;my&quot;,&quot;list&quot;,&quot;here&quot;]</pre></div></div><div class="top"><p class="src"><a id="v:breakOn" class="def">breakOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; ([a], [a]) <a href="src/Data-List-Extra.html#breakOn" class="link">Source</a> <a href="#v:breakOn" class="selflink">#</a></p><div class="doc"><p>Find the first instance of <code>needle</code> in <code>haystack</code>.
 The first element of the returned tuple
 is the prefix of <code>haystack</code> before <code>needle</code> is matched.  The second
 is the remainder of <code>haystack</code>, starting with the match.
 If you want the remainder <em>without</em> the patch, use <code><a href="Extra.html#v:stripInfix">stripInfix</a></code>.</p><pre>breakOn &quot;::&quot; &quot;a::b::c&quot; == (&quot;a&quot;, &quot;::b::c&quot;)
breakOn &quot;/&quot; &quot;foobar&quot;   == (&quot;foobar&quot;, &quot;&quot;)
\needle haystack -&gt; let (prefix,match) = breakOn needle haystack in prefix ++ match == haystack</pre></div></div><div class="top"><p class="src"><a id="v:breakOnEnd" class="def">breakOnEnd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; ([a], [a]) <a href="src/Data-List-Extra.html#breakOnEnd" class="link">Source</a> <a href="#v:breakOnEnd" class="selflink">#</a></p><div class="doc"><p>Similar to <code><a href="Extra.html#v:breakOn">breakOn</a></code>, but searches from the end of the
 string.</p><p>The first element of the returned tuple is the prefix of <code>haystack</code>
 up to and including the last match of <code>needle</code>.  The second is the
 remainder of <code>haystack</code>, following the match.</p><pre>breakOnEnd &quot;::&quot; &quot;a::b::c&quot; == (&quot;a::b::&quot;, &quot;c&quot;)</pre></div></div><div class="top"><p class="src"><a id="v:splitOn" class="def">splitOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; [[a]] <a href="src/Data-List-Extra.html#splitOn" class="link">Source</a> <a href="#v:splitOn" class="selflink">#</a></p><div class="doc"><p>Break a list into pieces separated by the first
 list argument, consuming the delimiter. An empty delimiter is
 invalid, and will cause an error to be raised.</p><pre>splitOn &quot;\r\n&quot; &quot;a\r\nb\r\nd\r\ne&quot; == [&quot;a&quot;,&quot;b&quot;,&quot;d&quot;,&quot;e&quot;]
splitOn &quot;aaa&quot;  &quot;aaaXaaaXaaaXaaa&quot;  == [&quot;&quot;,&quot;X&quot;,&quot;X&quot;,&quot;X&quot;,&quot;&quot;]
splitOn &quot;x&quot;    &quot;x&quot;                == [&quot;&quot;,&quot;&quot;]
splitOn &quot;x&quot;    &quot;&quot;                 == [&quot;&quot;]
\s x -&gt; s /= &quot;&quot; ==&gt; intercalate s (splitOn s x) == x
\c x -&gt; splitOn [c] x                           == split (==c) x</pre></div></div><div class="top"><p class="src"><a id="v:split" class="def">split</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [[a]] <a href="src/Data-List-Extra.html#split" class="link">Source</a> <a href="#v:split" class="selflink">#</a></p><div class="doc"><p>Splits a list into components delimited by separators,
 where the predicate returns True for a separator element.  The
 resulting components do not contain the separators.  Two adjacent
 separators result in an empty component in the output.</p><pre>split (== 'a') &quot;aabbaca&quot; == [&quot;&quot;,&quot;&quot;,&quot;bb&quot;,&quot;c&quot;,&quot;&quot;]
split (== 'a') &quot;&quot;        == [&quot;&quot;]
split (== ':') &quot;::xyz:abc::123::&quot; == [&quot;&quot;,&quot;&quot;,&quot;xyz&quot;,&quot;abc&quot;,&quot;&quot;,&quot;123&quot;,&quot;&quot;,&quot;&quot;]
split (== ',') &quot;my,list,here&quot; == [&quot;my&quot;,&quot;list&quot;,&quot;here&quot;]</pre></div></div><div class="top"><p class="src"><a id="v:chunksOf" class="def">chunksOf</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; [a] -&gt; [[a]] <a href="src/Data-List-Extra.html#chunksOf" class="link">Source</a> <a href="#v:chunksOf" class="selflink">#</a></p><div class="doc"><p>Split a list into chunks of a given size. The last chunk may contain
   fewer than n elements. The chunk size must be positive.</p><pre>chunksOf 3 &quot;my test&quot; == [&quot;my &quot;,&quot;tes&quot;,&quot;t&quot;]
chunksOf 3 &quot;mytest&quot;  == [&quot;myt&quot;,&quot;est&quot;]
chunksOf 8 &quot;&quot;        == []
chunksOf 0 &quot;test&quot;    == undefined</pre></div></div><div class="top"><p class="src"><a id="v:list" class="def">list</a> :: b -&gt; (a -&gt; [a] -&gt; b) -&gt; [a] -&gt; b <a href="src/Data-List-Extra.html#list" class="link">Source</a> <a href="#v:list" class="selflink">#</a></p><div class="doc"><p>Non-recursive transform over a list, like <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:maybe">maybe</a></code>.</p><pre>list 1 (\v _ -&gt; v - 2) [5,6,7] == 3
list 1 (\v _ -&gt; v - 2) []      == 1
\nil cons xs -&gt; maybe nil (uncurry cons) (uncons xs) == list nil cons xs</pre></div></div><div class="top"><p class="src"><a id="v:uncons" class="def">uncons</a> :: [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (a, [a]) <a href="#v:uncons" class="selflink">#</a></p><div class="doc"><p>Decompose a list into its head and tail. If the list is empty,
 returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code>. If the list is non-empty, returns <code><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Just">Just</a></code> (x, xs)</code>,
 where <code>x</code> is the head of the list and <code>xs</code> its tail.</p><p><em>Since: 4.8.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:unsnoc" class="def">unsnoc</a> :: [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> ([a], a) <a href="src/Data-List-Extra.html#unsnoc" class="link">Source</a> <a href="#v:unsnoc" class="selflink">#</a></p><div class="doc"><p>If the list is empty returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code>, otherwise returns the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:init">init</a></code> and the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:last">last</a></code>.</p><pre>unsnoc &quot;test&quot; == Just (&quot;tes&quot;,'t')
unsnoc &quot;&quot;     == Nothing
\xs -&gt; unsnoc xs == if null xs then Nothing else Just (init xs, last xs)</pre></div></div><div class="top"><p class="src"><a id="v:cons" class="def">cons</a> :: a -&gt; [a] -&gt; [a] <a href="src/Data-List-Extra.html#cons" class="link">Source</a> <a href="#v:cons" class="selflink">#</a></p><div class="doc"><p>Append an element to the start of a list, an alias for '(:)'.</p><pre>cons 't' &quot;est&quot; == &quot;test&quot;
\x xs -&gt; uncons (cons x xs) == Just (x,xs)</pre></div></div><div class="top"><p class="src"><a id="v:snoc" class="def">snoc</a> :: [a] -&gt; a -&gt; [a] <a href="src/Data-List-Extra.html#snoc" class="link">Source</a> <a href="#v:snoc" class="selflink">#</a></p><div class="doc"><p>Append an element to the end of a list, takes <em>O(n)</em> time.</p><pre>snoc &quot;tes&quot; 't' == &quot;test&quot;
\xs x -&gt; unsnoc (snoc xs x) == Just (xs,x)</pre></div></div><div class="top"><p class="src"><a id="v:drop1" class="def">drop1</a> :: [a] -&gt; [a] <a href="src/Data-List-Extra.html#drop1" class="link">Source</a> <a href="#v:drop1" class="selflink">#</a></p><div class="doc"><p>Equivalent to <code>drop 1</code>, but likely to be faster and a single lexeme.</p><pre>drop1 &quot;&quot;         == &quot;&quot;
drop1 &quot;test&quot;     == &quot;est&quot;
\xs -&gt; drop 1 xs == drop1 xs</pre></div></div><div class="top"><p class="src"><a id="v:mconcatMap" class="def">mconcatMap</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> b =&gt; (a -&gt; b) -&gt; [a] -&gt; b <a href="src/Data-List-Extra.html#mconcatMap" class="link">Source</a> <a href="#v:mconcatMap" class="selflink">#</a></p><div class="doc"><p>Version on <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:concatMap">concatMap</a></code> generalised to a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a></code> rather than just a list.</p><pre>mconcatMap Sum [1,2,3] == Sum 6
\f xs -&gt; mconcatMap f xs == concatMap f xs</pre></div></div><div class="top"><p class="src"><a id="v:groupSort" class="def">groupSort</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> k =&gt; [(k, v)] -&gt; [(k, [v])] <a href="src/Data-List-Extra.html#groupSort" class="link">Source</a> <a href="#v:groupSort" class="selflink">#</a></p><div class="doc"><p>A combination of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:group">group</a></code> and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:sort">sort</a></code>.</p><pre>groupSort [(1,'t'),(3,'t'),(2,'e'),(2,'s')] == [(1,&quot;t&quot;),(2,&quot;es&quot;),(3,&quot;t&quot;)]
\xs -&gt; map fst (groupSort xs) == sort (nub (map fst xs))
\xs -&gt; concatMap snd (groupSort xs) == map snd (sortOn fst xs)</pre></div></div><div class="top"><p class="src"><a id="v:groupSortOn" class="def">groupSortOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> b =&gt; (a -&gt; b) -&gt; [a] -&gt; [[a]] <a href="src/Data-List-Extra.html#groupSortOn" class="link">Source</a> <a href="#v:groupSortOn" class="selflink">#</a></p><div class="doc"><p>A combination of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:group">group</a></code> and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:sort">sort</a></code>, using a part of the value to compare on.</p><pre>groupSortOn length [&quot;test&quot;,&quot;of&quot;,&quot;sized&quot;,&quot;item&quot;] == [[&quot;of&quot;],[&quot;test&quot;,&quot;item&quot;],[&quot;sized&quot;]]</pre></div></div><div class="top"><p class="src"><a id="v:groupSortBy" class="def">groupSortBy</a> :: (a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; [a] -&gt; [[a]] <a href="src/Data-List-Extra.html#groupSortBy" class="link">Source</a> <a href="#v:groupSortBy" class="selflink">#</a></p><div class="doc"><p>A combination of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:group">group</a></code> and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:sort">sort</a></code>, using a predicate to compare on.</p><pre>groupSortBy (compare `on` length) [&quot;test&quot;,&quot;of&quot;,&quot;sized&quot;,&quot;item&quot;] == [[&quot;of&quot;],[&quot;test&quot;,&quot;item&quot;],[&quot;sized&quot;]]</pre></div></div><div class="top"><p class="src"><a id="v:nubOrd" class="def">nubOrd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; [a] -&gt; [a] <a href="src/Data-List-Extra.html#nubOrd" class="link">Source</a> <a href="#v:nubOrd" class="selflink">#</a></p><div class="doc"><p><em>O(n log n)</em>. The <code><a href="Extra.html#v:nubOrd">nubOrd</a></code> function removes duplicate elements from a list.
 In particular, it keeps only the first occurrence of each element.
 Unlike the standard <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:nub">nub</a></code> operator, this version requires an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a></code> instance
 and consequently runs asymptotically faster.</p><pre>nubOrd &quot;this is a test&quot; == &quot;this ae&quot;
nubOrd (take 4 (&quot;this&quot; ++ undefined)) == &quot;this&quot;
\xs -&gt; nubOrd xs == nub xs</pre></div></div><div class="top"><p class="src"><a id="v:nubOrdBy" class="def">nubOrdBy</a> :: (a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; [a] -&gt; [a] <a href="src/Data-List-Extra.html#nubOrdBy" class="link">Source</a> <a href="#v:nubOrdBy" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="Extra.html#v:nubOrd">nubOrd</a></code> with a custom predicate.</p><pre>nubOrdBy (compare `on` length) [&quot;a&quot;,&quot;test&quot;,&quot;of&quot;,&quot;this&quot;] == [&quot;a&quot;,&quot;test&quot;,&quot;of&quot;]</pre></div></div><div class="top"><p class="src"><a id="v:nubOrdOn" class="def">nubOrdOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> b =&gt; (a -&gt; b) -&gt; [a] -&gt; [a] <a href="src/Data-List-Extra.html#nubOrdOn" class="link">Source</a> <a href="#v:nubOrdOn" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="Extra.html#v:nubOrd">nubOrd</a></code> which operates on a portion of the value.</p><pre>nubOrdOn length [&quot;a&quot;,&quot;test&quot;,&quot;of&quot;,&quot;this&quot;] == [&quot;a&quot;,&quot;test&quot;,&quot;of&quot;]</pre></div></div><div class="top"><p class="src"><a id="v:nubOn" class="def">nubOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> b =&gt; (a -&gt; b) -&gt; [a] -&gt; [a] <a href="src/Data-List-Extra.html#nubOn" class="link">Source</a> <a href="#v:nubOn" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:nub">nub</a></code> where the equality is done on some extracted value.
   <code>nubOn f</code> is equivalent to <code>nubBy ((==) <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Function.html#v:on">on</a></code> f)</code>, but has the
   performance advantage of only evaluating <code>f</code> once for each element in the
   input list.</p></div></div><div class="top"><p class="src"><a id="v:groupOn" class="def">groupOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> b =&gt; (a -&gt; b) -&gt; [a] -&gt; [[a]] <a href="src/Data-List-Extra.html#groupOn" class="link">Source</a> <a href="#v:groupOn" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:group">group</a></code> where the equality is done on some extracted value.</p></div></div><div class="top"><p class="src"><a id="v:sortOn" class="def">sortOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> b =&gt; (a -&gt; b) -&gt; [a] -&gt; [a] <a href="#v:sortOn" class="selflink">#</a></p><div class="doc"><p>Sort a list by comparing the results of a key function applied to each
 element.  <code>sortOn f</code> is equivalent to <code>sortBy (comparing f)</code>, but has the
 performance advantage of only evaluating <code>f</code> once for each element in the
 input list.  This is called the decorate-sort-undecorate paradigm, or
 Schwartzian transform.</p><p><em>Since: 4.8.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:disjoint" class="def">disjoint</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-List-Extra.html#disjoint" class="link">Source</a> <a href="#v:disjoint" class="selflink">#</a></p><div class="doc"><p>Are two lists disjoint, with no elements in common.</p><pre>disjoint [1,2,3] [4,5] == True
disjoint [1,2,3] [4,1] == False</pre></div></div><div class="top"><p class="src"><a id="v:allSame" class="def">allSame</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-List-Extra.html#allSame" class="link">Source</a> <a href="#v:allSame" class="selflink">#</a></p><div class="doc"><p>Are all elements the same.</p><pre>allSame [1,1,2] == False
allSame [1,1,1] == True
allSame [1]     == True
allSame []      == True
allSame (1:1:2:undefined) == False
\xs -&gt; allSame xs == (length (nub xs) &lt;= 1)</pre></div></div><div class="top"><p class="src"><a id="v:anySame" class="def">anySame</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-List-Extra.html#anySame" class="link">Source</a> <a href="#v:anySame" class="selflink">#</a></p><div class="doc"><p>Is there any element which occurs more than once.</p><pre>anySame [1,1,2] == True
anySame [1,2,3] == False
anySame (1:2:1:undefined) == True
anySame [] == False
\xs -&gt; anySame xs == (length (nub xs) &lt; length xs)</pre></div></div><div class="top"><p class="src"><a id="v:repeatedly" class="def">repeatedly</a> :: ([a] -&gt; (b, [a])) -&gt; [a] -&gt; [b] <a href="src/Data-List-Extra.html#repeatedly" class="link">Source</a> <a href="#v:repeatedly" class="selflink">#</a></p><div class="doc"><p>Apply some operation repeatedly, producing an element of output
   and the remainder of the list.</p><pre>\xs -&gt; repeatedly (splitAt 3) xs  == chunksOf 3 xs
\xs -&gt; repeatedly word1 (trim xs) == words xs
\xs -&gt; repeatedly line1 xs == lines xs</pre></div></div><div class="top"><p class="src"><a id="v:for" class="def">for</a> :: [a] -&gt; (a -&gt; b) -&gt; [b] <a href="src/Data-List-Extra.html#for" class="link">Source</a> <a href="#v:for" class="selflink">#</a></p><div class="doc"><p>Flipped version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:map">map</a></code>.</p><pre>for [1,2,3] (+1) == [2,3,4]</pre></div></div><div class="top"><p class="src"><a id="v:firstJust" class="def">firstJust</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b) -&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b <a href="src/Data-List-Extra.html#firstJust" class="link">Source</a> <a href="#v:firstJust" class="selflink">#</a></p><div class="doc"><p>Find the first element of a list for which the operation returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Just">Just</a></code>, along
   with the result of the operation. Like <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:find">find</a></code> but useful where the function also
   computes some expensive information that can be reused. Particular useful
   when the function is monadic, see <code>firstJustM</code>.</p><pre>firstJust id [Nothing,Just 3]  == Just 3
firstJust id [Nothing,Nothing] == Nothing</pre></div></div><div class="top"><p class="src"><a id="v:concatUnzip" class="def">concatUnzip</a> :: [([a], [b])] -&gt; ([a], [b]) <a href="src/Data-List-Extra.html#concatUnzip" class="link">Source</a> <a href="#v:concatUnzip" class="selflink">#</a></p><div class="doc"><p>A merging of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:unzip">unzip</a></code> and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:concat">concat</a></code>.</p><pre>concatUnzip [(&quot;a&quot;,&quot;AB&quot;),(&quot;bc&quot;,&quot;C&quot;)] == (&quot;abc&quot;,&quot;ABC&quot;)</pre></div></div><div class="top"><p class="src"><a id="v:concatUnzip3" class="def">concatUnzip3</a> :: [([a], [b], [c])] -&gt; ([a], [b], [c]) <a href="src/Data-List-Extra.html#concatUnzip3" class="link">Source</a> <a href="#v:concatUnzip3" class="selflink">#</a></p><div class="doc"><p>A merging of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:unzip3">unzip3</a></code> and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:concat">concat</a></code>.</p><pre>concatUnzip3 [(&quot;a&quot;,&quot;AB&quot;,&quot;&quot;),(&quot;bc&quot;,&quot;C&quot;,&quot;123&quot;)] == (&quot;abc&quot;,&quot;ABC&quot;,&quot;123&quot;)</pre></div></div><div class="top"><p class="src"><a id="v:replace" class="def">replace</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; [a] -&gt; [a] <a href="src/Data-List-Extra.html#replace" class="link">Source</a> <a href="#v:replace" class="selflink">#</a></p><div class="doc"><p>Replace a subsequence everywhere it occurs. The first argument must
   not be the empty list.</p><pre>replace &quot;el&quot; &quot;_&quot; &quot;Hello Bella&quot; == &quot;H_lo B_la&quot;
replace &quot;el&quot; &quot;e&quot; &quot;Hello&quot;       == &quot;Helo&quot;
replace &quot;&quot; &quot;e&quot; &quot;Hello&quot;         == undefined
\xs ys -&gt; not (null xs) ==&gt; replace xs xs ys == ys</pre></div></div><div class="top"><p class="src"><a id="v:merge" class="def">merge</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; [a] -&gt; [a] -&gt; [a] <a href="src/Data-List-Extra.html#merge" class="link">Source</a> <a href="#v:merge" class="selflink">#</a></p><div class="doc"><p>Merge two lists which are assumed to be ordered.</p><pre>merge &quot;ace&quot; &quot;bd&quot; == &quot;abcde&quot;
\xs ys -&gt; merge (sort xs) (sort ys) == sort (xs ++ ys)</pre></div></div><div class="top"><p class="src"><a id="v:mergeBy" class="def">mergeBy</a> :: (a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; [a] -&gt; [a] -&gt; [a] <a href="src/Data-List-Extra.html#mergeBy" class="link">Source</a> <a href="#v:mergeBy" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:merge">merge</a></code>, but with a custom ordering function.</p></div></div><h1 id="g:7">Data.Tuple.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="Data-Tuple-Extra.html">Data.Tuple.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:first" class="def">first</a> :: (a -&gt; a') -&gt; (a, b) -&gt; (a', b) <a href="src/Data-Tuple-Extra.html#first" class="link">Source</a> <a href="#v:first" class="selflink">#</a></p><div class="doc"><p>Update the first component of a pair.</p><pre>first succ (1,&quot;test&quot;) == (2,&quot;test&quot;)</pre></div></div><div class="top"><p class="src"><a id="v:second" class="def">second</a> :: (b -&gt; b') -&gt; (a, b) -&gt; (a, b') <a href="src/Data-Tuple-Extra.html#second" class="link">Source</a> <a href="#v:second" class="selflink">#</a></p><div class="doc"><p>Update the second component of a pair.</p><pre>second reverse (1,&quot;test&quot;) == (1,&quot;tset&quot;)</pre></div></div><div class="top"><p class="src"><a id="v:-42--42--42-" class="def">(***)</a> :: (a -&gt; a') -&gt; (b -&gt; b') -&gt; (a, b) -&gt; (a', b') <span class="fixity">infixr 3</span><span class="rightedge"></span> <a href="src/Data-Tuple-Extra.html#%2A%2A%2A" class="link">Source</a> <a href="#v:-42--42--42-" class="selflink">#</a></p><div class="doc"><p>Given two functions, apply one to the first component and one to the second.
   A specialised version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Arrow.html#v:-42--42--42-">***</a></code>.</p><pre>(succ *** reverse) (1,&quot;test&quot;) == (2,&quot;tset&quot;)</pre></div></div><div class="top"><p class="src"><a id="v:-38--38--38-" class="def">(&amp;&amp;&amp;)</a> :: (a -&gt; b) -&gt; (a -&gt; c) -&gt; a -&gt; (b, c) <span class="fixity">infixr 3</span><span class="rightedge"></span> <a href="src/Data-Tuple-Extra.html#%26%26%26" class="link">Source</a> <a href="#v:-38--38--38-" class="selflink">#</a></p><div class="doc"><p>Given two functions, apply both to a single argument to form a pair.
   A specialised version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Arrow.html#v:-38--38--38-">&amp;&amp;&amp;</a></code>.</p><pre>(succ &amp;&amp;&amp; pred) 1 == (2,0)</pre></div></div><div class="top"><p class="src"><a id="v:dupe" class="def">dupe</a> :: a -&gt; (a, a) <a href="src/Data-Tuple-Extra.html#dupe" class="link">Source</a> <a href="#v:dupe" class="selflink">#</a></p><div class="doc"><p>Duplicate a single value into a pair.</p><pre>dupe 12 == (12, 12)</pre></div></div><div class="top"><p class="src"><a id="v:both" class="def">both</a> :: (a -&gt; b) -&gt; (a, a) -&gt; (b, b) <a href="src/Data-Tuple-Extra.html#both" class="link">Source</a> <a href="#v:both" class="selflink">#</a></p><div class="doc"><p>Apply a single function to both components of a pair.</p><pre>both succ (1,2) == (2,3)</pre></div></div><div class="top"><p class="src"><a id="v:fst3" class="def">fst3</a> :: (a, b, c) -&gt; a <a href="src/Data-Tuple-Extra.html#fst3" class="link">Source</a> <a href="#v:fst3" class="selflink">#</a></p><div class="doc"><p>Extract the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Tuple.html#v:fst">fst</a></code> of a triple.</p></div></div><div class="top"><p class="src"><a id="v:snd3" class="def">snd3</a> :: (a, b, c) -&gt; b <a href="src/Data-Tuple-Extra.html#snd3" class="link">Source</a> <a href="#v:snd3" class="selflink">#</a></p><div class="doc"><p>Extract the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Tuple.html#v:snd">snd</a></code> of a triple.</p></div></div><div class="top"><p class="src"><a id="v:thd3" class="def">thd3</a> :: (a, b, c) -&gt; c <a href="src/Data-Tuple-Extra.html#thd3" class="link">Source</a> <a href="#v:thd3" class="selflink">#</a></p><div class="doc"><p>Extract the final element of a triple.</p></div></div><h1 id="g:8">Data.Typeable.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="Data-Typeable-Extra.html">Data.Typeable.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:typeRep" class="def">typeRep</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> k a =&gt; proxy a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Typeable-Internal.html#t:TypeRep">TypeRep</a> <a href="#v:typeRep" class="selflink">#</a></p><div class="doc"><p>Takes a value of type <code>a</code> and returns a concrete representation
 of that type.</p><p><em>Since: 4.7.0.0</em></p></div></div><div class="top"><p class="src"><span class="keyword">data</span> (k <a id="t::-126-:" class="def">:~:</a> a) b :: <span class="keyword">forall</span> k. k -&gt; k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <span class="keyword">where</span> <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="#t::-126-:" class="selflink">#</a></p><div class="doc"><p>Propositional equality. If <code>a :~: b</code> is inhabited by some terminating
 value, then the type <code>a</code> is the same as the type <code>b</code>. To use this equality
 in practice, pattern-match on the <code>a :~: b</code> to get out the <code>Refl</code> constructor;
 in the body of the pattern-match, the compiler knows that <code>a ~ b</code>.</p><p><em>Since: 4.7.0.0</em></p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Refl" class="def">Refl</a> :: <a href="Extra.html#t::-126-:">(:~:)</a> k a a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i::-126-:" class="caption collapser" onclick="toggleSection('i::-126-:')">Instances</p><div id="section.i::-126-:" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id::-126-::TestEquality:1" class="instance expander" onclick="toggleSection('i:id::-126-::TestEquality:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Type-Equality.html#t:TestEquality">TestEquality</a> k (<a href="Extra.html#t::-126-:">(:~:)</a> k a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id::-126-::TestEquality:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:testEquality">testEquality</a> :: f a -&gt; f b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (((k <a href="Extra.html#t::-126-:">:~:</a> a) <a href="Extra.html#t::-126-:">:~:</a> a) b) <a href="#v:testEquality" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id::-126-::Bounded:2" class="instance expander" onclick="toggleSection('i:id::-126-::Bounded:2')"></span> (~) k a b =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Bounded">Bounded</a> (<a href="Extra.html#t::-126-:">(:~:)</a> k a b)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id::-126-::Bounded:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:minBound">minBound</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b <a href="#v:minBound" class="selflink">#</a></p><p class="src"><a href="#v:maxBound">maxBound</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b <a href="#v:maxBound" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id::-126-::Enum:3" class="instance expander" onclick="toggleSection('i:id::-126-::Enum:3')"></span> (~) k a b =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Enum">Enum</a> (<a href="Extra.html#t::-126-:">(:~:)</a> k a b)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id::-126-::Enum:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:succ">succ</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b <a href="#v:succ" class="selflink">#</a></p><p class="src"><a href="#v:pred">pred</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b <a href="#v:pred" class="selflink">#</a></p><p class="src"><a href="#v:toEnum">toEnum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b <a href="#v:toEnum" class="selflink">#</a></p><p class="src"><a href="#v:fromEnum">fromEnum</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="#v:fromEnum" class="selflink">#</a></p><p class="src"><a href="#v:enumFrom">enumFrom</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; [(k <a href="Extra.html#t::-126-:">:~:</a> a) b] <a href="#v:enumFrom" class="selflink">#</a></p><p class="src"><a href="#v:enumFromThen">enumFromThen</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; [(k <a href="Extra.html#t::-126-:">:~:</a> a) b] <a href="#v:enumFromThen" class="selflink">#</a></p><p class="src"><a href="#v:enumFromTo">enumFromTo</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; [(k <a href="Extra.html#t::-126-:">:~:</a> a) b] <a href="#v:enumFromTo" class="selflink">#</a></p><p class="src"><a href="#v:enumFromThenTo">enumFromThenTo</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; [(k <a href="Extra.html#t::-126-:">:~:</a> a) b] <a href="#v:enumFromThenTo" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id::-126-::Eq:4" class="instance expander" onclick="toggleSection('i:id::-126-::Eq:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Extra.html#t::-126-:">(:~:)</a> k a b)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id::-126-::Eq:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id::-126-::Ord:5" class="instance expander" onclick="toggleSection('i:id::-126-::Ord:5')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Extra.html#t::-126-:">(:~:)</a> k a b)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id::-126-::Ord:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(&lt;)</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(&gt;)</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id::-126-::Read:6" class="instance expander" onclick="toggleSection('i:id::-126-::Read:6')"></span> (~) k a b =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Read.html#t:Read">Read</a> (<a href="Extra.html#t::-126-:">(:~:)</a> k a b)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id::-126-::Read:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> ((k <a href="Extra.html#t::-126-:">:~:</a> a) b) <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [(k <a href="Extra.html#t::-126-:">:~:</a> a) b] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> ((k <a href="Extra.html#t::-126-:">:~:</a> a) b) <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [(k <a href="Extra.html#t::-126-:">:~:</a> a) b] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id::-126-::Show:7" class="instance expander" onclick="toggleSection('i:id::-126-::Show:7')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> (<a href="Extra.html#t::-126-:">(:~:)</a> k a b)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id::-126-::Show:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: (k <a href="Extra.html#t::-126-:">:~:</a> a) b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [(k <a href="Extra.html#t::-126-:">:~:</a> a) b] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Proxy" class="def">Proxy</a> k t :: <span class="keyword">forall</span> k. k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="#t:Proxy" class="selflink">#</a></p><div class="doc"><p>A concrete, poly-kinded proxy type</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Proxy" class="def">Proxy</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Proxy" class="caption collapser" onclick="toggleSection('i:Proxy')">Instances</p><div id="section.i:Proxy" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Monad:1" class="instance expander" onclick="toggleSection('i:id:Proxy:Monad:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Monad:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--61-">(&gt;&gt;=)</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; (a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> b) -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> b <a href="#v:-62--62--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62--62-">(&gt;&gt;)</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> b -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> b <a href="#v:-62--62-" class="selflink">#</a></p><p class="src"><a href="#v:return">return</a> :: a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a <a href="#v:return" class="selflink">#</a></p><p class="src"><a href="#v:fail">fail</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a <a href="#v:fail" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Functor:2" class="instance expander" onclick="toggleSection('i:id:Proxy:Functor:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Functor:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -&gt; b) -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(&lt;$)</a> :: a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> b -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Applicative:3" class="instance expander" onclick="toggleSection('i:id:Proxy:Applicative:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Applicative:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pure">pure</a> :: a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a <a href="#v:pure" class="selflink">#</a></p><p class="src"><a href="#v:-60--42--62-">(&lt;*&gt;)</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> (a -&gt; b) -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> b <a href="#v:-60--42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-42--62-">(*&gt;)</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> b -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> b <a href="#v:-42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-60--42-">(&lt;*)</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> b -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a <a href="#v:-60--42-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Foldable:4" class="instance expander" onclick="toggleSection('i:id:Proxy:Foldable:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Foldable:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fold">fold</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> m =&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> m -&gt; m <a href="#v:fold" class="selflink">#</a></p><p class="src"><a href="#v:foldMap">foldMap</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> m =&gt; (a -&gt; m) -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; m <a href="#v:foldMap" class="selflink">#</a></p><p class="src"><a href="#v:foldr">foldr</a> :: (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; b <a href="#v:foldr" class="selflink">#</a></p><p class="src"><a href="#v:foldr-39-">foldr'</a> :: (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; b <a href="#v:foldr-39-" class="selflink">#</a></p><p class="src"><a href="#v:foldl">foldl</a> :: (b -&gt; a -&gt; b) -&gt; b -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; b <a href="#v:foldl" class="selflink">#</a></p><p class="src"><a href="#v:foldl-39-">foldl'</a> :: (b -&gt; a -&gt; b) -&gt; b -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; b <a href="#v:foldl-39-" class="selflink">#</a></p><p class="src"><a href="#v:foldr1">foldr1</a> :: (a -&gt; a -&gt; a) -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; a <a href="#v:foldr1" class="selflink">#</a></p><p class="src"><a href="#v:foldl1">foldl1</a> :: (a -&gt; a -&gt; a) -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; a <a href="#v:foldl1" class="selflink">#</a></p><p class="src"><a href="#v:toList">toList</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; [a] <a href="#v:toList" class="selflink">#</a></p><p class="src"><a href="#v:null">null</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:null" class="selflink">#</a></p><p class="src"><a href="#v:length">length</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="#v:length" class="selflink">#</a></p><p class="src"><a href="#v:elem">elem</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:elem" class="selflink">#</a></p><p class="src"><a href="#v:maximum">maximum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; a <a href="#v:maximum" class="selflink">#</a></p><p class="src"><a href="#v:minimum">minimum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; a <a href="#v:minimum" class="selflink">#</a></p><p class="src"><a href="#v:sum">sum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; a <a href="#v:sum" class="selflink">#</a></p><p class="src"><a href="#v:product">product</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; a <a href="#v:product" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Traversable:5" class="instance expander" onclick="toggleSection('i:id:Proxy:Traversable:5')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Traversable.html#t:Traversable">Traversable</a> (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Traversable:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:traverse">traverse</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (a -&gt; f b) -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; f (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> b) <a href="#v:traverse" class="selflink">#</a></p><p class="src"><a href="#v:sequenceA">sequenceA</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> (f a) -&gt; f (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a) <a href="#v:sequenceA" class="selflink">#</a></p><p class="src"><a href="#v:mapM">mapM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m b) -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; m (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> b) <a href="#v:mapM" class="selflink">#</a></p><p class="src"><a href="#v:sequence">sequence</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> (m a) -&gt; m (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a) <a href="#v:sequence" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Generic1:6" class="instance expander" onclick="toggleSection('i:id:Proxy:Generic1:6')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:Generic1">Generic1</a> (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Generic1:6" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:Rep1">Rep1</a> (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="#t:Rep1" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from1">from1</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:Rep1">Rep1</a> (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>) a <a href="#v:from1" class="selflink">#</a></p><p class="src"><a href="#v:to1">to1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:Rep1">Rep1</a> (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>) a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a <a href="#v:to1" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Alternative:7" class="instance expander" onclick="toggleSection('i:id:Proxy:Alternative:7')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Alternative">Alternative</a> (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Alternative:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:empty">empty</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a <a href="#v:empty" class="selflink">#</a></p><p class="src"><a href="#v:-60--124--62-">(&lt;|&gt;)</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a <a href="#v:-60--124--62-" class="selflink">#</a></p><p class="src"><a href="#v:some">some</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> [a] <a href="#v:some" class="selflink">#</a></p><p class="src"><a href="#v:many">many</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> [a] <a href="#v:many" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:MonadPlus:8" class="instance expander" onclick="toggleSection('i:id:Proxy:MonadPlus:8')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:MonadPlus:8" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mzero">mzero</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a <a href="#v:mzero" class="selflink">#</a></p><p class="src"><a href="#v:mplus">mplus</a> :: <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a -&gt; <a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a <a href="#v:mplus" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Bounded:9" class="instance expander" onclick="toggleSection('i:id:Proxy:Bounded:9')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Bounded">Bounded</a> (<a href="Extra.html#t:Proxy">Proxy</a> k s)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Bounded:9" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:minBound">minBound</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s <a href="#v:minBound" class="selflink">#</a></p><p class="src"><a href="#v:maxBound">maxBound</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s <a href="#v:maxBound" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Enum:10" class="instance expander" onclick="toggleSection('i:id:Proxy:Enum:10')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Enum">Enum</a> (<a href="Extra.html#t:Proxy">Proxy</a> k s)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Enum:10" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:succ">succ</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s <a href="#v:succ" class="selflink">#</a></p><p class="src"><a href="#v:pred">pred</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s <a href="#v:pred" class="selflink">#</a></p><p class="src"><a href="#v:toEnum">toEnum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s <a href="#v:toEnum" class="selflink">#</a></p><p class="src"><a href="#v:fromEnum">fromEnum</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="#v:fromEnum" class="selflink">#</a></p><p class="src"><a href="#v:enumFrom">enumFrom</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; [<a href="Extra.html#t:Proxy">Proxy</a> k s] <a href="#v:enumFrom" class="selflink">#</a></p><p class="src"><a href="#v:enumFromThen">enumFromThen</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; [<a href="Extra.html#t:Proxy">Proxy</a> k s] <a href="#v:enumFromThen" class="selflink">#</a></p><p class="src"><a href="#v:enumFromTo">enumFromTo</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; [<a href="Extra.html#t:Proxy">Proxy</a> k s] <a href="#v:enumFromTo" class="selflink">#</a></p><p class="src"><a href="#v:enumFromThenTo">enumFromThenTo</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; [<a href="Extra.html#t:Proxy">Proxy</a> k s] <a href="#v:enumFromThenTo" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Eq:11" class="instance expander" onclick="toggleSection('i:id:Proxy:Eq:11')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Extra.html#t:Proxy">Proxy</a> k s)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Eq:11" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Ord:12" class="instance expander" onclick="toggleSection('i:id:Proxy:Ord:12')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Extra.html#t:Proxy">Proxy</a> k s)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Ord:12" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Read:13" class="instance expander" onclick="toggleSection('i:id:Proxy:Read:13')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Read.html#t:Read">Read</a> (<a href="Extra.html#t:Proxy">Proxy</a> k s)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Read:13" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> (<a href="Extra.html#t:Proxy">Proxy</a> k s) <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Extra.html#t:Proxy">Proxy</a> k s] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> (<a href="Extra.html#t:Proxy">Proxy</a> k s) <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Extra.html#t:Proxy">Proxy</a> k s] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Show:14" class="instance expander" onclick="toggleSection('i:id:Proxy:Show:14')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> (<a href="Extra.html#t:Proxy">Proxy</a> k s)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Show:14" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Extra.html#t:Proxy">Proxy</a> k s] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Ix:15" class="instance expander" onclick="toggleSection('i:id:Proxy:Ix:15')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ix.html#t:Ix">Ix</a> (<a href="Extra.html#t:Proxy">Proxy</a> k s)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Ix:15" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:range">range</a> :: (<a href="Extra.html#t:Proxy">Proxy</a> k s, <a href="Extra.html#t:Proxy">Proxy</a> k s) -&gt; [<a href="Extra.html#t:Proxy">Proxy</a> k s] <a href="#v:range" class="selflink">#</a></p><p class="src"><a href="#v:index">index</a> :: (<a href="Extra.html#t:Proxy">Proxy</a> k s, <a href="Extra.html#t:Proxy">Proxy</a> k s) -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="#v:index" class="selflink">#</a></p><p class="src"><a href="#v:unsafeIndex">unsafeIndex</a> :: (<a href="Extra.html#t:Proxy">Proxy</a> k s, <a href="Extra.html#t:Proxy">Proxy</a> k s) -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></p><p class="src"><a href="#v:inRange">inRange</a> :: (<a href="Extra.html#t:Proxy">Proxy</a> k s, <a href="Extra.html#t:Proxy">Proxy</a> k s) -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:inRange" class="selflink">#</a></p><p class="src"><a href="#v:rangeSize">rangeSize</a> :: (<a href="Extra.html#t:Proxy">Proxy</a> k s, <a href="Extra.html#t:Proxy">Proxy</a> k s) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="#v:rangeSize" class="selflink">#</a></p><p class="src"><a href="#v:unsafeRangeSize">unsafeRangeSize</a> :: (<a href="Extra.html#t:Proxy">Proxy</a> k s, <a href="Extra.html#t:Proxy">Proxy</a> k s) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Generic:16" class="instance expander" onclick="toggleSection('i:id:Proxy:Generic:16')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:Generic">Generic</a> (<a href="Extra.html#t:Proxy">Proxy</a> k t)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Generic:16" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:Rep">Rep</a> (<a href="Extra.html#t:Proxy">Proxy</a> k t) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="#t:Rep" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from">from</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k t -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:Rep">Rep</a> (<a href="Extra.html#t:Proxy">Proxy</a> k t) x <a href="#v:from" class="selflink">#</a></p><p class="src"><a href="#v:to">to</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:Rep">Rep</a> (<a href="Extra.html#t:Proxy">Proxy</a> k t) x -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k t <a href="#v:to" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Monoid:17" class="instance expander" onclick="toggleSection('i:id:Proxy:Monoid:17')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Extra.html#t:Proxy">Proxy</a> k s)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Monoid:17" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mempty">mempty</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s <a href="#v:mempty" class="selflink">#</a></p><p class="src"><a href="#v:mappend">mappend</a> :: <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s <a href="#v:mappend" class="selflink">#</a></p><p class="src"><a href="#v:mconcat">mconcat</a> :: [<a href="Extra.html#t:Proxy">Proxy</a> k s] -&gt; <a href="Extra.html#t:Proxy">Proxy</a> k s <a href="#v:mconcat" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Rep1:18" class="instance expander" onclick="toggleSection('i:id:Proxy:Rep1:18')"></span> <span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:Rep1">Rep1</a> (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Rep1:18" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:Rep1">Rep1</a> (<a href="Extra.html#t:Proxy">Proxy</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>) = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:D1">D1</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#v:MetaData">MetaData</a> &quot;Proxy&quot; &quot;Data.Proxy&quot; &quot;base&quot; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:False">False</a>) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:C1">C1</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#v:MetaCons">MetaCons</a> &quot;Proxy&quot; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#v:PrefixI">PrefixI</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:False">False</a>) <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:U1">U1</a>)</div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Proxy:Rep:19" class="instance expander" onclick="toggleSection('i:id:Proxy:Rep:19')"></span> <span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:Rep">Rep</a> (<a href="Extra.html#t:Proxy">Proxy</a> k t)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Proxy:Rep:19" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:Rep">Rep</a> (<a href="Extra.html#t:Proxy">Proxy</a> k t) = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:D1">D1</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#v:MetaData">MetaData</a> &quot;Proxy&quot; &quot;Data.Proxy&quot; &quot;base&quot; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:False">False</a>) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:C1">C1</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#v:MetaCons">MetaCons</a> &quot;Proxy&quot; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#v:PrefixI">PrefixI</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:False">False</a>) <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-Generics.html#t:U1">U1</a>)</div></div></td></tr></table></div></div></div><h1 id="g:9">Data.Version.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="Data-Version-Extra.html">Data.Version.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:makeVersion" class="def">makeVersion</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Version.html#t:Version">Version</a> <a href="#v:makeVersion" class="selflink">#</a></p><div class="doc"><p>Construct tag-less <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Version.html#t:Version">Version</a></code></p><p><em>Since: 4.8.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:readVersion" class="def">readVersion</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Version.html#t:Version">Version</a> <a href="src/Data-Version-Extra.html#readVersion" class="link">Source</a> <a href="#v:readVersion" class="selflink">#</a></p><div class="doc"><p>Read a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Version.html#t:Version">Version</a></code> or throw an exception.</p><pre>\x -&gt; readVersion (showVersion x) == x
readVersion &quot;hello&quot; == undefined</pre></div></div><h1 id="g:10">Numeric.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="Numeric-Extra.html">Numeric.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:showDP" class="def">showDP</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:RealFloat">RealFloat</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/Numeric-Extra.html#showDP" class="link">Source</a> <a href="#v:showDP" class="selflink">#</a></p><div class="doc"><p>Show a number to a fixed number of decimal places.</p><pre>showDP 4 pi == &quot;3.1416&quot;
showDP 0 pi == &quot;3&quot;
showDP 2 3  == &quot;3.00&quot;</pre></div></div><div class="top"><p class="src"><a id="v:intToDouble" class="def">intToDouble</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Double">Double</a> <a href="src/Numeric-Extra.html#intToDouble" class="link">Source</a> <a href="#v:intToDouble" class="selflink">#</a></p><div class="doc"><p>Specialised numeric conversion, type restricted version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#v:fromIntegral">fromIntegral</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:intToFloat" class="def">intToFloat</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Float">Float</a> <a href="src/Numeric-Extra.html#intToFloat" class="link">Source</a> <a href="#v:intToFloat" class="selflink">#</a></p><div class="doc"><p>Specialised numeric conversion, type restricted version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#v:fromIntegral">fromIntegral</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:floatToDouble" class="def">floatToDouble</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Float">Float</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Double">Double</a> <a href="src/Numeric-Extra.html#floatToDouble" class="link">Source</a> <a href="#v:floatToDouble" class="selflink">#</a></p><div class="doc"><p>Specialised numeric conversion, type restricted version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#v:realToFrac">realToFrac</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:doubleToFloat" class="def">doubleToFloat</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Double">Double</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Float">Float</a> <a href="src/Numeric-Extra.html#doubleToFloat" class="link">Source</a> <a href="#v:doubleToFloat" class="selflink">#</a></p><div class="doc"><p>Specialised numeric conversion, type restricted version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#v:realToFrac">realToFrac</a></code>.</p></div></div><h1 id="g:11">System.Directory.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="System-Directory-Extra.html">System.Directory.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:withCurrentDirectory" class="def">withCurrentDirectory</a> <a href="#v:withCurrentDirectory" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Directory to execute in</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</td><td class="doc"><p>Action to be executed</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Run an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a></code> action with the given working directory and restore the
 original working directory afterwards, even if the given action fails due
 to an exception.</p><p>The operation may fail with the same exceptions as <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/directory-1.2.6.2/System-Directory.html#v:getCurrentDirectory">getCurrentDirectory</a></code>
 and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/directory-1.2.6.2/System-Directory.html#v:setCurrentDirectory">setCurrentDirectory</a></code>.</p><p><em>Since: 1.2.3.0</em></p></div></div><div class="top"><p class="src"><a id="v:createDirectoryPrivate" class="def">createDirectoryPrivate</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/System-Directory-Extra.html#createDirectoryPrivate" class="link">Source</a> <a href="#v:createDirectoryPrivate" class="selflink">#</a></p><div class="doc"><p>Create a directory with permissions so that only the current user can view it.
   On Windows this function is equivalent to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/directory-1.2.6.2/System-Directory.html#v:createDirectory">createDirectory</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:listContents" class="def">listContents</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>] <a href="src/System-Directory-Extra.html#listContents" class="link">Source</a> <a href="#v:listContents" class="selflink">#</a></p><div class="doc"><p>List the files and directories directly within a directory.
   Each result will be prefixed by the query directory, and the special directories <code>.</code> and <code>..</code> will be ignored.
   Intended as a cleaned up version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/directory-1.2.6.2/System-Directory.html#v:getDirectoryContents">getDirectoryContents</a></code>.</p><pre>withTempDir $ \dir -&gt; do writeFile (dir &lt;/&gt; &quot;test.txt&quot;) &quot;&quot;; (== [dir &lt;/&gt; &quot;test.txt&quot;]) &lt;$&gt; listContents dir
let touch = mapM_ $ \x -&gt; createDirectoryIfMissing True (takeDirectory x) &gt;&gt; writeFile x &quot;&quot;
let listTest op as bs = withTempDir $ \dir -&gt; do touch $ map (dir &lt;/&gt;) as; res &lt;- op dir; return $ map (drop (length dir + 1)) res == bs
listTest listContents [&quot;bar.txt&quot;,&quot;foo/baz.txt&quot;,&quot;zoo&quot;] [&quot;bar.txt&quot;,&quot;foo&quot;,&quot;zoo&quot;]</pre></div></div><div class="top"><p class="src"><a id="v:listFiles" class="def">listFiles</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>] <a href="src/System-Directory-Extra.html#listFiles" class="link">Source</a> <a href="#v:listFiles" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:listContents">listContents</a></code>, but only returns the files in a directory, not other directories.
   Each file will be prefixed by the query directory.</p><pre>listTest listFiles [&quot;bar.txt&quot;,&quot;foo/baz.txt&quot;,&quot;zoo&quot;] [&quot;bar.txt&quot;,&quot;zoo&quot;]</pre></div></div><div class="top"><p class="src"><a id="v:listFilesInside" class="def">listFilesInside</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>] <a href="src/System-Directory-Extra.html#listFilesInside" class="link">Source</a> <a href="#v:listFilesInside" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:listFilesRecursive">listFilesRecursive</a></code>, but with a predicate to decide where to recurse into.
   Typically directories starting with <code>.</code> would be ignored. The initial argument directory
   will have the test applied to it.</p><pre>listTest (listFilesInside $ return . not . isPrefixOf &quot;.&quot; . takeFileName)
    [&quot;bar.txt&quot;,&quot;foo&quot; &lt;/&gt; &quot;baz.txt&quot;,&quot;.foo&quot; &lt;/&gt; &quot;baz2.txt&quot;, &quot;zoo&quot;] [&quot;bar.txt&quot;,&quot;zoo&quot;,&quot;foo&quot; &lt;/&gt; &quot;baz.txt&quot;]
listTest (listFilesInside $ const $ return False) [&quot;bar.txt&quot;] []</pre></div></div><div class="top"><p class="src"><a id="v:listFilesRecursive" class="def">listFilesRecursive</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>] <a href="src/System-Directory-Extra.html#listFilesRecursive" class="link">Source</a> <a href="#v:listFilesRecursive" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:listFiles">listFiles</a></code>, but goes recursively through all subdirectories.</p><pre>listTest listFilesRecursive [&quot;bar.txt&quot;,&quot;zoo&quot;,&quot;foo&quot; &lt;/&gt; &quot;baz.txt&quot;] [&quot;bar.txt&quot;,&quot;zoo&quot;,&quot;foo&quot; &lt;/&gt; &quot;baz.txt&quot;]</pre></div></div><h1 id="g:12">System.Environment.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="System-Environment-Extra.html">System.Environment.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:getExecutablePath" class="def">getExecutablePath</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="#v:getExecutablePath" class="selflink">#</a></p><div class="doc"><p>Returns the absolute pathname of the current executable.</p><p>Note that for scripts and interactive sessions, this is the path to
 the interpreter (e.g. ghci.)</p><p><em>Since: 4.6.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:lookupEnv" class="def">lookupEnv</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>) <a href="#v:lookupEnv" class="selflink">#</a></p><div class="doc"><p>Return the value of the environment variable <code>var</code>, or <code>Nothing</code> if
 there is no such value.</p><p>For POSIX users, this is equivalent to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/unix-2.7.2.0/System-Posix-Env.html#v:getEnv">getEnv</a></code>.</p><p><em>Since: 4.6.0.0</em></p></div></div><h1 id="g:13">System.Info.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="System-Info-Extra.html">System.Info.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:isWindows" class="def">isWindows</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/System-Info-Extra.html#isWindows" class="link">Source</a> <a href="#v:isWindows" class="selflink">#</a></p><div class="doc"><p>Return <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:True">True</a></code> on Windows and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:False">False</a></code> otherwise. A runtime version of <code>#ifdef minw32_HOST_OS</code>.
   Equivalent to <code>os == &quot;mingw32&quot;</code>, but: more efficient; doesn't require typing an easily
   mistypeable string; actually asks about your OS not a library; doesn't bake in
   32bit assumptions that are already false. &lt;/rant&gt;</p><pre>isWindows == (os == &quot;mingw32&quot;)</pre></div></div><div class="top"><p class="src"><a id="v:isMac" class="def">isMac</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/System-Info-Extra.html#isMac" class="link">Source</a> <a href="#v:isMac" class="selflink">#</a></p><div class="doc"><p>Return <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:True">True</a></code> on Mac OS X and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:False">False</a></code> otherwise.</p></div></div><h1 id="g:14">System.IO.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="System-IO-Extra.html">System.IO.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:captureOutput" class="def">captureOutput</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>, a) <a href="src/System-IO-Extra.html#captureOutput" class="link">Source</a> <a href="#v:captureOutput" class="selflink">#</a></p><div class="doc"><p>Capture the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle-FD.html#v:stdout">stdout</a></code> and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle-FD.html#v:stderr">stderr</a></code> of a computation.</p><pre>captureOutput (print 1) == return (&quot;1\n&quot;,())</pre></div></div><div class="top"><p class="src"><a id="v:withBuffering" class="def">withBuffering</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle.html#t:Handle">Handle</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle.html#t:BufferMode">BufferMode</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/System-IO-Extra.html#withBuffering" class="link">Source</a> <a href="#v:withBuffering" class="selflink">#</a></p><div class="doc"><p>Execute an action with a custom <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle.html#t:BufferMode">BufferMode</a></code>, a wrapper around
   <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle.html#v:hSetBuffering">hSetBuffering</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:readFileEncoding" class="def">readFileEncoding</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Encoding-Types.html#t:TextEncoding">TextEncoding</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/System-IO-Extra.html#readFileEncoding" class="link">Source</a> <a href="#v:readFileEncoding" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#v:readFile">readFile</a></code>, but setting an encoding.</p></div></div><div class="top"><p class="src"><a id="v:readFileUTF8" class="def">readFileUTF8</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/System-IO-Extra.html#readFileUTF8" class="link">Source</a> <a href="#v:readFileUTF8" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#v:readFile">readFile</a></code>, but with the encoding <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Encoding.html#v:utf8">utf8</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:readFileBinary" class="def">readFileBinary</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/System-IO-Extra.html#readFileBinary" class="link">Source</a> <a href="#v:readFileBinary" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#v:readFile">readFile</a></code>, but for binary files.</p></div></div><div class="top"><p class="src"><a id="v:readFile-39-" class="def">readFile'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/System-IO-Extra.html#readFile%27" class="link">Source</a> <a href="#v:readFile-39-" class="selflink">#</a></p><div class="doc"><p>A strict version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#v:readFile">readFile</a></code>. When the string is produced, the entire
   file will have been read into memory and the file handle will have been closed.
   Closing the file handle does not rely on the garbage collector.</p><pre>\(filter isHexDigit -&gt; s) -&gt; fmap (== s) $ withTempFile $ \file -&gt; do writeFile file s; readFile' file</pre></div></div><div class="top"><p class="src"><a id="v:readFileEncoding-39-" class="def">readFileEncoding'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Encoding-Types.html#t:TextEncoding">TextEncoding</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/System-IO-Extra.html#readFileEncoding%27" class="link">Source</a> <a href="#v:readFileEncoding-39-" class="selflink">#</a></p><div class="doc"><p>A strict version of <code><a href="Extra.html#v:readFileEncoding">readFileEncoding</a></code>, see <code><a href="Extra.html#v:readFile-39-">readFile'</a></code> for details.</p></div></div><div class="top"><p class="src"><a id="v:readFileUTF8-39-" class="def">readFileUTF8'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/System-IO-Extra.html#readFileUTF8%27" class="link">Source</a> <a href="#v:readFileUTF8-39-" class="selflink">#</a></p><div class="doc"><p>A strict version of <code><a href="Extra.html#v:readFileUTF8">readFileUTF8</a></code>, see <code><a href="Extra.html#v:readFile-39-">readFile'</a></code> for details.</p></div></div><div class="top"><p class="src"><a id="v:readFileBinary-39-" class="def">readFileBinary'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/System-IO-Extra.html#readFileBinary%27" class="link">Source</a> <a href="#v:readFileBinary-39-" class="selflink">#</a></p><div class="doc"><p>A strict version of <code><a href="Extra.html#v:readFileBinary">readFileBinary</a></code>, see <code><a href="Extra.html#v:readFile-39-">readFile'</a></code> for details.</p></div></div><div class="top"><p class="src"><a id="v:writeFileEncoding" class="def">writeFileEncoding</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Encoding-Types.html#t:TextEncoding">TextEncoding</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/System-IO-Extra.html#writeFileEncoding" class="link">Source</a> <a href="#v:writeFileEncoding" class="selflink">#</a></p><div class="doc"><p>Write a file with a particular encoding.</p></div></div><div class="top"><p class="src"><a id="v:writeFileUTF8" class="def">writeFileUTF8</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/System-IO-Extra.html#writeFileUTF8" class="link">Source</a> <a href="#v:writeFileUTF8" class="selflink">#</a></p><div class="doc"><p>Write a file with the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Encoding.html#v:utf8">utf8</a></code> encoding.</p><pre>\s -&gt; withTempFile $ \file -&gt; do writeFileUTF8 file s; fmap (== s) $ readFileUTF8' file</pre></div></div><div class="top"><p class="src"><a id="v:writeFileBinary" class="def">writeFileBinary</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/System-IO-Extra.html#writeFileBinary" class="link">Source</a> <a href="#v:writeFileBinary" class="selflink">#</a></p><div class="doc"><p>Write a binary file.</p><pre>\s -&gt; withTempFile $ \file -&gt; do writeFileBinary file s; fmap (== s) $ readFileBinary' file</pre></div></div><div class="top"><p class="src"><a id="v:withTempFile" class="def">withTempFile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/System-IO-Extra.html#withTempFile" class="link">Source</a> <a href="#v:withTempFile" class="selflink">#</a></p><div class="doc"><p>Create a temporary file in the temporary directory. The file will be deleted
   after the action completes (provided the file is not still open).
   The <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a></code> will not have any file extension, will exist, and will be zero bytes long.
   If you require a file with a specific name, use <code><a href="Extra.html#v:withTempDir">withTempDir</a></code>.</p><pre>withTempFile doesFileExist == return True
(doesFileExist =&lt;&lt; withTempFile return) == return False
withTempFile readFile' == return &quot;&quot;</pre></div></div><div class="top"><p class="src"><a id="v:withTempDir" class="def">withTempDir</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/System-IO-Extra.html#withTempDir" class="link">Source</a> <a href="#v:withTempDir" class="selflink">#</a></p><div class="doc"><p>Create a temporary directory inside the system temporary directory.
   The directory will be deleted after the action completes.</p><pre>withTempDir doesDirectoryExist == return True
(doesDirectoryExist =&lt;&lt; withTempDir return) == return False
withTempDir listFiles == return []</pre></div></div><div class="top"><p class="src"><a id="v:newTempFile" class="def">newTempFile</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()) <a href="src/System-IO-Extra.html#newTempFile" class="link">Source</a> <a href="#v:newTempFile" class="selflink">#</a></p><div class="doc"><p>Provide a function to create a temporary file, and a way to delete a
   temporary file. Most users should use <code><a href="Extra.html#v:withTempFile">withTempFile</a></code> which
   combines these operations.</p></div></div><div class="top"><p class="src"><a id="v:newTempDir" class="def">newTempDir</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()) <a href="src/System-IO-Extra.html#newTempDir" class="link">Source</a> <a href="#v:newTempDir" class="selflink">#</a></p><div class="doc"><p>Provide a function to create a temporary directory, and a way to delete a
   temporary directory. Most users should use <code><a href="Extra.html#v:withTempDir">withTempDir</a></code> which
   combines these operations.</p></div></div><div class="top"><p class="src"><a id="v:fileEq" class="def">fileEq</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/System-IO-Extra.html#fileEq" class="link">Source</a> <a href="#v:fileEq" class="selflink">#</a></p><div class="doc"><p>Returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:True">True</a></code> if both files have the same content.
   Raises an error if either file is missing.</p><pre>fileEq &quot;does_not_exist1&quot; &quot;does_not_exist2&quot; == undefined
fileEq &quot;does_not_exist&quot; &quot;does_not_exist&quot; == undefined
withTempFile $ \f1 -&gt; fileEq &quot;does_not_exist&quot; f1 == undefined
withTempFile $ \f1 -&gt; withTempFile $ \f2 -&gt; fileEq f1 f2
withTempFile $ \f1 -&gt; withTempFile $ \f2 -&gt; writeFile f1 &quot;a&quot; &gt;&gt; writeFile f2 &quot;a&quot; &gt;&gt; fileEq f1 f2
withTempFile $ \f1 -&gt; withTempFile $ \f2 -&gt; writeFile f1 &quot;a&quot; &gt;&gt; writeFile f2 &quot;b&quot; &gt;&gt; notM (fileEq f1 f2)</pre></div></div><h1 id="g:15">System.Process.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="System-Process-Extra.html">System.Process.Extra</a></code>.</p></div><div class="top"><p class="src"><a id="v:system_" class="def">system_</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/System-Process-Extra.html#system_" class="link">Source</a> <a href="#v:system_" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/process-1.4.2.0/System-Process.html#v:system">system</a></code> that throws an error if the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-Exit.html#t:ExitCode">ExitCode</a></code> is not <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-Exit.html#v:ExitSuccess">ExitSuccess</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:systemOutput" class="def">systemOutput</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-Exit.html#t:ExitCode">ExitCode</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>) <a href="src/System-Process-Extra.html#systemOutput" class="link">Source</a> <a href="#v:systemOutput" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/process-1.4.2.0/System-Process.html#v:system">system</a></code> that also captures the output, both <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle-FD.html#v:stdout">stdout</a></code> and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle-FD.html#v:stderr">stderr</a></code>.
   Returns a pair of the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-Exit.html#t:ExitCode">ExitCode</a></code> and the output.</p></div></div><div class="top"><p class="src"><a id="v:systemOutput_" class="def">systemOutput_</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/System-Process-Extra.html#systemOutput_" class="link">Source</a> <a href="#v:systemOutput_" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/process-1.4.2.0/System-Process.html#v:system">system</a></code> that captures the output (both <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle-FD.html#v:stdout">stdout</a></code> and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle-FD.html#v:stderr">stderr</a></code>)
   and throws an error if the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-Exit.html#t:ExitCode">ExitCode</a></code> is not <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-Exit.html#v:ExitSuccess">ExitSuccess</a></code>.</p></div></div><h1 id="g:16">System.Time.Extra</h1><div class="doc"><p>Extra functions available in <code><a href="System-Time-Extra.html">System.Time.Extra</a></code>.</p></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Seconds" class="def">Seconds</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Double">Double</a> <a href="src/System-Time-Extra.html#Seconds" class="link">Source</a> <a href="#t:Seconds" class="selflink">#</a></p><div class="doc"><p>A type alias for seconds, which are stored as <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Double">Double</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:sleep" class="def">sleep</a> :: <a href="Extra.html#t:Seconds">Seconds</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/System-Time-Extra.html#sleep" class="link">Source</a> <a href="#v:sleep" class="selflink">#</a></p><div class="doc"><p>Sleep for a number of seconds.</p><pre>fmap (round . fst) (duration $ sleep 1) == return 1</pre></div></div><div class="top"><p class="src"><a id="v:timeout" class="def">timeout</a> :: <a href="Extra.html#t:Seconds">Seconds</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) <a href="src/System-Time-Extra.html#timeout" class="link">Source</a> <a href="#v:timeout" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-Timeout.html#v:timeout">timeout</a></code> that takes <code><a href="Extra.html#t:Seconds">Seconds</a></code> and never
   overflows the bounds of an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></code>. In addition, the bug that negative
   timeouts run for ever has been fixed.</p><pre>timeout (-3) (print 1) == return Nothing
timeout 0.1  (print 1) == fmap Just (print 1)
do (t, _) &lt;- duration $ timeout 0.1 $ sleep 1000; print t; return $ t &lt; 1
timeout 0.1  (sleep 2 &gt;&gt; print 1) == return Nothing</pre></div></div><div class="top"><p class="src"><a id="v:subtractTime" class="def">subtractTime</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> -&gt; <a href="Extra.html#t:Seconds">Seconds</a> <a href="src/System-Time-Extra.html#subtractTime" class="link">Source</a> <a href="#v:subtractTime" class="selflink">#</a></p><div class="doc"><p>Calculate the difference between two times in seconds.
   Usually the first time will be the end of an event, and the
   second time will be the beginning.</p><pre>\a b -&gt; a &gt; b ==&gt; subtractTime a b &gt; 0</pre></div></div><div class="top"><p class="src"><a id="v:showDuration" class="def">showDuration</a> :: <a href="Extra.html#t:Seconds">Seconds</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="src/System-Time-Extra.html#showDuration" class="link">Source</a> <a href="#v:showDuration" class="selflink">#</a></p><div class="doc"><p>Show a number of seconds, typically a duration, in a suitable manner with
   responable precision for a human.</p><pre>showDuration 3.435   == &quot;3.44s&quot;
showDuration 623.8   == &quot;10m24s&quot;
showDuration 62003.8 == &quot;17h13m&quot;
showDuration 1e8     == &quot;27777h47m&quot;</pre></div></div><div class="top"><p class="src"><a id="v:offsetTime" class="def">offsetTime</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="Extra.html#t:Seconds">Seconds</a>) <a href="src/System-Time-Extra.html#offsetTime" class="link">Source</a> <a href="#v:offsetTime" class="selflink">#</a></p><div class="doc"><p>Call once to start, then call repeatedly to get the elapsed time since the first
   call. Values will usually increase, unless the system clock is updated
   (if you need the guarantee, see <code><a href="Extra.html#v:offsetTimeIncrease">offsetTimeIncrease</a></code>).</p></div></div><div class="top"><p class="src"><a id="v:offsetTimeIncrease" class="def">offsetTimeIncrease</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="Extra.html#t:Seconds">Seconds</a>) <a href="src/System-Time-Extra.html#offsetTimeIncrease" class="link">Source</a> <a href="#v:offsetTimeIncrease" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Extra.html#v:offsetTime">offsetTime</a></code>, but results will never decrease (though they may stay the same).</p><pre>do f &lt;- offsetTimeIncrease; xs &lt;- replicateM 10 f; return $ xs == sort xs</pre></div></div><div class="top"><p class="src"><a id="v:duration" class="def">duration</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="Extra.html#t:Seconds">Seconds</a>, a) <a href="src/System-Time-Extra.html#duration" class="link">Source</a> <a href="#v:duration" class="selflink">#</a></p><div class="doc"><p>Record how long a computation takes in <code><a href="Extra.html#t:Seconds">Seconds</a></code>.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>