This file is indexed.

/usr/share/doc/libghc-iteratee-doc/html/Data-Iteratee-Exception.html is in libghc-iteratee-doc 0.8.9.4-2build1.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Data.Iteratee.Exception</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-Iteratee-Exception.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Iteratee-Exception.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">iteratee-0.8.9.4: Iteratee-based I/O</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Data.Iteratee.Exception</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Exception types
</a><ul><li><a href="#g:2">Enumerator exceptions
</a></li><li><a href="#g:3">Iteratee exceptions
</a></li></ul></li><li><a href="#g:4">Functions
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Monadic and General Iteratees:
 Messaging and exception handling.
</p><p>Iteratees use an internal exception handling mechanism that is parallel to
 that provided by <code><a href="Control.html#t:Exception">Exception</a></code>.  This allows the iteratee framework
 to handle its own exceptions outside <code>IO</code>.
</p><p>Iteratee exceptions are divided into two categories, <code><a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></code> and
 <code><a href="Data-Iteratee-Exception.html#t:EnumException">EnumException</a></code>.  <code>IterExceptions</code> are exceptions within an iteratee, and
 <code>EnumExceptions</code> are exceptions within an enumerator.
</p><p>Enumerators can be constructed to handle an <code><a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></code> with
 <code>Data.Iteratee.Iteratee.enumFromCallbackCatch</code>.  If the enumerator detects
 an <code>iteratee exception</code>, the enumerator calls the provided exception handler.
 The enumerator is then able to continue feeding data to the iteratee,
 provided the exception was successfully handled.  If the handler could
 not handle the exception, the <code><a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></code> is converted to an
 <code><a href="Data-Iteratee-Exception.html#t:EnumException">EnumException</a></code> and processing aborts.
</p><p>Exceptions can also be cleared by <code>Data.Iteratee.Iteratee.checkErr</code>,
 although in this case the iteratee continuation cannot be recovered.
</p><p>When viewed as Resumable Exceptions, iteratee exceptions provide a means
 for iteratees to send control messages to enumerators.  The <code>seek</code>
 implementation provides an example.  <code>Data.Iteratee.Iteratee.seek</code> stores
 the current iteratee continuation and throws a <code><a href="Data-Iteratee-Exception.html#t:SeekException">SeekException</a></code>, which
 inherits from <code><a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></code>.  <code>Data.Iteratee.IO.enumHandleRandom</code> is
 constructed with <code>enumFromCallbackCatch</code> and a handler that performs
 an <code>hSeek</code>.  Upon receiving the <code><a href="Data-Iteratee-Exception.html#t:SeekException">SeekException</a></code>, <code>enumHandleRandom</code> calls
 the handler, checks that it executed properly, and then continues with
 the stored continuation.
</p><p>As the exception hierarchy is open, users can extend it with custom
 exceptions and exception handlers to implement sophisticated messaging
 systems based upon resumable exceptions.
