/usr/share/doc/libghc-lens-doc/html/Control-Exception-Lens.html is in libghc-lens-doc 3.10-2.
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 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | <!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>Control.Exception.Lens</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_Control-Exception-Lens.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Exception-Lens.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">lens-3.10: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Control.Exception</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett <ekmett@gmail.com></td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Exception.Lens</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Handling
</a></li><li><a href="#g:2">Trying
</a></li><li><a href="#g:3">Throwing
</a></li><li><a href="#g:4">Exceptions
</a></li><li><a href="#g:5">Exception Handlers
</a><ul><li><a href="#g:6">IOExceptions
</a></li><li><a href="#g:7">Arithmetic Exceptions
</a></li><li><a href="#g:8">Array Exceptions
</a></li><li><a href="#g:9">Assertion Failed
</a></li><li><a href="#g:10">Async Exceptions
</a></li><li><a href="#g:11">Non-Termination
</a></li><li><a href="#g:12">Nested Atomically
</a></li><li><a href="#g:13">Blocked Indefinitely
</a><ul><li><a href="#g:14">on MVar
</a></li><li><a href="#g:15">on STM
</a></li></ul></li><li><a href="#g:16">Deadlock
</a></li><li><a href="#g:17">No Such Method
</a></li><li><a href="#g:18">Pattern Match Failure
</a></li><li><a href="#g:19">Record
</a></li><li><a href="#g:20">Error Call
</a></li></ul></li><li><a href="#g:21">Handling Exceptions
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p><code>Control.Exception</code> provides an example of a large open hierarchy
that we can model with prisms and isomorphisms.
</p><p>Additional combinators for working with <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:IOException">IOException</a></code> results can
be found in <a href="System-IO-Error-Lens.html">System.IO.Error.Lens</a>.
</p><p>The combinators in this module have been generalized to work with
<code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> instead of just <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code>. This enables them to be used
more easily in <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> transformer stacks.
</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:catching">catching</a> :: <a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a -> m r -> (a -> m r) -> m r</li><li class="src short"><a href="#v:catching_">catching_</a> :: <a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a -> m r -> m r -> m r</li><li class="src short"><a href="#v:handling">handling</a> :: <a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a -> (a -> m r) -> m r -> m r</li><li class="src short"><a href="#v:handling_">handling_</a> :: <a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a -> m r -> m r -> m r</li><li class="src short"><a href="#v:trying">trying</a> :: <a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a -> m r -> m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> a r)</li><li class="src short"><a href="#v:throwing">throwing</a> :: <a href="Control-Lens-Review.html#t:AReview">AReview</a> s <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a b -> b -> r</li><li class="src short"><a href="#v:throwingM">throwingM</a> :: <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="Control-Lens-Review.html#t:AReview">AReview</a> s <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a b -> b -> m r</li><li class="src short"><a href="#v:throwingTo">throwingTo</a> :: <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Concurrent.html#t:ThreadId">ThreadId</a> -> <a href="Control-Lens-Review.html#t:AReview">AReview</a> s <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a b -> b -> m ()</li><li class="src short"><a href="#v:exception">exception</a> :: <a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a> a => <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a</li><li class="src short"><span class="keyword">class</span> <a href="#t:Handleable">Handleable</a> e m h | h -> e m <span class="keyword">where</span><ul class="subs"><li><a href="#v:handler">handler</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) e a -> (a -> m r) -> h r</li><li><a href="#v:handler_">handler_</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) e a -> m r -> h r</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:AsIOException">AsIOException</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_IOException">_IOException</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:IOException">IOException</a></li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:AsArithException">AsArithException</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_ArithException">_ArithException</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></li></ul></li><li class="src short"><a href="#v:_Overflow">_Overflow</a> :: (<a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li><li class="src short"><a href="#v:_Underflow">_Underflow</a> :: (<a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li><li class="src short"><a href="#v:_LossOfPrecision">_LossOfPrecision</a> :: (<a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li><li class="src short"><a href="#v:_DivideByZero">_DivideByZero</a> :: (<a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li><li class="src short"><a href="#v:_Denormal">_Denormal</a> :: (<a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li><li class="src short"><a href="#v:_RatioZeroDenominator">_RatioZeroDenominator</a> :: (<a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li><li class="src short"><span class="keyword">class</span> <a href="#t:AsArrayException">AsArrayException</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_ArrayException">_ArrayException</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArrayException">ArrayException</a></li></ul></li><li class="src short"><a href="#v:_IndexOutOfBounds">_IndexOutOfBounds</a> :: (<a href="Control-Exception-Lens.html#t:AsArrayException">AsArrayException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <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:_UndefinedElement">_UndefinedElement</a> :: (<a href="Control-Exception-Lens.html#t:AsArrayException">AsArrayException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <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">class</span> <a href="#t:AsAssertionFailed">AsAssertionFailed</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_AssertionFailed">_AssertionFailed</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:AsAsyncException">AsAsyncException</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_AsyncException">_AsyncException</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:AsyncException">AsyncException</a></li></ul></li><li class="src short"><a href="#v:_StackOverflow">_StackOverflow</a> :: (<a href="Control-Exception-Lens.html#t:AsAsyncException">AsAsyncException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li><li class="src short"><a href="#v:_HeapOverflow">_HeapOverflow</a> :: (<a href="Control-Exception-Lens.html#t:AsAsyncException">AsAsyncException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li><li class="src short"><a href="#v:_ThreadKilled">_ThreadKilled</a> :: (<a href="Control-Exception-Lens.html#t:AsAsyncException">AsAsyncException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li><li class="src short"><a href="#v:_UserInterrupt">_UserInterrupt</a> :: (<a href="Control-Exception-Lens.html#t:AsAsyncException">AsAsyncException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li><li class="src short"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="#t:AsNonTermination">AsNonTermination</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_NonTermination">_NonTermination</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="#t:AsNestedAtomically">AsNestedAtomically</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_NestedAtomically">_NestedAtomically</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="#t:AsBlockedIndefinitelyOnMVar">AsBlockedIndefinitelyOnMVar</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_BlockedIndefinitelyOnMVar">_BlockedIndefinitelyOnMVar</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="#t:AsBlockedIndefinitelyOnSTM">AsBlockedIndefinitelyOnSTM</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_BlockedIndefinitelyOnSTM">_BlockedIndefinitelyOnSTM</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="#t:AsDeadlock">AsDeadlock</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_Deadlock">_Deadlock</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="#t:AsNoMethodError">AsNoMethodError</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_NoMethodError">_NoMethodError</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="#t:AsPatternMatchFail">AsPatternMatchFail</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_PatternMatchFail">_PatternMatchFail</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="#t:AsRecConError">AsRecConError</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_RecConError">_RecConError</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="#t:AsRecSelError">AsRecSelError</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_RecSelError">_RecSelError</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="#t:AsRecUpdError">AsRecUpdError</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_RecUpdError">_RecUpdError</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="#t:AsErrorCall">AsErrorCall</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_ErrorCall">_ErrorCall</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="#t:AsHandlingException">AsHandlingException</a> p f t <span class="keyword">where</span><ul class="subs"><li><a href="#v:_HandlingException">_HandlingException</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()</li></ul></li></ul></div><div id="interface"><h1 id="g:1">Handling
</h1><div class="top"><p class="src"><a name="v:catching" class="def">catching</a> :: <a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a -> m r -> (a -> m r) -> m r<a href="src/Control-Exception-Lens.html#catching" class="link">Source</a></p><div class="doc"><p>Catch exceptions that match a given <code><a href="Control-Lens-Type.html#t:Prism">Prism</a></code> (or any <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code>, really).
</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>catching _AssertionFailed (assert False (return "uncaught")) $ \ _ -> return "caught"
</code></strong>"caught"
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:catching">catching</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> (a -> m r) -> m r
<code><a href="Control-Exception-Lens.html#v:catching">catching</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Lens-39-">Lens'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> (a -> m r) -> m r
<code><a href="Control-Exception-Lens.html#v:catching">catching</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Traversal-39-">Traversal'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> (a -> m r) -> m r
<code><a href="Control-Exception-Lens.html#v:catching">catching</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> (a -> m r) -> m r
<code><a href="Control-Exception-Lens.html#v:catching">catching</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> (a -> m r) -> m r
<code><a href="Control-Exception-Lens.html#v:catching">catching</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> (a -> m r) -> m r
</pre></div></div><div class="top"><p class="src"><a name="v:catching_" class="def">catching_</a> :: <a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a -> m r -> m r -> m r<a href="src/Control-Exception-Lens.html#catching_" class="link">Source</a></p><div class="doc"><p>Catch exceptions that match a given <code><a href="Control-Lens-Type.html#t:Prism">Prism</a></code> (or any <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code>), discarding
the information about the match. This is particuarly useful when you have
a <code><code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> e ()</code> where the result of the <code><a href="Control-Lens-Type.html#t:Prism">Prism</a></code> or <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> isn't
particularly valuable, just the fact that it matches.
</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>catching_ _AssertionFailed (assert False (return "uncaught")) $ return "caught"
</code></strong>"caught"
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:catching_">catching_</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:catching_">catching_</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Lens-39-">Lens'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:catching_">catching_</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Traversal-39-">Traversal'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:catching_">catching_</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:catching_">catching_</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:catching_">catching_</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m r -> m r
</pre></div></div><div class="top"><p class="src"><a name="v:handling" class="def">handling</a> :: <a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a -> (a -> m r) -> m r -> m r<a href="src/Control-Exception-Lens.html#handling" class="link">Source</a></p><div class="doc"><p>A version of <code><a href="Control-Exception-Lens.html#v:catching">catching</a></code> with the arguments swapped around; useful in
situations where the code for the handler is shorter.
</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>handling _NonTermination (\_ -> return "caught") $ throwIO NonTermination
</code></strong>"caught"
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:handling">handling</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> m r) -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:handling">handling</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Lens-39-">Lens'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> m r) -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:handling">handling</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Traversal-39-">Traversal'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> m r) -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:handling">handling</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> m r) -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:handling">handling</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> m r) -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:handling">handling</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> m r) -> m r -> m r
</pre></div></div><div class="top"><p class="src"><a name="v:handling_" class="def">handling_</a> :: <a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a -> m r -> m r -> m r<a href="src/Control-Exception-Lens.html#handling_" class="link">Source</a></p><div class="doc"><p>A version of <code><a href="Control-Exception-Lens.html#v:catching_">catching_</a></code> with the arguments swapped around; useful in
situations where the code for the handler is shorter.
</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>handling_ _NonTermination (return "caught") $ throwIO NonTermination
</code></strong>"caught"
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:handling_">handling_</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:handling_">handling_</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Lens-39-">Lens'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:handling_">handling_</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Traversal-39-">Traversal'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:handling_">handling_</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:handling_">handling_</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m r -> m r
<code><a href="Control-Exception-Lens.html#v:handling_">handling_</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m r -> m r
</pre></div></div><h1 id="g:2">Trying
</h1><div class="top"><p class="src"><a name="v:trying" class="def">trying</a> :: <a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a -> m r -> m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> a r)<a href="src/Control-Exception-Lens.html#trying" class="link">Source</a></p><div class="doc"><p>A variant of <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:try">try</a></code> that takes a <code><a href="Control-Lens-Type.html#t:Prism">Prism</a></code> (or any <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code>) to select which
exceptions are caught (c.f. <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:tryJust">tryJust</a></code>, <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:catchJust">catchJust</a></code>). If the
<code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> does not match the predicate, it is re-thrown.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:trying">trying</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m (<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a></code> a r)
<code><a href="Control-Exception-Lens.html#v:trying">trying</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Lens-39-">Lens'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m (<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a></code> a r)
<code><a href="Control-Exception-Lens.html#v:trying">trying</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Traversal-39-">Traversal'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m (<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a></code> a r)
<code><a href="Control-Exception-Lens.html#v:trying">trying</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m (<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a></code> a r)
<code><a href="Control-Exception-Lens.html#v:trying">trying</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m (<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a></code> a r)
<code><a href="Control-Exception-Lens.html#v:trying">trying</a></code> :: <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> m (<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a></code> a r)
</pre></div></div><h1 id="g:3">Throwing
</h1><div class="top"><p class="src"><a name="v:throwing" class="def">throwing</a> :: <a href="Control-Lens-Review.html#t:AReview">AReview</a> s <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a b -> b -> r<a href="src/Control-Exception-Lens.html#throwing" class="link">Source</a></p><div class="doc"><p>Throw an <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> described by a <code><a href="Control-Lens-Type.html#t:Prism">Prism</a></code>. Exceptions may be thrown from
purely functional code, but may only be caught within the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code>.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:throwing">throwing</a></code> l ≡ <code><a href="Control-Lens-Review.html#v:reviews">reviews</a></code> l <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#v:throw">throw</a></code>
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:throwing">throwing</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> t -> t -> r
<code><a href="Control-Exception-Lens.html#v:throwing">throwing</a></code> :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> t -> t -> r
</pre></div></div><div class="top"><p class="src"><a name="v:throwingM" class="def">throwingM</a> :: <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="Control-Lens-Review.html#t:AReview">AReview</a> s <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a b -> b -> m r<a href="src/Control-Exception-Lens.html#throwingM" class="link">Source</a></p><div class="doc"><p>A variant of <code><a href="Control-Exception-Lens.html#v:throwing">throwing</a></code> that can only be used within the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code>
(or any other <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> instance) to throw an <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> described
by a <code><a href="Control-Lens-Type.html#t:Prism">Prism</a></code>.
</p><p>Although <code><a href="Control-Exception-Lens.html#v:throwingM">throwingM</a></code> has a type that is a specialization of the type of
<code><a href="Control-Exception-Lens.html#v:throwing">throwing</a></code>, the two functions are subtly different:
</p><pre>
<code><a href="Control-Exception-Lens.html#v:throwing">throwing</a></code> l e `seq` x ≡ <code><a href="Control-Exception-Lens.html#v:throwing">throwing</a></code> e
<code><a href="Control-Exception-Lens.html#v:throwingM">throwingM</a></code> l e `seq` x ≡ x
</pre><p>The first example will cause the <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> <code>e</code> to be raised, whereas the
second one won't. In fact, <code><a href="Control-Exception-Lens.html#v:throwingM">throwingM</a></code> will only cause an <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> to
be raised when it is used within the <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:MonadCatchIO">MonadCatchIO</a></code> instance. The <code><a href="Control-Exception-Lens.html#v:throwingM">throwingM</a></code>
variant should be used in preference to <code><a href="Control-Exception-Lens.html#v:throwing">throwing</a></code> to raise an <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code>
within the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> because it guarantees ordering with respect to other
monadic operations, whereas <code><a href="Control-Exception-Lens.html#v:throwing">throwing</a></code> does not.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:throwingM">throwingM</a></code> l ≡ <code><a href="Control-Lens-Review.html#v:reviews">reviews</a></code> l <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#v:throw">throw</a></code>
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:throwingM">throwingM</a></code> :: <code><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> t -> t -> m r
<code><a href="Control-Exception-Lens.html#v:throwingM">throwingM</a></code> :: <code><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a></code> m => <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> t -> t -> m r
</pre></div></div><div class="top"><p class="src"><a name="v:throwingTo" class="def">throwingTo</a> :: <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Concurrent.html#t:ThreadId">ThreadId</a> -> <a href="Control-Lens-Review.html#t:AReview">AReview</a> s <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a b -> b -> m ()<a href="src/Control-Exception-Lens.html#throwingTo" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Exception-Lens.html#v:throwingTo">throwingTo</a></code> raises an <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> specified by a <code><a href="Control-Lens-Type.html#t:Prism">Prism</a></code> in the target thread.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:throwingTo">throwingTo</a></code> thread l ≡ <code><a href="Control-Lens-Review.html#v:reviews">reviews</a></code> l (<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#v:throwTo">throwTo</a></code> thread)
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:throwingTo">throwingTo</a></code> :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Concurrent.html#t:ThreadId">ThreadId</a></code> -> <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> t -> t -> m a
<code><a href="Control-Exception-Lens.html#v:throwingTo">throwingTo</a></code> :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Concurrent.html#t:ThreadId">ThreadId</a></code> -> <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> t -> t -> m a
</pre></div></div><h1 id="g:4">Exceptions
</h1><div class="top"><p class="src"><a name="v:exception" class="def">exception</a> :: <a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a> a => <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> a<a href="src/Control-Exception-Lens.html#exception" class="link">Source</a></p><div class="doc"><p>Traverse the strongly typed <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> contained in <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> where the type of your function matches
the desired <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code>.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:exception">exception</a></code> :: (<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a></code> f, <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> a)
=> (a -> f a) -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> -> f <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code>
</pre></div></div><h1 id="g:5">Exception Handlers
</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Handleable" class="def">Handleable</a> e m h | h -> e m <span class="keyword">where</span><a href="src/Control-Lens-Internal-Exception.html#Handleable" class="link">Source</a></p><div class="doc"><p>Both <code>MonadCatchIO-transformers</code> and <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html">Control.Exception</a> provide a <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#v:Handler">Handler</a></code> type.
</p><p>This lets us write combinators to build handlers that are agnostic about the choice of
which of these they use.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:handler" class="def">handler</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) e a -> (a -> m r) -> h r<a href="src/Control-Lens-Internal-Exception.html#handler" class="link">Source</a></p><div class="doc"><p>This builds a <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#v:Handler">Handler</a></code> for just the targets of a given <code><a href="Control-Lens-Type.html#t:Prism">Prism</a></code> (or any <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code>, really).
</p><pre>
<code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#v:catches">catches</a></code> ... [ <code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> <code><a href="Control-Exception-Lens.html#t:_AssertionFailed">_AssertionFailed</a></code> (s -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#v:print">print</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:-36-">$</a></code> "Assertion Failed\n" <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-List.html#v:-43--43-">++</a></code> s)
, <code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> <code><a href="Control-Exception-Lens.html#t:_ErrorCall">_ErrorCall</a></code> (s -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#v:print">print</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:-36-">$</a></code> "Error\n" <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-List.html#v:-43--43-">++</a></code> s)
]
</pre><p>This works ith both the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:Handler">Handler</a></code> type provided by <code>Control.Exception</code>:
</p><pre>
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> r) -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:Handler">Handler</a></code> r
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> r) -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:Handler">Handler</a></code> r
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> r) -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:Handler">Handler</a></code> r
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> r) -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:Handler">Handler</a></code> r
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Traversal.html#t:Traversal-39-">Traversal'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> r) -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:Handler">Handler</a></code> r
</pre><p>and with the <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Handler">Handler</a></code> type provided by <code>Control.Monad.CatchIO</code>:
</p><pre>
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> m r) -> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Handler">Handler</a></code> m r
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> m r) -> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Handler">Handler</a></code> m r
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> m r) -> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Handler">Handler</a></code> m r
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> m r) -> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Handler">Handler</a></code> m r
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Traversal.html#t:Traversal-39-">Traversal'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> (a -> m r) -> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Handler">Handler</a></code> m r
</pre><p>and with the <code><a href="Control-Monad-Error-Lens.html#t:Handler">Handler</a></code> type provided by <code>Control.Monad.Error.Lens</code>:
</p><pre>
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> e a -> (a -> m r) -> <code><a href="Control-Monad-Error-Lens.html#t:Handler">Handler</a></code> e m r
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> e a -> (a -> m r) -> <code><a href="Control-Monad-Error-Lens.html#t:Handler">Handler</a></code> e m r
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a></code> e a -> (a -> m r) -> <code><a href="Control-Monad-Error-Lens.html#t:Handler">Handler</a></code> e m r
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> e a -> (a -> m r) -> <code><a href="Control-Monad-Error-Lens.html#t:Handler">Handler</a></code> e m r
<code><a href="Control-Exception-Lens.html#v:handler">handler</a></code> :: <code><a href="Control-Lens-Traversal.html#t:Traversal-39-">Traversal'</a></code> e a -> (a -> m r) -> <code><a href="Control-Monad-Error-Lens.html#t:Handler">Handler</a></code> e m r
</pre></div><p class="src"><a name="v:handler_" class="def">handler_</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:First">First</a> a) e a -> m r -> h r<a href="src/Control-Lens-Internal-Exception.html#handler_" class="link">Source</a></p><div class="doc"><p>This builds a <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#v:Handler">Handler</a></code> for just the targets of a given <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> (or any <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code>, really).
that ignores its input and just recovers with the stated monadic action.
</p><pre>
<code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#v:catches">catches</a></code> ... [ <code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> <code><a href="Control-Exception-Lens.html#t:_NonTermination">_NonTermination</a></code> (<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#v:return">return</a></code> "looped")
, <code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> <code><a href="Control-Exception-Lens.html#t:_StackOverflow">_StackOverflow</a></code> (<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#v:return">return</a></code> "overflow")
]
</pre><p>This works with the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:Handler">Handler</a></code> type provided by <code>Control.Exception</code>:
</p><pre>
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> r -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:Handler">Handler</a></code> r
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> r -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:Handler">Handler</a></code> r
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> r -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:Handler">Handler</a></code> r
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> r -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:Handler">Handler</a></code> r
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Traversal.html#t:Traversal-39-">Traversal'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> r -> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:Handler">Handler</a></code> r
</pre><p>and with the <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Handler">Handler</a></code> type provided by <code>Control.Monad.CatchIO</code>:
</p><pre>
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Handler">Handler</a></code> m r
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Handler">Handler</a></code> m r
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Handler">Handler</a></code> m r
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Handler">Handler</a></code> m r
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Traversal.html#t:Traversal-39-">Traversal'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> a -> m r -> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Handler">Handler</a></code> m r
</pre><p>and with the <code><a href="Control-Monad-Error-Lens.html#t:Handler">Handler</a></code> type provided by <code>Control.Monad.Error.Lens</code>:
</p><pre>
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> e a -> m r -> <code><a href="Control-Monad-Error-Lens.html#t:Handler">Handler</a></code> e m r
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> e a -> m r -> <code><a href="Control-Monad-Error-Lens.html#t:Handler">Handler</a></code> e m r
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a></code> e a -> m r -> <code><a href="Control-Monad-Error-Lens.html#t:Handler">Handler</a></code> e m r
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> e a -> m r -> <code><a href="Control-Monad-Error-Lens.html#t:Handler">Handler</a></code> e m r
<code><a href="Control-Exception-Lens.html#v:handler_">handler_</a></code> :: <code><a href="Control-Lens-Traversal.html#t:Traversal-39-">Traversal'</a></code> e a -> m r -> <code><a href="Control-Monad-Error-Lens.html#t:Handler">Handler</a></code> e m r
</pre></div></div><div class="subs instances"><p id="control.i:Handleable" class="caption collapser" onclick="toggleSection('i:Handleable')">Instances</p><div id="section.i:Handleable" class="show"><table><tr><td class="src"><a href="Control-Exception-Lens.html#t:Handleable">Handleable</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception.html#t:Handler">Handler</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Control-Exception-Lens.html#t:Handleable">Handleable</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a> m (<a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Handler">Handler</a> m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Control-Exception-Lens.html#t:Handleable">Handleable</a> e m (<a href="Control-Monad-Error-Lens.html#t:Handler">Handler</a> e m)</td><td class="doc empty"> </td></tr></table></div></div></div><h2 id="g:6">IOExceptions
</h2><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:AsIOException" class="def">AsIOException</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsIOException" class="link">Source</a></p><div class="doc"><p>Exceptions that occur in the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code>. An <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:IOException">IOException</a></code> records a
more specific error type, a descriptive string and maybe the handle that was
used when the error was flagged.
</p><p>Due to their richer structure relative to other exceptions, these have
a more carefully overloaded signature.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_IOException" class="def">_IOException</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:IOException">IOException</a><a href="src/Control-Exception-Lens.html#_IOException" class="link">Source</a></p><div class="doc"><p>Unfortunately the name <code>ioException</code> is taken by <code>base</code> for
throwing IOExceptions.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_IOException">_IOException</a></code> :: <code><a href="Control-Lens-Type.html#t:Equality-39-">Equality'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:IOException">IOException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:IOException">IOException</a></code>
<code><a href="Control-Exception-Lens.html#v:_IOException">_IOException</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:IOException">IOException</a></code>
</pre><p>Many combinators for working with an <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:IOException">IOException</a></code> are available
in <a href="System-IO-Error-Lens.html">System.IO.Error.Lens</a>.
</p></div></div><div class="subs instances"><p id="control.i:AsIOException" class="caption collapser" onclick="toggleSection('i:AsIOException')">Instances</p><div id="section.i:AsIOException" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsIOException">AsIOException</a> p f <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"> </td></tr><tr><td class="src"><a href="Control-Exception-Lens.html#t:AsIOException">AsIOException</a> p f <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"> </td></tr></table></div></div></div><h2 id="g:7">Arithmetic Exceptions
</h2><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:AsArithException" class="def">AsArithException</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsArithException" class="link">Source</a></p><div class="doc"><p>Arithmetic exceptions.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_ArithException" class="def">_ArithException</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a><a href="src/Control-Exception-Lens.html#_ArithException" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:AsArithException" class="caption collapser" onclick="toggleSection('i:AsArithException')">Instances</p><div id="section.i:AsArithException" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f <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"> </td></tr><tr><td class="src"><a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f <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"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:_Overflow" class="def">_Overflow</a> :: (<a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_Overflow" class="link">Source</a></p><div class="doc"><p>Handle arithmetic <code><a href="Control-Exception-Lens.html#v:_Overflow">_Overflow</a></code>.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_Overflow">_Overflow</a></code> ≡ <code><a href="Control-Exception-Lens.html#v:_ArithException">_ArithException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:.">.</a></code> <code><a href="Control-Exception-Lens.html#v:_Overflow">_Overflow</a></code>
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:_Overflow">_Overflow</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code>
<code><a href="Control-Exception-Lens.html#v:_Overflow">_Overflow</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code>
</pre></div></div><div class="top"><p class="src"><a name="v:_Underflow" class="def">_Underflow</a> :: (<a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_Underflow" class="link">Source</a></p><div class="doc"><p>Handle arithmetic <code><a href="Control-Exception-Lens.html#v:_Underflow">_Underflow</a></code>.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_Underflow">_Underflow</a></code> ≡ <code><a href="Control-Exception-Lens.html#v:_ArithException">_ArithException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:.">.</a></code> <code><a href="Control-Exception-Lens.html#v:_Underflow">_Underflow</a></code>
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:_Underflow">_Underflow</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code>
<code><a href="Control-Exception-Lens.html#v:_Underflow">_Underflow</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code>
</pre></div></div><div class="top"><p class="src"><a name="v:_LossOfPrecision" class="def">_LossOfPrecision</a> :: (<a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_LossOfPrecision" class="link">Source</a></p><div class="doc"><p>Handle arithmetic loss of precision.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_LossOfPrecision">_LossOfPrecision</a></code> ≡ <code><a href="Control-Exception-Lens.html#v:_ArithException">_ArithException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:.">.</a></code> <code><a href="Control-Exception-Lens.html#v:_LossOfPrecision">_LossOfPrecision</a></code>
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:_LossOfPrecision">_LossOfPrecision</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code>
<code><a href="Control-Exception-Lens.html#v:_LossOfPrecision">_LossOfPrecision</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code>
</pre></div></div><div class="top"><p class="src"><a name="v:_DivideByZero" class="def">_DivideByZero</a> :: (<a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_DivideByZero" class="link">Source</a></p><div class="doc"><p>Handle division by zero.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_DivideByZero">_DivideByZero</a></code> ≡ <code><a href="Control-Exception-Lens.html#v:_ArithException">_ArithException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:.">.</a></code> <code><a href="Control-Exception-Lens.html#v:_DivideByZero">_DivideByZero</a></code>
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:_DivideByZero">_DivideByZero</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code>
<code><a href="Control-Exception-Lens.html#v:_DivideByZero">_DivideByZero</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code>
</pre></div></div><div class="top"><p class="src"><a name="v:_Denormal" class="def">_Denormal</a> :: (<a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_Denormal" class="link">Source</a></p><div class="doc"><p>Handle exceptional _Denormalized floating point.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_Denormal">_Denormal</a></code> ≡ <code><a href="Control-Exception-Lens.html#v:_ArithException">_ArithException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:.">.</a></code> <code><a href="Control-Exception-Lens.html#v:_Denormal">_Denormal</a></code>
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:_Denormal">_Denormal</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code>
<code><a href="Control-Exception-Lens.html#v:_Denormal">_Denormal</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code>
</pre></div></div><div class="top"><p class="src"><a name="v:_RatioZeroDenominator" class="def">_RatioZeroDenominator</a> :: (<a href="Control-Exception-Lens.html#t:AsArithException">AsArithException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_RatioZeroDenominator" class="link">Source</a></p><div class="doc"><p>Added in <code>base</code> 4.6 in response to this libraries discussion:
</p><p><a href="http://haskell.1045720.n5.nabble.com/Data-Ratio-and-exceptions-td5711246.html">http://haskell.1045720.n5.nabble.com/Data-Ratio-and-exceptions-td5711246.html</a>
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_RatioZeroDenominator">_RatioZeroDenominator</a></code> ≡ <code><a href="Control-Exception-Lens.html#v:_ArithException">_ArithException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:.">.</a></code> <code><a href="Control-Exception-Lens.html#v:_RatioZeroDenominator">_RatioZeroDenominator</a></code>
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:_RatioZeroDenominator">_RatioZeroDenominator</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code>
<code><a href="Control-Exception-Lens.html#v:_RatioZeroDenominator">_RatioZeroDenominator</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArithException">ArithException</a></code>
</pre></div></div><h2 id="g:8">Array Exceptions
</h2><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:AsArrayException" class="def">AsArrayException</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsArrayException" class="link">Source</a></p><div class="doc"><p>Exceptions generated by array operations.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_ArrayException" class="def">_ArrayException</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArrayException">ArrayException</a><a href="src/Control-Exception-Lens.html#_ArrayException" class="link">Source</a></p><div class="doc"><p>Extract information about an <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArrayException">ArrayException</a></code>.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_ArrayException">_ArrayException</a></code> :: <code><a href="Control-Lens-Type.html#t:Equality-39-">Equality'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArrayException">ArrayException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArrayException">ArrayException</a></code>
<code><a href="Control-Exception-Lens.html#v:_ArrayException">_ArrayException</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArrayException">ArrayException</a></code>
</pre></div></div><div class="subs instances"><p id="control.i:AsArrayException" class="caption collapser" onclick="toggleSection('i:AsArrayException')">Instances</p><div id="section.i:AsArrayException" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsArrayException">AsArrayException</a> p f <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"> </td></tr><tr><td class="src"><a href="Control-Exception-Lens.html#t:AsArrayException">AsArrayException</a> p f <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"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:_IndexOutOfBounds" class="def">_IndexOutOfBounds</a> :: (<a href="Control-Exception-Lens.html#t:AsArrayException">AsArrayException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Control-Exception-Lens.html#_IndexOutOfBounds" class="link">Source</a></p><div class="doc"><p>An attempt was made to index an array outside its declared bounds.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_IndexOutOfBounds">_IndexOutOfBounds</a></code> ≡ <code><a href="Control-Exception-Lens.html#v:_ArrayException">_ArrayException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:.">.</a></code> <code><a href="Control-Exception-Lens.html#v:_IndexOutOfBounds">_IndexOutOfBounds</a></code>
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:_IndexOutOfBounds">_IndexOutOfBounds</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArrayException">ArrayException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>
<code><a href="Control-Exception-Lens.html#v:_IndexOutOfBounds">_IndexOutOfBounds</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>
</pre></div></div><div class="top"><p class="src"><a name="v:_UndefinedElement" class="def">_UndefinedElement</a> :: (<a href="Control-Exception-Lens.html#t:AsArrayException">AsArrayException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Control-Exception-Lens.html#_UndefinedElement" class="link">Source</a></p><div class="doc"><p>An attempt was made to evaluate an element of an array that had not been initialized.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_UndefinedElement">_UndefinedElement</a></code> ≡ <code><a href="Control-Exception-Lens.html#v:_ArrayException">_ArrayException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:.">.</a></code> <code><a href="Control-Exception-Lens.html#v:_UndefinedElement">_UndefinedElement</a></code>
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:_UndefinedElement">_UndefinedElement</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ArrayException">ArrayException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>
<code><a href="Control-Exception-Lens.html#v:_UndefinedElement">_UndefinedElement</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>
</pre></div></div><h2 id="g:9">Assertion Failed
</h2><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:AsAssertionFailed" class="def">AsAssertionFailed</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsAssertionFailed" class="link">Source</a></p><div class="doc"><p><code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#v:assert">assert</a></code> was applied to <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:False">False</a></code>.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_AssertionFailed" class="def">_AssertionFailed</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Control-Exception-Lens.html#_AssertionFailed" class="link">Source</a></p><div class="doc"><p>This <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> contains provides information about what assertion failed in the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>.
</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>handling _AssertionFailed (\ xs -> "caught" <$ guard ("<interactive>" `isInfixOf` xs) ) $ assert False (return "uncaught")
</code></strong>"caught"
</pre><pre>
<code><a href="Control-Exception-Lens.html#v:_AssertionFailed">_AssertionFailed</a></code> :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:AssertionFailed">AssertionFailed</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>
<code><a href="Control-Exception-Lens.html#v:_AssertionFailed">_AssertionFailed</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>
</pre></div></div><div class="subs instances"><p id="control.i:AsAssertionFailed" class="caption collapser" onclick="toggleSection('i:AsAssertionFailed')">Instances</p><div id="section.i:AsAssertionFailed" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsAssertionFailed">AsAssertionFailed</a> p f <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"> </td></tr><tr><td class="src">(<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="Control-Exception-Lens.html#t:AsAssertionFailed">AsAssertionFailed</a> p f <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"> </td></tr></table></div></div></div><h2 id="g:10">Async Exceptions
</h2><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:AsAsyncException" class="def">AsAsyncException</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsAsyncException" class="link">Source</a></p><div class="doc"><p>Asynchronous exceptions.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_AsyncException" class="def">_AsyncException</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:AsyncException">AsyncException</a><a href="src/Control-Exception-Lens.html#_AsyncException" class="link">Source</a></p><div class="doc"><p>There are several types of <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:AsyncException">AsyncException</a></code>.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_AsyncException">_AsyncException</a></code> :: <code><a href="Control-Lens-Type.html#t:Equality-39-">Equality'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:AsyncException">AsyncException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:AsyncException">AsyncException</a></code>
<code><a href="Control-Exception-Lens.html#v:_AsyncException">_AsyncException</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:AsyncException">AsyncException</a></code>
</pre></div></div><div class="subs instances"><p id="control.i:AsAsyncException" class="caption collapser" onclick="toggleSection('i:AsAsyncException')">Instances</p><div id="section.i:AsAsyncException" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsAsyncException">AsAsyncException</a> p f <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"> </td></tr><tr><td class="src"><a href="Control-Exception-Lens.html#t:AsAsyncException">AsAsyncException</a> p f <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"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:_StackOverflow" class="def">_StackOverflow</a> :: (<a href="Control-Exception-Lens.html#t:AsAsyncException">AsAsyncException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_StackOverflow" class="link">Source</a></p><div class="doc"><p>The current thread's stack exceeded its limit. Since an <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> has
been raised, the thread's stack will certainly be below its limit again,
but the programmer should take remedial action immediately.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_StackOverflow">_StackOverflow</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:AsyncException">AsyncException</a></code> ()
<code><a href="Control-Exception-Lens.html#v:_StackOverflow">_StackOverflow</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> ()
</pre></div></div><div class="top"><p class="src"><a name="v:_HeapOverflow" class="def">_HeapOverflow</a> :: (<a href="Control-Exception-Lens.html#t:AsAsyncException">AsAsyncException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_HeapOverflow" class="link">Source</a></p><div class="doc"><p>The program's heap is reaching its limit, and the program should take action
to reduce the amount of live data it has.
</p><p>Notes:
</p><ul><li> It is undefined which thread receives this <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code>.
</li><li> GHC currently does not throw <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#v:HeapOverflow">HeapOverflow</a></code> exceptions.
</li></ul><pre>
<code><a href="Control-Exception-Lens.html#v:_HeapOverflow">_HeapOverflow</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:AsyncException">AsyncException</a></code> ()
<code><a href="Control-Exception-Lens.html#v:_HeapOverflow">_HeapOverflow</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> ()
</pre></div></div><div class="top"><p class="src"><a name="v:_ThreadKilled" class="def">_ThreadKilled</a> :: (<a href="Control-Exception-Lens.html#t:AsAsyncException">AsAsyncException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_ThreadKilled" class="link">Source</a></p><div class="doc"><p>This <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> is raised by another thread calling
<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Concurrent.html#t:killThread">killThread</a></code>, or by the system if it needs to terminate
the thread for some reason.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_ThreadKilled">_ThreadKilled</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:AsyncException">AsyncException</a></code> ()
<code><a href="Control-Exception-Lens.html#v:_ThreadKilled">_ThreadKilled</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> ()
</pre></div></div><div class="top"><p class="src"><a name="v:_UserInterrupt" class="def">_UserInterrupt</a> :: (<a href="Control-Exception-Lens.html#t:AsAsyncException">AsAsyncException</a> p f t, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_UserInterrupt" class="link">Source</a></p><div class="doc"><p>This <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> is raised by default in the main thread of the program when
the user requests to terminate the program via the usual mechanism(s)
(<em>e.g.</em> Control-C in the console).
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_UserInterrupt">_UserInterrupt</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:AsyncException">AsyncException</a></code> ()
<code><a href="Control-Exception-Lens.html#v:_UserInterrupt">_UserInterrupt</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> ()
</pre></div></div><h2 id="g:11">Non-Termination
</h2><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a name="t:AsNonTermination" class="def">AsNonTermination</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsNonTermination" class="link">Source</a></p><div class="doc"><p>Thrown when the runtime system detects that the computation is guaranteed
not to terminate. Note that there is no guarantee that the runtime system
will notice whether any given computation is guaranteed to terminate or not.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_NonTermination" class="def">_NonTermination</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_NonTermination" class="link">Source</a></p><div class="doc"><p>There is no additional information carried in a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:NonTermination">NonTermination</a></code> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code>.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_NonTermination">_NonTermination</a></code> :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:NonTermination">NonTermination</a></code> ()
<code><a href="Control-Exception-Lens.html#v:_NonTermination">_NonTermination</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> ()
</pre></div></div><div class="subs instances"><p id="control.i:AsNonTermination" class="caption collapser" onclick="toggleSection('i:AsNonTermination')">Instances</p><div id="section.i:AsNonTermination" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsNonTermination">AsNonTermination</a> p f <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"> </td></tr><tr><td class="src">(<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="Control-Exception-Lens.html#t:AsNonTermination">AsNonTermination</a> p f <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:NonTermination">NonTermination</a></td><td class="doc empty"> </td></tr></table></div></div></div><h2 id="g:12">Nested Atomically
</h2><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a name="t:AsNestedAtomically" class="def">AsNestedAtomically</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsNestedAtomically" class="link">Source</a></p><div class="doc"><p>Thrown when the program attempts to call atomically, from the
<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:STM">STM</a></code> package, inside another call to atomically.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_NestedAtomically" class="def">_NestedAtomically</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_NestedAtomically" class="link">Source</a></p><div class="doc"><p>There is no additional information carried in a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:NestedAtomically">NestedAtomically</a></code> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code>.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_NestedAtomically">_NestedAtomically</a></code> :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:NestedAtomically">NestedAtomically</a></code> ()
<code><a href="Control-Exception-Lens.html#v:_NestedAtomically">_NestedAtomically</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> ()
</pre></div></div><div class="subs instances"><p id="control.i:AsNestedAtomically" class="caption collapser" onclick="toggleSection('i:AsNestedAtomically')">Instances</p><div id="section.i:AsNestedAtomically" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsNestedAtomically">AsNestedAtomically</a> p f <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"> </td></tr><tr><td class="src">(<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="Control-Exception-Lens.html#t:AsNestedAtomically">AsNestedAtomically</a> p f <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:NestedAtomically">NestedAtomically</a></td><td class="doc empty"> </td></tr></table></div></div></div><h2 id="g:13">Blocked Indefinitely
</h2><h3 id="g:14">on MVar
</h3><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a name="t:AsBlockedIndefinitelyOnMVar" class="def">AsBlockedIndefinitelyOnMVar</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsBlockedIndefinitelyOnMVar" class="link">Source</a></p><div class="doc"><p>The thread is blocked on an <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Concurrent-MVar.html#t:MVar">MVar</a></code>, but there
are no other references to the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Concurrent-MVar.html#t:MVar">MVar</a></code> so it can't
ever continue.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_BlockedIndefinitelyOnMVar" class="def">_BlockedIndefinitelyOnMVar</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_BlockedIndefinitelyOnMVar" class="link">Source</a></p><div class="doc"><p>There is no additional information carried in a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:BlockedIndefinitelyOnMVar">BlockedIndefinitelyOnMVar</a></code> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code>.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_BlockedIndefinitelyOnMVar">_BlockedIndefinitelyOnMVar</a></code> :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:BlockedIndefinitelyOnMVar">BlockedIndefinitelyOnMVar</a></code> ()
<code><a href="Control-Exception-Lens.html#v:_BlockedIndefinitelyOnMVar">_BlockedIndefinitelyOnMVar</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> ()
</pre></div></div><div class="subs instances"><p id="control.i:AsBlockedIndefinitelyOnMVar" class="caption collapser" onclick="toggleSection('i:AsBlockedIndefinitelyOnMVar')">Instances</p><div id="section.i:AsBlockedIndefinitelyOnMVar" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsBlockedIndefinitelyOnMVar">AsBlockedIndefinitelyOnMVar</a> p f <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"> </td></tr><tr><td class="src">(<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="Control-Exception-Lens.html#t:AsBlockedIndefinitelyOnMVar">AsBlockedIndefinitelyOnMVar</a> p f <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"> </td></tr></table></div></div></div><h3 id="g:15">on STM
</h3><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a name="t:AsBlockedIndefinitelyOnSTM" class="def">AsBlockedIndefinitelyOnSTM</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsBlockedIndefinitelyOnSTM" class="link">Source</a></p><div class="doc"><p>The thread is waiting to retry an <code><a href="Control-Monad-STM.html#t:STM">STM</a></code> transaction,
but there are no other references to any TVars involved, so it can't ever
continue.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_BlockedIndefinitelyOnSTM" class="def">_BlockedIndefinitelyOnSTM</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_BlockedIndefinitelyOnSTM" class="link">Source</a></p><div class="doc"><p>There is no additional information carried in a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:BlockedIndefinitelyOnSTM">BlockedIndefinitelyOnSTM</a></code> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code>.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_BlockedIndefinitelyOnSTM">_BlockedIndefinitelyOnSTM</a></code> :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:BlockedIndefinitelyOnSTM">BlockedIndefinitelyOnSTM</a></code> ()
<code><a href="Control-Exception-Lens.html#v:_BlockedIndefinitelyOnSTM">_BlockedIndefinitelyOnSTM</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> ()
</pre></div></div><div class="subs instances"><p id="control.i:AsBlockedIndefinitelyOnSTM" class="caption collapser" onclick="toggleSection('i:AsBlockedIndefinitelyOnSTM')">Instances</p><div id="section.i:AsBlockedIndefinitelyOnSTM" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsBlockedIndefinitelyOnSTM">AsBlockedIndefinitelyOnSTM</a> p f <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"> </td></tr><tr><td class="src">(<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="Control-Exception-Lens.html#t:AsBlockedIndefinitelyOnSTM">AsBlockedIndefinitelyOnSTM</a> p f <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"> </td></tr></table></div></div></div><h2 id="g:16">Deadlock
</h2><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a name="t:AsDeadlock" class="def">AsDeadlock</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsDeadlock" class="link">Source</a></p><div class="doc"><p>There are no runnable threads, so the program is deadlocked. The
<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Deadlock">Deadlock</a></code> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> is raised in the main thread only.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_Deadlock" class="def">_Deadlock</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_Deadlock" class="link">Source</a></p><div class="doc"><p>There is no information carried in a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Deadlock">Deadlock</a></code> <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code>.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_Deadlock">_Deadlock</a></code> :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Deadlock">Deadlock</a></code> ()
<code><a href="Control-Exception-Lens.html#v:_Deadlock">_Deadlock</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> ()
</pre></div></div><div class="subs instances"><p id="control.i:AsDeadlock" class="caption collapser" onclick="toggleSection('i:AsDeadlock')">Instances</p><div id="section.i:AsDeadlock" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsDeadlock">AsDeadlock</a> p f <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"> </td></tr><tr><td class="src">(<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="Control-Exception-Lens.html#t:AsDeadlock">AsDeadlock</a> p f <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"> </td></tr></table></div></div></div><h2 id="g:17">No Such Method
</h2><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a name="t:AsNoMethodError" class="def">AsNoMethodError</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsNoMethodError" class="link">Source</a></p><div class="doc"><p>A class method without a definition (neither a default definition,
nor a definition in the appropriate instance) was called.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_NoMethodError" class="def">_NoMethodError</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Control-Exception-Lens.html#_NoMethodError" class="link">Source</a></p><div class="doc"><p>Extract a description of the missing method.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_NoMethodError">_NoMethodError</a></code> :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:NoMethodError">NoMethodError</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>
<code><a href="Control-Exception-Lens.html#v:_NoMethodError">_NoMethodError</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>
</pre></div></div><div class="subs instances"><p id="control.i:AsNoMethodError" class="caption collapser" onclick="toggleSection('i:AsNoMethodError')">Instances</p><div id="section.i:AsNoMethodError" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsNoMethodError">AsNoMethodError</a> p f <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"> </td></tr><tr><td class="src">(<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="Control-Exception-Lens.html#t:AsNoMethodError">AsNoMethodError</a> p f <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:NoMethodError">NoMethodError</a></td><td class="doc empty"> </td></tr></table></div></div></div><h2 id="g:18">Pattern Match Failure
</h2><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a name="t:AsPatternMatchFail" class="def">AsPatternMatchFail</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsPatternMatchFail" class="link">Source</a></p><div class="doc"><p>A pattern match failed.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_PatternMatchFail" class="def">_PatternMatchFail</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Control-Exception-Lens.html#_PatternMatchFail" class="link">Source</a></p><div class="doc"><p>Information about the source location of the pattern.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_PatternMatchFail">_PatternMatchFail</a></code> :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:PatternMatchFail">PatternMatchFail</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>
<code><a href="Control-Exception-Lens.html#v:_PatternMatchFail">_PatternMatchFail</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>
</pre></div></div><div class="subs instances"><p id="control.i:AsPatternMatchFail" class="caption collapser" onclick="toggleSection('i:AsPatternMatchFail')">Instances</p><div id="section.i:AsPatternMatchFail" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsPatternMatchFail">AsPatternMatchFail</a> p f <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"> </td></tr><tr><td class="src">(<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="Control-Exception-Lens.html#t:AsPatternMatchFail">AsPatternMatchFail</a> p f <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:PatternMatchFail">PatternMatchFail</a></td><td class="doc empty"> </td></tr></table></div></div></div><h2 id="g:19">Record
</h2><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a name="t:AsRecConError" class="def">AsRecConError</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsRecConError" class="link">Source</a></p><div class="doc"><p>An uninitialised record field was used.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_RecConError" class="def">_RecConError</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Control-Exception-Lens.html#_RecConError" class="link">Source</a></p><div class="doc"><p>Information about the source location where the record was
constructed.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_RecConError">_RecConError</a></code> :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:RecConError">RecConError</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>
<code><a href="Control-Exception-Lens.html#v:_RecConError">_RecConError</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>
</pre></div></div><div class="subs instances"><p id="control.i:AsRecConError" class="caption collapser" onclick="toggleSection('i:AsRecConError')">Instances</p><div id="section.i:AsRecConError" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsRecConError">AsRecConError</a> p f <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"> </td></tr><tr><td class="src">(<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="Control-Exception-Lens.html#t:AsRecConError">AsRecConError</a> p f <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:RecConError">RecConError</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a name="t:AsRecSelError" class="def">AsRecSelError</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsRecSelError" class="link">Source</a></p><div class="doc"><p>A record selector was applied to a constructor without the appropriate
field. This can only happen with a datatype with multiple constructors,
where some fields are in one constructor but not another.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_RecSelError" class="def">_RecSelError</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Control-Exception-Lens.html#_RecSelError" class="link">Source</a></p><div class="doc"><p>Information about the source location where the record selection occurred.
</p></div></div><div class="subs instances"><p id="control.i:AsRecSelError" class="caption collapser" onclick="toggleSection('i:AsRecSelError')">Instances</p><div id="section.i:AsRecSelError" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsRecSelError">AsRecSelError</a> p f <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"> </td></tr><tr><td class="src">(<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="Control-Exception-Lens.html#t:AsRecSelError">AsRecSelError</a> p f <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:RecSelError">RecSelError</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a name="t:AsRecUpdError" class="def">AsRecUpdError</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsRecUpdError" class="link">Source</a></p><div class="doc"><p>A record update was performed on a constructor without the
appropriate field. This can only happen with a datatype with multiple
constructors, where some fields are in one constructor but not another.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_RecUpdError" class="def">_RecUpdError</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Control-Exception-Lens.html#_RecUpdError" class="link">Source</a></p><div class="doc"><p>Information about the source location where the record was updated.
</p></div></div><div class="subs instances"><p id="control.i:AsRecUpdError" class="caption collapser" onclick="toggleSection('i:AsRecUpdError')">Instances</p><div id="section.i:AsRecUpdError" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsRecUpdError">AsRecUpdError</a> p f <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"> </td></tr><tr><td class="src">(<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="Control-Exception-Lens.html#t:AsRecUpdError">AsRecUpdError</a> p f <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:RecUpdError">RecUpdError</a></td><td class="doc empty"> </td></tr></table></div></div></div><h2 id="g:20">Error Call
</h2><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a name="t:AsErrorCall" class="def">AsErrorCall</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsErrorCall" class="link">Source</a></p><div class="doc"><p>This is thrown when the user calls <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:error">error</a></code>.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_ErrorCall" class="def">_ErrorCall</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Control-Exception-Lens.html#_ErrorCall" class="link">Source</a></p><div class="doc"><p>Retrieve the argument given to <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:error">error</a></code>.
</p><p><code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:ErrorCall">ErrorCall</a></code> is isomorphic to a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>.
</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>catching _ErrorCall (error "touch down!") return
</code></strong>"touch down!"
</pre></div></div><div class="subs instances"><p id="control.i:AsErrorCall" class="caption collapser" onclick="toggleSection('i:AsErrorCall')">Instances</p><div id="section.i:AsErrorCall" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsErrorCall">AsErrorCall</a> p f <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"> </td></tr><tr><td class="src">(<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="Control-Exception-Lens.html#t:AsErrorCall">AsErrorCall</a> p f <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"> </td></tr></table></div></div></div><h1 id="g:21">Handling Exceptions
</h1><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a name="t:AsHandlingException" class="def">AsHandlingException</a> p f t <span class="keyword">where</span><a href="src/Control-Exception-Lens.html#AsHandlingException" class="link">Source</a></p><div class="doc"><p>This <code><a href="/usr/share/doc/libghc-monadcatchio-transformers-doc/html/Control-Monad-CatchIO.html#t:Exception">Exception</a></code> is thrown by <code>lens</code> when the user somehow manages to rethrow
an internal <code><a href="Control-Lens-Internal-Exception.html#t:HandlingException">HandlingException</a></code>.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_HandlingException" class="def">_HandlingException</a> :: <a href="Control-Lens-Type.html#t:Overloaded-39-">Overloaded'</a> p f t ()<a href="src/Control-Exception-Lens.html#_HandlingException" class="link">Source</a></p><div class="doc"><p>There is no information carried in a <code><a href="Control-Lens-Internal-Exception.html#t:HandlingException">HandlingException</a></code>.
</p><pre>
<code><a href="Control-Exception-Lens.html#v:_HandlingException">_HandlingException</a></code> :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> <code><a href="Control-Lens-Internal-Exception.html#t:HandlingException">HandlingException</a></code> ()
<code><a href="Control-Exception-Lens.html#v:_HandlingException">_HandlingException</a></code> :: <code><a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:SomeException">SomeException</a></code> ()
</pre></div></div><div class="subs instances"><p id="control.i:AsHandlingException" class="caption collapser" onclick="toggleSection('i:AsHandlingException')">Instances</p><div id="section.i:AsHandlingException" class="show"><table><tr><td class="src">(<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> f) => <a href="Control-Exception-Lens.html#t:AsHandlingException">AsHandlingException</a> p f <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"> </td></tr><tr><td class="src">(<a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> f) => <a href="Control-Exception-Lens.html#t:AsHandlingException">AsHandlingException</a> p f <a href="Control-Lens-Internal-Exception.html#t:HandlingException">HandlingException</a></td><td class="doc empty"> </td></tr></table></div></div></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>
|