</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"><span class="keyword">data</span>  <a href="#t:IFException">IFException</a>  = <span class="keyword">forall</span> e . <a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> e =&gt; <a href="#v:IFException">IFException</a> e</li><li class="src short"><span class="keyword">class</span> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> e, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> e) =&gt; <a href="#t:Exception">Exception</a> e  <span class="keyword">where</span><ul class="subs"><li><a href="#v:toException">toException</a> :: e -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></li><li><a href="#v:fromException">fromException</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> e</li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:EnumException">EnumException</a>  = <span class="keyword">forall</span> e . <a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> e =&gt; <a href="#v:EnumException">EnumException</a> e</li><li class="src short"><span class="keyword">data</span>  <a href="#t:DivergentException">DivergentException</a>  = <a href="#v:DivergentException">DivergentException</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:EnumStringException">EnumStringException</a>  = <a href="#v:EnumStringException">EnumStringException</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:EnumUnhandledIterException">EnumUnhandledIterException</a>  = <a href="#v:EnumUnhandledIterException">EnumUnhandledIterException</a> <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></li><li class="src short"><span class="keyword">class</span> <a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> e =&gt; <a href="#t:IException">IException</a> e  <span class="keyword">where</span><ul class="subs"><li><a href="#v:toIterException">toIterException</a> :: e -&gt; <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></li><li><a href="#v:fromIterException">fromIterException</a> :: <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> e</li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:IterException">IterException</a>  = <span class="keyword">forall</span> e . <a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> e =&gt; <a href="#v:IterException">IterException</a> e</li><li class="src short"><span class="keyword">data</span>  <a href="#t:SeekException">SeekException</a>  = <a href="#v:SeekException">SeekException</a> <a href="Data-Iteratee-IO-Posix.html#t:FileOffset">FileOffset</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:EofException">EofException</a>  = <a href="#v:EofException">EofException</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:IterStringException">IterStringException</a>  = <a href="#v:IterStringException">IterStringException</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:enStrExc">enStrExc</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Data-Iteratee-Exception.html#t:EnumException">EnumException</a></li><li class="src short"><a href="#v:iterStrExc">iterStrExc</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></li><li class="src short"><a href="#v:wrapIterExc">wrapIterExc</a> :: <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a> -&gt; <a href="Data-Iteratee-Exception.html#t:EnumException">EnumException</a></li><li class="src short"><a href="#v:iterExceptionToException">iterExceptionToException</a> :: <a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> e =&gt; e -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></li><li class="src short"><a href="#v:iterExceptionFromException">iterExceptionFromException</a> :: <a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> e =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> e</li></ul></div><div id="interface"><h1 id="g:1">Exception types
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:IFException" class="def">IFException</a>  <a href="src/Data-Iteratee-Exception.html#IFException" class="link">Source</a></p><div class="doc"><p>Root of the Iteratee exception hierarchy.  <code>IFException</code> derives from
 <code>Control.Exception.SomeException</code>.  <code><a href="Data-Iteratee-Exception.html#t:EnumException">EnumException</a></code>, <code><a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></code>,
 and all inheritants are descendents of <code><a href="Data-Iteratee-Exception.html#t:IFException">IFException</a></code>.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><span class="keyword">forall</span> e . <a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> e =&gt; <a name="v:IFException" class="def">IFException</a> e</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:IFException" class="caption collapser" onclick="toggleSection('i:IFException')">Instances</p><div id="section.i:IFException" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Iteratee-Exception.html#t:IFException">IFException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Iteratee-Exception.html#t:IFException">IFException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:IFException">IFException</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> e, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> e) =&gt; <a name="t:Exception" class="def">Exception</a> e  <span class="keyword">where</span></p><div class="doc"><p>Any type that you wish to throw or catch as an exception must be an
instance of the <code>Exception</code> class. The simplest case is a new exception
type directly below the root:
</p><pre> data MyException = ThisException | ThatException
     deriving (Show, Typeable)

 instance Exception MyException
</pre><p>The default method definitions in the <code>Exception</code> class do what we need
in this case. You can now throw and catch <code>ThisException</code> and
<code>ThatException</code> as exceptions:
</p><pre>
*Main&gt; throw ThisException `catch` \e -&gt; putStrLn (&quot;Caught &quot; ++ show (e :: MyException))
Caught ThisException
</pre><p>In more complicated examples, you may wish to define a whole hierarchy
of exceptions:
</p><pre> ---------------------------------------------------------------------
 -- Make the root exception type for all the exceptions in a compiler

 data SomeCompilerException = forall e . Exception e =&gt; SomeCompilerException e
     deriving Typeable

 instance Show SomeCompilerException where
     show (SomeCompilerException e) = show e

 instance Exception SomeCompilerException

 compilerExceptionToException :: Exception e =&gt; e -&gt; SomeException
 compilerExceptionToException = toException . SomeCompilerException

 compilerExceptionFromException :: Exception e =&gt; SomeException -&gt; Maybe e
 compilerExceptionFromException x = do
     SomeCompilerException a &lt;- fromException x
     cast a

 ---------------------------------------------------------------------
 -- Make a subhierarchy for exceptions in the frontend of the compiler

 data SomeFrontendException = forall e . Exception e =&gt; SomeFrontendException e
     deriving Typeable

 instance Show SomeFrontendException where
     show (SomeFrontendException e) = show e

 instance Exception SomeFrontendException where
     toException = compilerExceptionToException
     fromException = compilerExceptionFromException

 frontendExceptionToException :: Exception e =&gt; e -&gt; SomeException
 frontendExceptionToException = toException . SomeFrontendException

 frontendExceptionFromException :: Exception e =&gt; SomeException -&gt; Maybe e
 frontendExceptionFromException x = do
     SomeFrontendException a &lt;- fromException x
     cast a

 ---------------------------------------------------------------------
 -- Make an exception type for a particular frontend compiler exception

 data MismatchedParentheses = MismatchedParentheses
     deriving (Typeable, Show)

 instance Exception MismatchedParentheses where
     toException   = frontendExceptionToException
     fromException = frontendExceptionFromException
</pre><p>We can now catch a <code>MismatchedParentheses</code> exception as
<code>MismatchedParentheses</code>, <code>SomeFrontendException</code> or
<code>SomeCompilerException</code>, but not other types, e.g. <code>IOException</code>:
</p><pre>
*Main&gt; throw MismatchedParentheses <code>catch</code> e -&gt; putStrLn (&quot;Caught &quot; ++ show (e :: MismatchedParentheses))
Caught MismatchedParentheses
*Main&gt; throw MismatchedParentheses <code>catch</code> e -&gt; putStrLn (&quot;Caught &quot; ++ show (e :: SomeFrontendException))
Caught MismatchedParentheses
*Main&gt; throw MismatchedParentheses <code>catch</code> e -&gt; putStrLn (&quot;Caught &quot; ++ show (e :: SomeCompilerException))
Caught MismatchedParentheses
*Main&gt; throw MismatchedParentheses <code>catch</code> e -&gt; putStrLn (&quot;Caught &quot; ++ show (e :: IOException))
*** Exception: MismatchedParentheses
</pre></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:toException" class="def">toException</a> :: e -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></p><p class="src"><a name="v:fromException" class="def">fromException</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> e</p></div><div class="subs instances"><p id="control.i:Exception" class="caption collapser" onclick="toggleSection('i:Exception')">Instances</p><div id="section.i:Exception" class="show"><table><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:BlockedIndefinitelyOnMVar">BlockedIndefinitelyOnMVar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:BlockedIndefinitelyOnSTM">BlockedIndefinitelyOnSTM</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Deadlock">Deadlock</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:AssertionFailed">AssertionFailed</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:AsyncException">AsyncException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArrayException">ArrayException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Exit.html#t:ExitCode">ExitCode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:IOException">IOException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ErrorCall">ErrorCall</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:IterStringException">IterStringException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:EofException">EofException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:SeekException">SeekException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:EnumUnhandledIterException">EnumUnhandledIterException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:EnumStringException">EnumStringException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:DivergentException">DivergentException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:EnumException">EnumException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:IFException">IFException</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h2 id="g:2">Enumerator exceptions
</h2><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:EnumException" class="def">EnumException</a>  <a href="src/Data-Iteratee-Exception.html#EnumException" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><span class="keyword">forall</span> e . <a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> e =&gt; <a name="v:EnumException" class="def">EnumException</a> e</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:EnumException" class="caption collapser" onclick="toggleSection('i:EnumException')">Instances</p><div id="section.i:EnumException" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Iteratee-Exception.html#t:EnumException">EnumException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Iteratee-Exception.html#t:EnumException">EnumException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:EnumException">EnumException</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:DivergentException" class="def">DivergentException</a>  <a href="src/Data-Iteratee-Exception.html#DivergentException" class="link">Source</a></p><div class="doc"><p>The <code>iteratee</code> diverged upon receiving <code>EOF</code>.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:DivergentException" class="def">DivergentException</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:DivergentException" class="caption collapser" onclick="toggleSection('i:DivergentException')">Instances</p><div id="section.i:DivergentException" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Iteratee-Exception.html#t:DivergentException">DivergentException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Iteratee-Exception.html#t:DivergentException">DivergentException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:DivergentException">DivergentException</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:EnumStringException" class="def">EnumStringException</a>  <a href="src/Data-Iteratee-Exception.html#EnumStringException" class="link">Source</a></p><div class="doc"><p>Create an enumerator exception from a <code>String</code>.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:EnumStringException" class="def">EnumStringException</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:EnumStringException" class="caption collapser" onclick="toggleSection('i:EnumStringException')">Instances</p><div id="section.i:EnumStringException" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Iteratee-Exception.html#t:EnumStringException">EnumStringException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Iteratee-Exception.html#t:EnumStringException">EnumStringException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:EnumStringException">EnumStringException</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:EnumUnhandledIterException" class="def">EnumUnhandledIterException</a>  <a href="src/Data-Iteratee-Exception.html#EnumUnhandledIterException" class="link">Source</a></p><div class="doc"><p>The enumerator received an <code><a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></code> it could not handle.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:EnumUnhandledIterException" class="def">EnumUnhandledIterException</a> <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:EnumUnhandledIterException" class="caption collapser" onclick="toggleSection('i:EnumUnhandledIterException')">Instances</p><div id="section.i:EnumUnhandledIterException" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Iteratee-Exception.html#t:EnumUnhandledIterException">EnumUnhandledIterException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Iteratee-Exception.html#t:EnumUnhandledIterException">EnumUnhandledIterException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:EnumUnhandledIterException">EnumUnhandledIterException</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h2 id="g:3">Iteratee exceptions
</h2><div class="top"><p class="src"><span class="keyword">class</span> <a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> e =&gt; <a name="t:IException" class="def">IException</a> e  <span class="keyword">where</span><a href="src/Data-Iteratee-Exception.html#IException" class="link">Source</a></p><div class="doc"><p>A class for <code>iteratee exceptions</code>.  Only inheritants of <code>IterException</code>
 should be instances of this class.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:toIterException" class="def">toIterException</a> :: e -&gt; <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a><a href="src/Data-Iteratee-Exception.html#toIterException" class="link">Source</a></p><p class="src"><a name="v:fromIterException" class="def">fromIterException</a> :: <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> e<a href="src/Data-Iteratee-Exception.html#fromIterException" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:IException" class="caption collapser" onclick="toggleSection('i:IException')">Instances</p><div id="section.i:IException" class="show"><table><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:IException">IException</a> <a href="Data-Iteratee-Exception.html#t:IterStringException">IterStringException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:IException">IException</a> <a href="Data-Iteratee-Exception.html#t:EofException">EofException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:IException">IException</a> <a href="Data-Iteratee-Exception.html#t:SeekException">SeekException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:IException">IException</a> <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:IterException" class="def">IterException</a>  <a href="src/Data-Iteratee-Exception.html#IterException" class="link">Source</a></p><div class="doc"><p>Root of iteratee exceptions.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><span class="keyword">forall</span> e . <a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> e =&gt; <a name="v:IterException" class="def">IterException</a> e</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:IterException" class="caption collapser" onclick="toggleSection('i:IterException')">Instances</p><div id="section.i:IterException" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:IException">IException</a> <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:SeekException" class="def">SeekException</a>  <a href="src/Data-Iteratee-Exception.html#SeekException" class="link">Source</a></p><div class="doc"><p>A seek request within an <code>Iteratee</code>.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:SeekException" class="def">SeekException</a> <a href="Data-Iteratee-IO-Posix.html#t:FileOffset">FileOffset</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:SeekException" class="caption collapser" onclick="toggleSection('i:SeekException')">Instances</p><div id="section.i:SeekException" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Iteratee-Exception.html#t:SeekException">SeekException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Iteratee-Exception.html#t:SeekException">SeekException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:SeekException">SeekException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:IException">IException</a> <a href="Data-Iteratee-Exception.html#t:SeekException">SeekException</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:EofException" class="def">EofException</a>  <a href="src/Data-Iteratee-Exception.html#EofException" class="link">Source</a></p><div class="doc"><p>The <code>Iteratee</code> needs more data but received <code>EOF</code>.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:EofException" class="def">EofException</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:EofException" class="caption collapser" onclick="toggleSection('i:EofException')">Instances</p><div id="section.i:EofException" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Iteratee-Exception.html#t:EofException">EofException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Iteratee-Exception.html#t:EofException">EofException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:EofException">EofException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:IException">IException</a> <a href="Data-Iteratee-Exception.html#t:EofException">EofException</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:IterStringException" class="def">IterStringException</a>  <a href="src/Data-Iteratee-Exception.html#IterStringException" class="link">Source</a></p><div class="doc"><p>An <code>Iteratee exception</code> specified by a <code>String</code>.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:IterStringException" class="def">IterStringException</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:IterStringException" class="caption collapser" onclick="toggleSection('i:IterStringException')">Instances</p><div id="section.i:IterStringException" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Iteratee-Exception.html#t:IterStringException">IterStringException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Iteratee-Exception.html#t:IterStringException">IterStringException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> <a href="Data-Iteratee-Exception.html#t:IterStringException">IterStringException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Iteratee-Exception.html#t:IException">IException</a> <a href="Data-Iteratee-Exception.html#t:IterStringException">IterStringException</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:4">Functions
</h1><div class="top"><p class="src"><a name="v:enStrExc" class="def">enStrExc</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Data-Iteratee-Exception.html#t:EnumException">EnumException</a><a href="src/Data-Iteratee-Exception.html#enStrExc" class="link">Source</a></p><div class="doc"><p>Create an <code><a href="Data-Iteratee-Exception.html#t:EnumException">EnumException</a></code> from a string.
</p></div></div><div class="top"><p class="src"><a name="v:iterStrExc" class="def">iterStrExc</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a><a href="src/Data-Iteratee-Exception.html#iterStrExc" class="link">Source</a></p><div class="doc"><p>Create an <code>iteratee exception</code> from a string.
 This convenience function wraps <code><a href="Data-Iteratee-Exception.html#t:IterStringException">IterStringException</a></code> and <code><a href="Data-Iteratee-Exception.html#v:toException">toException</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:wrapIterExc" class="def">wrapIterExc</a> :: <a href="Data-Iteratee-Exception.html#t:IterException">IterException</a> -&gt; <a href="Data-Iteratee-Exception.html#t:EnumException">EnumException</a><a href="src/Data-Iteratee-Exception.html#wrapIterExc" class="link">Source</a></p><div class="doc"><p>Convert an <code><a href="Data-Iteratee-Exception.html#t:IterException">IterException</a></code> to an <code><a href="Data-Iteratee-Exception.html#t:EnumException">EnumException</a></code>.  Meant to be used
 within an <code>Enumerator</code> to signify that it could not handle the
 <code>IterException</code>.
</p></div></div><div class="top"><p class="src"><a name="v:iterExceptionToException" class="def">iterExceptionToException</a> :: <a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> e =&gt; e -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a><a href="src/Data-Iteratee-Exception.html#iterExceptionToException" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:iterExceptionFromException" class="def">iterExceptionFromException</a> :: <a href="Data-Iteratee-Exception.html#t:Exception">Exception</a> e =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> e<a href="src/Data-Iteratee-Exception.html#iterExceptionFromException" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>