Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

3.5

  • Loading branch information...
commit 06ceb5f1eba61bb0d4c89c0ffb370c83fa071f49 1 parent 51c05ab
@ekmett authored
Showing with 307 additions and 232 deletions.
  1. +1 −1  Control-Exception-Lens.html
  2. +4 −4 Control-Lens-Action.html
  3. +34 −0 Control-Lens-Classes.html
  4. +1 −1  Control-Lens-Combinators.html
  5. +7 −7 Control-Lens-Fold.html
  6. +16 −5 Control-Lens-Getter.html
  7. +1 −1  Control-Lens-Indexed.html
  8. +6 −6 Control-Lens-IndexedFold.html
  9. +3 −3 Control-Lens-IndexedGetter.html
  10. +1 −1  Control-Lens-IndexedLens.html
  11. +3 −3 Control-Lens-IndexedSetter.html
  12. +1 −1  Control-Lens-IndexedTraversal.html
  13. +22 −34 Control-Lens-Internal.html
  14. +1 −1  Control-Lens-Iso.html
  15. +1 −1  Control-Lens-Isomorphic.html
  16. +1 −1  Control-Lens-Loupe.html
  17. +1 −1  Control-Lens-Plated.html
  18. +1 −1  Control-Lens-Projection.html
  19. +1 −1  Control-Lens-Representable.html
  20. +3 −3 Control-Lens-Setter.html
  21. +1 −1  Control-Lens-Simple.html
  22. +1 −1  Control-Lens-TH.html
  23. +27 −12 Control-Lens-Traversal.html
  24. +1 −1  Control-Lens-Tuple.html
  25. +14 −6 Control-Lens-Type.html
  26. +7 −0 Control-Lens-Unsafe.html
  27. +1 −1  Control-Lens-WithIndex.html
  28. +4 −4 Control-Lens-Zipper.html
  29. +1 −1  Control-Lens-Zoom.html
  30. +2 −2 Control-Lens.html
  31. +1 −1  Control-Parallel-Strategies-Lens.html
  32. +1 −1  Control-Seq-Lens.html
  33. +1 −1  Data-Array-Lens.html
  34. +1 −1  Data-Bits-Lens.html
  35. +1 −1  Data-ByteString-Lazy-Lens.html
  36. +1 −1  Data-ByteString-Lens.html
  37. +1 −1  Data-ByteString-Strict-Lens.html
  38. +1 −1  Data-Complex-Lens.html
  39. +1 −1  Data-Data-Lens.html
  40. +1 −1  Data-Dynamic-Lens.html
  41. +1 −1  Data-HashSet-Lens.html
  42. +1 −1  Data-IntSet-Lens.html
  43. +1 −1  Data-List-Lens.html
  44. +13 −13 Data-List-Split-Lens.html
  45. +1 −1  Data-Monoid-Lens.html
  46. +1 −1  Data-Sequence-Lens.html
  47. +1 −1  Data-Set-Lens.html
  48. +1 −1  Data-Text-Lazy-Lens.html
  49. +1 −1  Data-Text-Lens.html
  50. +1 −1  Data-Text-Strict-Lens.html
  51. +1 −1  Data-Tree-Lens.html
  52. +1 −1  Data-Typeable-Lens.html
  53. +1 −1  Data-Vector-Generic-Lens.html
  54. +1 −1  Data-Vector-Lens.html
  55. +1 −1  GHC-Generics-Lens.html
  56. +1 −1  Language-Haskell-TH-Lens.html
  57. +1 −1  System-FilePath-Lens.html
  58. +2 −2 doc-index-124.html
  59. +2 −2 doc-index-35.html
  60. +2 −2 doc-index-37.html
  61. +2 −2 doc-index-38.html
  62. +2 −2 doc-index-42.html
  63. +2 −2 doc-index-43.html
  64. +2 −2 doc-index-45.html
  65. +2 −2 doc-index-46.html
  66. +2 −2 doc-index-47.html
  67. +2 −2 doc-index-58.html
  68. +2 −2 doc-index-60.html
  69. +2 −2 doc-index-63.html
  70. +2 −2 doc-index-94.html
  71. +2 −2 doc-index-95.html
  72. +2 −2 doc-index-A.html
  73. +2 −2 doc-index-All.html
  74. +2 −2 doc-index-B.html
  75. +2 −2 doc-index-C.html
  76. +2 −2 doc-index-D.html
  77. +2 −2 doc-index-E.html
  78. +2 −2 doc-index-F.html
  79. +2 −2 doc-index-G.html
  80. +2 −2 doc-index-H.html
  81. +2 −2 doc-index-I.html
  82. +2 −2 doc-index-K.html
  83. +2 −2 doc-index-L.html
  84. +2 −2 doc-index-M.html
  85. +2 −2 doc-index-N.html
  86. +2 −2 doc-index-O.html
  87. +2 −2 doc-index-P.html
  88. +2 −2 doc-index-R.html
  89. +2 −2 doc-index-S.html
  90. +2 −2 doc-index-T.html
  91. +2 −2 doc-index-U.html
  92. +2 −2 doc-index-V.html
  93. +2 −2 doc-index-W.html
  94. +2 −2 doc-index-Z.html
  95. +2 −2 doc-index.html
  96. +2 −2 index-frames.html
  97. +3 −3 index.html
  98. BIN  lens.haddock
  99. +7 −0 mini_Control-Lens-Classes.html
  100. +3 −4 mini_Control-Lens-Internal.html
  101. +3 −2 mini_Control-Lens-Traversal.html
  102. +2 −1  mini_Control-Lens-Type.html
  103. +4 −0 mini_Control-Lens-Unsafe.html
Sorry, we could not display the entire diff because it was too big.
View
2  Control-Exception-Lens.html
@@ -1,7 +1,7 @@
<!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.4: 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 &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Exception.Lens</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</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:exception">exception</a> :: (Exception a, Exception b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> SomeException SomeException a b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:exception" class="def">exception</a> :: (Exception a, Exception b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> SomeException SomeException a b<a href="src/Control-Exception-Lens.html#exception" class="link">Source</a></p><div class="doc"><p>Traverse the strongly typed <code>Exception</code> contained in <code>SomeException</code> where the type of your function matches
+</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.5: 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 &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Control.Exception.Lens</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</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:exception">exception</a> :: (Exception a, Exception b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> SomeException SomeException a b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:exception" class="def">exception</a> :: (Exception a, Exception b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> SomeException SomeException a b<a href="src/Control-Exception-Lens.html#exception" class="link">Source</a></p><div class="doc"><p>Traverse the strongly typed <code>Exception</code> contained in <code>SomeException</code> where the type of your function matches
the desired <code>Exception</code>.
</p><pre>
exception :: (<code>Applicative</code> f, <code>Exception</code> a, <code>Exception</code> b)
View
8 Control-Lens-Action.html
@@ -1,11 +1,11 @@
<!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.Lens.Action</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-Lens-Action.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Action.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>MTPCs, FDs, Rank2</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Action</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Composable Actions
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Action.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>MTPCs, FDs, Rank2</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Action</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Composable Actions
</a></li><li><a href="#g:2">Folds with Effecs
</a></li><li><a href="#g:3">Implementation Details
-</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Action">Action</a> m s a = <span class="keyword">forall</span> f r. <a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><a href="#v:act">act</a> :: Monad m =&gt; (s -&gt; m a) -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> m s a</li><li class="src short"><a href="#v:acts">acts</a> :: <a href="Control-Lens-Action.html#t:Action">Action</a> m (m a) a</li><li class="src short"><a href="#v:perform">perform</a> :: Monad m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; s -&gt; m a</li><li class="src short"><a href="#v:performs">performs</a> :: Monad m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m e s t a b -&gt; (a -&gt; e) -&gt; s -&gt; m e</li><li class="src short"><a href="#v:liftAct">liftAct</a> :: (MonadTrans trans, Monad m) =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> (trans m) s a</li><li class="src short"><a href="#v:-94--33-">(^!)</a> :: Monad m =&gt; s -&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; m a</li><li class="src short"><span class="keyword">type</span> <a href="#t:MonadicFold">MonadicFold</a> m s a = <span class="keyword">forall</span> f r. (<a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><span class="keyword">type</span> <a href="#t:Acting">Acting</a> m r s t a b = (a -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r b) -&gt; s -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r t</li></ul></div><div id="interface"><h1 id="g:1">Composable Actions
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Action" class="def">Action</a> m s a = <span class="keyword">forall</span> f r. <a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Action.html#Action" class="link">Source</a></p><div class="doc"><p>An <code><a href="Control-Lens-Action.html#t:Action">Action</a></code> is a <code>Getter</code> enriched with access to a <code>Monad</code> for side-effects.
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Action">Action</a> m s a = <span class="keyword">forall</span> f r. <a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><a href="#v:act">act</a> :: Monad m =&gt; (s -&gt; m a) -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> m s a</li><li class="src short"><a href="#v:acts">acts</a> :: <a href="Control-Lens-Action.html#t:Action">Action</a> m (m a) a</li><li class="src short"><a href="#v:perform">perform</a> :: Monad m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; s -&gt; m a</li><li class="src short"><a href="#v:performs">performs</a> :: Monad m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m e s t a b -&gt; (a -&gt; e) -&gt; s -&gt; m e</li><li class="src short"><a href="#v:liftAct">liftAct</a> :: (MonadTrans trans, Monad m) =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> (trans m) s a</li><li class="src short"><a href="#v:-94--33-">(^!)</a> :: Monad m =&gt; s -&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; m a</li><li class="src short"><span class="keyword">type</span> <a href="#t:MonadicFold">MonadicFold</a> m s a = <span class="keyword">forall</span> f r. (<a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><span class="keyword">type</span> <a href="#t:Acting">Acting</a> m r s t a b = (a -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r b) -&gt; s -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r t</li></ul></div><div id="interface"><h1 id="g:1">Composable Actions
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Action" class="def">Action</a> m s a = <span class="keyword">forall</span> f r. <a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r f =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Action.html#Action" class="link">Source</a></p><div class="doc"><p>An <code><a href="Control-Lens-Action.html#t:Action">Action</a></code> is a <code>Getter</code> enriched with access to a <code>Monad</code> for side-effects.
</p><p>Every <code>Getter</code> can be used as an <code><a href="Control-Lens-Action.html#t:Action">Action</a></code>
</p><p>You can compose an <code><a href="Control-Lens-Action.html#t:Action">Action</a></code> with another <code><a href="Control-Lens-Action.html#t:Action">Action</a></code> using (<code>.</code>) from the <code>Prelude</code>.
</p></div></div><div class="top"><p class="src"><a name="v:act" class="def">act</a> :: Monad m =&gt; (s -&gt; m a) -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> m s a<a href="src/Control-Lens-Action.html#act" class="link">Source</a></p><div class="doc"><p>Construct an <code><a href="Control-Lens-Action.html#t:Action">Action</a></code> from a monadic side-effect
@@ -21,7 +21,7 @@
</code></strong>hello
world
</pre></div></div><h1 id="g:2">Folds with Effecs
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:MonadicFold" class="def">MonadicFold</a> m s a = <span class="keyword">forall</span> f r. (<a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Action.html#MonadicFold" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Action.html#t:MonadicFold">MonadicFold</a></code> is a <code>Fold</code> enriched with access to a <code>Monad</code> for side-effects.
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:MonadicFold" class="def">MonadicFold</a> m s a = <span class="keyword">forall</span> f r. (<a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Action.html#MonadicFold" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Action.html#t:MonadicFold">MonadicFold</a></code> is a <code>Fold</code> enriched with access to a <code>Monad</code> for side-effects.
</p><p>Every <code>Fold</code> can be used as a <code><a href="Control-Lens-Action.html#t:MonadicFold">MonadicFold</a></code>, that simply ignores the access to the <code>Monad</code>.
</p><p>You can compose a <code><a href="Control-Lens-Action.html#t:MonadicFold">MonadicFold</a></code> with another <code><a href="Control-Lens-Action.html#t:MonadicFold">MonadicFold</a></code> using (<code>.</code>) from the <code>Prelude</code>.
</p></div></div><h1 id="g:3">Implementation Details
View
34 Control-Lens-Classes.html
@@ -0,0 +1,34 @@
+<!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.Lens.Classes</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-Lens-Classes.html");};
+//]]>
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Classes.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.Classes</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Getters
+</a></li><li><a href="#g:2">Actions
+</a></li><li><a href="#g:3">Setters
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> (Functor f, <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> f) =&gt; <a href="#t:Gettable">Gettable</a> f <span class="keyword">where</span><ul class="subs"><li><a href="#v:coerce">coerce</a> :: f a -&gt; f b</li></ul></li><li class="src short"><a href="#v:noEffect">noEffect</a> :: (Applicative f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; f a</li><li class="src short"><span class="keyword">class</span> (Monad m, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; <a href="#t:Effective">Effective</a> m r f | f -&gt; m r <span class="keyword">where</span><ul class="subs"><li><a href="#v:effective">effective</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; k (m r) (f a)</li></ul></li><li class="src short"><a href="#v:ineffective">ineffective</a> :: <a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r f =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; k (f a) (m r)</li><li class="src short"><span class="keyword">class</span> Applicative f =&gt; <a href="#t:Settable">Settable</a> f <span class="keyword">where</span><ul class="subs"><li><a href="#v:untainted">untainted</a> :: f a -&gt; a</li><li><a href="#v:untainted-35-">untainted#</a> :: (a -&gt; f b) -&gt; a -&gt; b</li><li><a href="#v:tainted-35-">tainted#</a> :: (a -&gt; b) -&gt; a -&gt; f b</li></ul></li></ul></div><div id="interface"><h1 id="g:1">Getters
+</h1><div class="top"><p class="src"><span class="keyword">class</span> (Functor f, <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> f) =&gt; <a name="t:Gettable" class="def">Gettable</a> f <span class="keyword">where</span><a href="src/Control-Lens-Classes.html#Gettable" class="link">Source</a></p><div class="doc"><p>Generalizing <code>Const</code> so we can apply simple <code>Applicative</code>
+ transformations to it and so we can get nicer error messages
+</p><p>A <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> <code>Functor</code> ignores its argument, which it carries solely as a
+ phantom type parameter.
+</p><p>To ensure this, an instance of <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> is required to satisfy:
+</p><pre><code>id</code> = <code>fmap</code> f = <code><a href="Control-Lens-Classes.html#v:coerce">coerce</a></code></pre><p>Which is equivalent to making a <code><code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> f</code> an &quot;anyvariant&quot; functor.
+</p><p>Due to the structure of this library, if you built an illegal <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code>
+ instance that defined <code><code><a href="Control-Lens-Classes.html#v:coerce">coerce</a></code> = <code>undefined</code></code>, it would be possible to
+ produce code that would <code>unsafeCoerce</code>.
+</p><p>This would violate the promises of <code>SafeHaskell</code>.
+</p><p>That said, the existing instances are all safe. To verify that any
+ additional instances that *you* provide are safe, you must
+</p><pre> import Control.Lens.Unsafe
+</pre><p>and provide an instance of <code>Trustworthy</code> for your data type. That module
+ does not make <code>SafeHaskell</code> guarantees, so by doing so you've taken the
+ <code>SafeHaskell</code> proof obligation into your own hands.
+</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:coerce" class="def">coerce</a> :: f a -&gt; f b<a href="src/Control-Lens-Classes.html#coerce" class="link">Source</a></p><div class="doc"><p>Replace the phantom type argument.
+</p></div></div><div class="subs instances"><p id="control.i:Gettable" class="caption collapser" onclick="toggleSection('i:Gettable')">Instances</p><div id="section.i:Gettable" class="show"><table><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (Const r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (Backwards f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Functor f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g) =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (Compose f g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:noEffect" class="def">noEffect</a> :: (Applicative f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; f a<a href="src/Control-Lens-Classes.html#noEffect" class="link">Source</a></p><div class="doc"><p>The <code>mempty</code> equivalent for a <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> <code>Applicative</code> <code>Functor</code>.
+</p></div></div><h1 id="g:2">Actions
+</h1><div class="top"><p class="src"><span class="keyword">class</span> (Monad m, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; <a name="t:Effective" class="def">Effective</a> m r f | f -&gt; m r <span class="keyword">where</span><a href="src/Control-Lens-Classes.html#Effective" class="link">Source</a></p><div class="doc"><p>An <code><a href="Control-Lens-Classes.html#t:Effective">Effective</a></code> <code>Functor</code> ignores its argument and is isomorphic to a monad wrapped around a value.
+</p><p>That said, the monad is possibly rather unrelated to any <code>Applicative</code> structure.
+</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:effective" class="def">effective</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; k (m r) (f a)<a href="src/Control-Lens-Classes.html#effective" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:Effective" class="caption collapser" onclick="toggleSection('i:Effective')">Instances</p><div id="section.i:Effective" class="show"><table><tr><td class="src"><a href="Control-Lens-Classes.html#t:Effective">Effective</a> Identity r (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monad m =&gt; <a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r f =&gt; <a href="Control-Lens-Classes.html#t:Effective">Effective</a> m (Dual r) (Backwards f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:ineffective" class="def">ineffective</a> :: <a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r f =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; k (f a) (m r)<a href="src/Control-Lens-Classes.html#ineffective" class="link">Source</a></p><div class="doc"><p>A convenient antonym that is used internally.
+</p></div></div><h1 id="g:3">Setters
+</h1><div class="top"><p class="src"><span class="keyword">class</span> Applicative f =&gt; <a name="t:Settable" class="def">Settable</a> f <span class="keyword">where</span><a href="src/Control-Lens-Classes.html#Settable" class="link">Source</a></p><div class="doc"><p>Anything <code><a href="Control-Lens-Classes.html#t:Settable">Settable</a></code> must be isomorphic to the <code>Identity</code> <code>Functor</code>.
+</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:untainted" class="def">untainted</a> :: f a -&gt; a<a href="src/Control-Lens-Classes.html#untainted" class="link">Source</a></p><p class="src"><a name="v:untainted-35-" class="def">untainted#</a> :: (a -&gt; f b) -&gt; a -&gt; b<a href="src/Control-Lens-Classes.html#untainted%23" class="link">Source</a></p><p class="src"><a name="v:tainted-35-" class="def">tainted#</a> :: (a -&gt; b) -&gt; a -&gt; f b<a href="src/Control-Lens-Classes.html#tainted%23" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:Settable" class="caption collapser" onclick="toggleSection('i:Settable')">Instances</p><div id="section.i:Settable" class="show"><table><tr><td class="src"><a href="Control-Lens-Classes.html#t:Settable">Settable</a> Identity</td><td class="doc"><p>so you can pass our a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> into combinators from other lens libraries
+</p></td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Settable">Settable</a> <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Settable">Settable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Settable">Settable</a> (Backwards f)</td><td class="doc"><p><code><a href="Control-Lens-Fold.html#t:backwards">backwards</a></code>
+</p></td></tr><tr><td class="src">(<a href="Control-Lens-Classes.html#t:Settable">Settable</a> f, <a href="Control-Lens-Classes.html#t:Settable">Settable</a> g) =&gt; <a href="Control-Lens-Classes.html#t:Settable">Settable</a> (Compose f g)</td><td class="doc empty">&nbsp;</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.1</p></div></body></html>
View
2  Control-Lens-Combinators.html
@@ -1,7 +1,7 @@
<!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.Lens.Combinators</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-Lens-Combinators.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Combinators.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Combinators</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</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:-60--36--33--62-">(&lt;$!&gt;)</a> :: Monad m =&gt; (a -&gt; b) -&gt; m a -&gt; m b</li><li class="src short"><a href="#v:-60--36--33-">(&lt;$!)</a> :: Monad m =&gt; b -&gt; m a -&gt; m b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:-60--36--33--62-" class="def">(&lt;$!&gt;)</a> :: Monad m =&gt; (a -&gt; b) -&gt; m a -&gt; m b<a href="src/Control-Lens-Combinators.html#%3C%24%21%3E" class="link">Source</a></p><div class="doc"><p>A strict version of (<code><a href="Data-Functor.html#t:-60--36--62-">&lt;$&gt;</a></code>) for monads.
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Combinators.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Combinators</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</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:-60--36--33--62-">(&lt;$!&gt;)</a> :: Monad m =&gt; (a -&gt; b) -&gt; m a -&gt; m b</li><li class="src short"><a href="#v:-60--36--33-">(&lt;$!)</a> :: Monad m =&gt; b -&gt; m a -&gt; m b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:-60--36--33--62-" class="def">(&lt;$!&gt;)</a> :: Monad m =&gt; (a -&gt; b) -&gt; m a -&gt; m b<a href="src/Control-Lens-Combinators.html#%3C%24%21%3E" class="link">Source</a></p><div class="doc"><p>A strict version of (<code><a href="Data-Functor.html#t:-60--36--62-">&lt;$&gt;</a></code>) for monads.
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(+1) &lt;$!&gt; [1,2,3,4]
</code></strong>[2,3,4,5]
</pre></div></div><div class="top"><p class="src"><a name="v:-60--36--33-" class="def">(&lt;$!)</a> :: Monad m =&gt; b -&gt; m a -&gt; m b<a href="src/Control-Lens-Combinators.html#%3C%24%21" class="link">Source</a></p><div class="doc"><p>A strict version of (<code><a href="Data-Functor.html#t:-60--36-">&lt;$</a></code>) for monads.
View
14 Control-Lens-Fold.html
@@ -1,7 +1,7 @@
<!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.Lens.Fold</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-Lens-Fold.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Fold.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Fold</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Folds
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Fold.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Fold</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Folds
</a><ul><li><a href="#g:2">Building Folds
</a></li><li><a href="#g:3">Folding
</a></li></ul></li><li><a href="#g:4">Storing Folds
@@ -19,8 +19,8 @@
<code>Applicative</code> transformers.
</p><p>Everything you can do with a <code>Foldable</code> container, you can with with a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> and there are
combinators that generalize the usual <code>Foldable</code> operations here.
-</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Fold">Fold</a> s a = <span class="keyword">forall</span> f. (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><a href="#v:-94-..">(^..)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] s t a b -&gt; [a]</li><li class="src short"><a href="#v:-94--63-">(^?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; Maybe a</li><li class="src short"><a href="#v:-94--63--33-">(^?!)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; a</li><li class="src short"><a href="#v:-94--33--63-">(^!?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; a</li><li class="src short"><a href="#v:folding">folding</a> :: (Foldable f, Applicative g, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> g) =&gt; (s -&gt; f a) -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g s t a b</li><li class="src short"><a href="#v:folded">folded</a> :: Foldable f =&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> (f a) a</li><li class="src short"><a href="#v:unfolded">unfolded</a> :: (b -&gt; Maybe (a, b)) -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> b a</li><li class="src short"><a href="#v:iterated">iterated</a> :: (a -&gt; a) -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:filtered">filtered</a> :: Applicative f =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> f a a</li><li class="src short"><a href="#v:backwards">backwards</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (Backwards f) s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b</li><li class="src short"><a href="#v:repeated">repeated</a> :: <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:replicated">replicated</a> :: Int -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:cycled">cycled</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b</li><li class="src short"><a href="#v:takingWhile">takingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a</li><li class="src short"><a href="#v:droppingWhile">droppingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s, f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a</li><li class="src short"><a href="#v:foldMapOf">foldMapOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldOf">foldOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldrOf">foldrOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo r) s t a b -&gt; (a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldlOf">foldlOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo r)) s t a b -&gt; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:toListOf">toListOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo [a]) s t a b -&gt; s -&gt; [a]</li><li class="src short"><a href="#v:anyOf">anyOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:allOf">allOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:andOf">andOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t Bool b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:orOf">orOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t Bool b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:productOf">productOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Product a) s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:sumOf">sumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Sum a) s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:traverseOf_">traverseOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; (a -&gt; f r) -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:forOf_">forOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; s -&gt; (a -&gt; f r) -&gt; f ()</li><li class="src short"><a href="#v:sequenceAOf_">sequenceAOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t (f ()) b -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:mapMOf_">mapMOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; (a -&gt; m r) -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:forMOf_">forMOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; s -&gt; (a -&gt; m r) -&gt; m ()</li><li class="src short"><a href="#v:sequenceOf_">sequenceOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t (m a) b -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:asumOf">asumOf</a> :: Alternative f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f a)) s t (f a) b -&gt; s -&gt; f a</li><li class="src short"><a href="#v:msumOf">msumOf</a> :: MonadPlus m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (m a)) s t (m a) b -&gt; s -&gt; m a</li><li class="src short"><a href="#v:concatMapOf">concatMapOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [r] s t a b -&gt; (a -&gt; [r]) -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:concatOf">concatOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [r] s t [r] b -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:elemOf">elemOf</a> :: Eq a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t a b -&gt; a -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:notElemOf">notElemOf</a> :: Eq a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; a -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:lengthOf">lengthOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Sum Int) s t a b -&gt; s -&gt; Int</li><li class="src short"><a href="#v:nullOf">nullOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:headOf">headOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:lastOf">lastOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Last a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:maximumOf">maximumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Max">Max</a> a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:minimumOf">minimumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Min">Min</a> a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:maximumByOf">maximumByOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; Ordering) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:minimumByOf">minimumByOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; Ordering) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:findOf">findOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:foldrOf-39-">foldrOf'</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (r -&gt; r))) s t a b -&gt; (a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldlOf-39-">foldlOf'</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (r -&gt; r)) s t a b -&gt; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldr1Of">foldr1Of</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; a) -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldl1Of">foldl1Of</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (Maybe a))) s t a b -&gt; (a -&gt; a -&gt; a) -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldrMOf">foldrMOf</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (r -&gt; m r))) s t a b -&gt; (a -&gt; r -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:foldlMOf">foldlMOf</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (r -&gt; m r)) s t a b -&gt; (r -&gt; a -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedFold">ReifiedFold</a> s a = <a href="#v:ReifyFold">ReifyFold</a> {<ul class="subs"><li><a href="#v:reflectFold">reflectFold</a> :: <a href="Control-Lens-Fold.html#t:Fold">Fold</a> s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Folds
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Fold" class="def">Fold</a> s a = <span class="keyword">forall</span> f. (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Fold.html#Fold" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> describes how to retrieve multiple values in a way that can be composed
+</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Fold">Fold</a> s a = <span class="keyword">forall</span> f. (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><a href="#v:-94-..">(^..)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] s t a b -&gt; [a]</li><li class="src short"><a href="#v:-94--63-">(^?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; Maybe a</li><li class="src short"><a href="#v:-94--63--33-">(^?!)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; a</li><li class="src short"><a href="#v:-94--33--63-">(^!?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; a</li><li class="src short"><a href="#v:folding">folding</a> :: (Foldable f, Applicative g, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g) =&gt; (s -&gt; f a) -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g s t a b</li><li class="src short"><a href="#v:folded">folded</a> :: Foldable f =&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> (f a) a</li><li class="src short"><a href="#v:unfolded">unfolded</a> :: (b -&gt; Maybe (a, b)) -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> b a</li><li class="src short"><a href="#v:iterated">iterated</a> :: (a -&gt; a) -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:filtered">filtered</a> :: Applicative f =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> f a a</li><li class="src short"><a href="#v:backwards">backwards</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (Backwards f) s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b</li><li class="src short"><a href="#v:repeated">repeated</a> :: <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:replicated">replicated</a> :: Int -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:cycled">cycled</a> :: (Applicative f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b</li><li class="src short"><a href="#v:takingWhile">takingWhile</a> :: (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a</li><li class="src short"><a href="#v:droppingWhile">droppingWhile</a> :: (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s, f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a</li><li class="src short"><a href="#v:foldMapOf">foldMapOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldOf">foldOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldrOf">foldrOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo r) s t a b -&gt; (a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldlOf">foldlOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo r)) s t a b -&gt; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:toListOf">toListOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo [a]) s t a b -&gt; s -&gt; [a]</li><li class="src short"><a href="#v:anyOf">anyOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:allOf">allOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:andOf">andOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t Bool b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:orOf">orOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t Bool b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:productOf">productOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Product a) s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:sumOf">sumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Sum a) s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:traverseOf_">traverseOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; (a -&gt; f r) -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:forOf_">forOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; s -&gt; (a -&gt; f r) -&gt; f ()</li><li class="src short"><a href="#v:sequenceAOf_">sequenceAOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t (f ()) b -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:mapMOf_">mapMOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; (a -&gt; m r) -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:forMOf_">forMOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; s -&gt; (a -&gt; m r) -&gt; m ()</li><li class="src short"><a href="#v:sequenceOf_">sequenceOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t (m a) b -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:asumOf">asumOf</a> :: Alternative f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f a)) s t (f a) b -&gt; s -&gt; f a</li><li class="src short"><a href="#v:msumOf">msumOf</a> :: MonadPlus m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (m a)) s t (m a) b -&gt; s -&gt; m a</li><li class="src short"><a href="#v:concatMapOf">concatMapOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [r] s t a b -&gt; (a -&gt; [r]) -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:concatOf">concatOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [r] s t [r] b -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:elemOf">elemOf</a> :: Eq a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t a b -&gt; a -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:notElemOf">notElemOf</a> :: Eq a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; a -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:lengthOf">lengthOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Sum Int) s t a b -&gt; s -&gt; Int</li><li class="src short"><a href="#v:nullOf">nullOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:headOf">headOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:lastOf">lastOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Last a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:maximumOf">maximumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Max">Max</a> a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:minimumOf">minimumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Min">Min</a> a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:maximumByOf">maximumByOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; Ordering) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:minimumByOf">minimumByOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; Ordering) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:findOf">findOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:foldrOf-39-">foldrOf'</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (r -&gt; r))) s t a b -&gt; (a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldlOf-39-">foldlOf'</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (r -&gt; r)) s t a b -&gt; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldr1Of">foldr1Of</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; a) -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldl1Of">foldl1Of</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (Maybe a))) s t a b -&gt; (a -&gt; a -&gt; a) -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldrMOf">foldrMOf</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (r -&gt; m r))) s t a b -&gt; (a -&gt; r -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:foldlMOf">foldlMOf</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (r -&gt; m r)) s t a b -&gt; (r -&gt; a -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedFold">ReifiedFold</a> s a = <a href="#v:ReifyFold">ReifyFold</a> {<ul class="subs"><li><a href="#v:reflectFold">reflectFold</a> :: <a href="Control-Lens-Fold.html#t:Fold">Fold</a> s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Folds
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Fold" class="def">Fold</a> s a = <span class="keyword">forall</span> f. (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Fold.html#Fold" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> describes how to retrieve multiple values in a way that can be composed
with other lens-like constructions.
</p><p>A <code><code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s a</code> provides a structure with operations very similar to those of the <code>Foldable</code>
typeclass, see <code><a href="Control-Lens-Fold.html#v:foldMapOf">foldMapOf</a></code> and the other <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> combinators.
@@ -69,7 +69,7 @@
(<code><a href="Control-Lens-Fold.html#v:-94--33--63-">^!?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; a
(<code><a href="Control-Lens-Fold.html#v:-94--33--63-">^!?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s a -&gt; a
</pre></div></div><h2 id="g:2">Building Folds
-</h2><div class="top"><p class="src"><a name="v:folding" class="def">folding</a> :: (Foldable f, Applicative g, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> g) =&gt; (s -&gt; f a) -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g s t a b<a href="src/Control-Lens-Fold.html#folding" class="link">Source</a></p><div class="doc"><p>Obtain a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> by lifting an operation that returns a foldable result.
+</h2><div class="top"><p class="src"><a name="v:folding" class="def">folding</a> :: (Foldable f, Applicative g, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g) =&gt; (s -&gt; f a) -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g s t a b<a href="src/Control-Lens-Fold.html#folding" class="link">Source</a></p><div class="doc"><p>Obtain a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> by lifting an operation that returns a foldable result.
</p><p>This can be useful to lift operations from <code>Data.List</code> and elsewhere into a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:folded" class="def">folded</a> :: Foldable f =&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> (f a) a<a href="src/Control-Lens-Fold.html#folded" class="link">Source</a></p><div class="doc"><p>Obtain a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> from any <code>Foldable</code>.
</p></div></div><div class="top"><p class="src"><a name="v:unfolded" class="def">unfolded</a> :: (b -&gt; Maybe (a, b)) -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> b a<a href="src/Control-Lens-Fold.html#unfolded" class="link">Source</a></p><div class="doc"><p>Build a fold that unfolds its values from a seed.
@@ -85,13 +85,13 @@
</p><p>To change the direction of an <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code>, use <code><a href="Control-Lens-Isomorphic.html#t:from">from</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:repeated" class="def">repeated</a> :: <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a<a href="src/Control-Lens-Fold.html#repeated" class="link">Source</a></p><div class="doc"><p>Fold by repeating the input forever.
</p><pre><code>repeat</code> &#8801; <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code> <code><a href="Control-Lens-Fold.html#v:repeated">repeated</a></code></pre></div></div><div class="top"><p class="src"><a name="v:replicated" class="def">replicated</a> :: Int -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a<a href="src/Control-Lens-Fold.html#replicated" class="link">Source</a></p><div class="doc"><p>A fold that replicates its input <code>n</code> times.
-</p><pre><code>replicate</code> n &#8801; <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code> (<code><a href="Control-Lens-Fold.html#v:replicated">replicated</a></code> n)</pre></div></div><div class="top"><p class="src"><a name="v:cycled" class="def">cycled</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b<a href="src/Control-Lens-Fold.html#cycled" class="link">Source</a></p><div class="doc"><p>Transform a fold into a fold that loops over its elements over and over.
+</p><pre><code>replicate</code> n &#8801; <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code> (<code><a href="Control-Lens-Fold.html#v:replicated">replicated</a></code> n)</pre></div></div><div class="top"><p class="src"><a name="v:cycled" class="def">cycled</a> :: (Applicative f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b<a href="src/Control-Lens-Fold.html#cycled" class="link">Source</a></p><div class="doc"><p>Transform a fold into a fold that loops over its elements over and over.
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>take 6 $ toListOf (cycled traverse) [1,2,3]
</code></strong>[1,2,3,1,2,3]
-</pre></div></div><div class="top"><p class="src"><a name="v:takingWhile" class="def">takingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a<a href="src/Control-Lens-Fold.html#takingWhile" class="link">Source</a></p><div class="doc"><p>Obtain a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> by taking elements from another <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>, <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code>, <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> or <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> while a predicate holds.
+</pre></div></div><div class="top"><p class="src"><a name="v:takingWhile" class="def">takingWhile</a> :: (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a<a href="src/Control-Lens-Fold.html#takingWhile" class="link">Source</a></p><div class="doc"><p>Obtain a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> by taking elements from another <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>, <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code>, <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> or <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> while a predicate holds.
</p><pre><code>takeWhile</code> p &#8801; <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code> (<code><a href="Control-Lens-Fold.html#v:takingWhile">takingWhile</a></code> p <code><a href="Control-Lens-Fold.html#v:folded">folded</a></code>)</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>toListOf (takingWhile (&lt;=3) folded) [1..]
</code></strong>[1,2,3]
-</pre></div></div><div class="top"><p class="src"><a name="v:droppingWhile" class="def">droppingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s, f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a<a href="src/Control-Lens-Fold.html#droppingWhile" class="link">Source</a></p><div class="doc"><p>Obtain a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> by dropping elements from another <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>, <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code>, <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> or <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> while a predicate holds.
+</pre></div></div><div class="top"><p class="src"><a name="v:droppingWhile" class="def">droppingWhile</a> :: (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s, f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a<a href="src/Control-Lens-Fold.html#droppingWhile" class="link">Source</a></p><div class="doc"><p>Obtain a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> by dropping elements from another <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>, <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code>, <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> or <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> while a predicate holds.
</p><pre><code>dropWhile</code> p &#8801; <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code> (<code><a href="Control-Lens-Fold.html#v:droppingWhile">droppingWhile</a></code> p <code><a href="Control-Lens-Fold.html#v:folded">folded</a></code>)</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>toListOf (droppingWhile (&lt;=3) folded) [1..6]
</code></strong>[4,5,6]
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>toListOf (droppingWhile (&lt;=3) folded) [1,6,1]
View
21 Control-Lens-Getter.html
@@ -1,7 +1,7 @@
<!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.Lens.Getter</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-Lens-Getter.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Getter.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.Getter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Getters
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Getter.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.Getter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Getters
</a></li><li><a href="#g:2">Building Getters
</a></li><li><a href="#g:3">Combinators for Getters and Folds
</a></li><li><a href="#g:4">Storing Getters
@@ -18,7 +18,7 @@
in the opposite order.
</p><p>Since it is only a function, every <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> obviously only retrieves a
single value for a given input.
-</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Getter">Getter</a> s a = <span class="keyword">forall</span> f. <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><span class="keyword">type</span> <a href="#t:Getting">Getting</a> r s t a b = (a -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r b) -&gt; s -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r t</li><li class="src short"><a href="#v:to">to</a> :: (s -&gt; a) -&gt; <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</li><li class="src short"><a href="#v:-94-.">(^.)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; a</li><li class="src short"><a href="#v:-94--36-">(^$)</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:-38-">(&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:-94--38-">(^&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:view">view</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:views">views</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; s -&gt; r</li><li class="src short"><a href="#v:use">use</a> :: MonadState s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; m a</li><li class="src short"><a href="#v:uses">uses</a> :: MonadState s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; m r</li><li class="src short"><a href="#v:peruse">peruse</a> :: MonadReader s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; m a</li><li class="src short"><a href="#v:peruses">peruses</a> :: MonadReader s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; m r</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedGetter">ReifiedGetter</a> s a = <a href="#v:ReifyGetter">ReifyGetter</a> {<ul class="subs"><li><a href="#v:reflectGetter">reflectGetter</a> :: <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</li></ul>}</li><li class="src short"><span class="keyword">class</span> Functor f =&gt; <a href="#t:Gettable">Gettable</a> f </li><li class="src short"><span class="keyword">data</span> <a href="#t:Accessor">Accessor</a> r a</li></ul></div><div id="interface"><h1 id="g:1">Getters
+</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Getter">Getter</a> s a = <span class="keyword">forall</span> f. <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><span class="keyword">type</span> <a href="#t:Getting">Getting</a> r s t a b = (a -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r b) -&gt; s -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r t</li><li class="src short"><a href="#v:to">to</a> :: (s -&gt; a) -&gt; <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</li><li class="src short"><a href="#v:-94-.">(^.)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; a</li><li class="src short"><a href="#v:-94--36-">(^$)</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:-38-">(&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:-94--38-">(^&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:view">view</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:views">views</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; s -&gt; r</li><li class="src short"><a href="#v:use">use</a> :: MonadState s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; m a</li><li class="src short"><a href="#v:uses">uses</a> :: MonadState s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; m r</li><li class="src short"><a href="#v:peruse">peruse</a> :: MonadReader s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; m a</li><li class="src short"><a href="#v:peruses">peruses</a> :: MonadReader s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; m r</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedGetter">ReifiedGetter</a> s a = <a href="#v:ReifyGetter">ReifyGetter</a> {<ul class="subs"><li><a href="#v:reflectGetter">reflectGetter</a> :: <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</li></ul>}</li><li class="src short"><span class="keyword">class</span> (Functor f, <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> f) =&gt; <a href="#t:Gettable">Gettable</a> f </li><li class="src short"><span class="keyword">data</span> <a href="#t:Accessor">Accessor</a> r a</li></ul></div><div id="interface"><h1 id="g:1">Getters
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Getter" class="def">Getter</a> s a = <span class="keyword">forall</span> f. <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Getter.html#Getter" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> describes how to retrieve a single value in a way that can be
composed with other lens-like constructions.
</p><p>Unlike a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> is read-only. Since a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code>
@@ -161,12 +161,23 @@
<code><a href="Control-Lens-Getter.html#v:peruses">peruses</a></code> :: (<code>MonadReader</code> s m, <code>Monoid</code> a) =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s a -&gt; (a -&gt; r) -&gt; m r
</pre></div></div><h1 id="g:4">Storing Getters
</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedGetter" class="def">ReifiedGetter</a> s a <a href="src/Control-Lens-Getter.html#ReifiedGetter" class="link">Source</a></p><div class="doc"><p>Useful for storing getters in containers.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyGetter" class="def">ReifyGetter</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:reflectGetter" class="def">reflectGetter</a> :: <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">class</span> Functor f =&gt; <a name="t:Gettable" class="def">Gettable</a> f <a href="src/Control-Lens-Internal.html#Gettable" class="link">Source</a></p><div class="doc"><p>Generalizing <code>Const</code> so we can apply simple <code>Applicative</code>
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyGetter" class="def">ReifyGetter</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:reflectGetter" class="def">reflectGetter</a> :: <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">class</span> (Functor f, <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> f) =&gt; <a name="t:Gettable" class="def">Gettable</a> f <a href="src/Control-Lens-Classes.html#Gettable" class="link">Source</a></p><div class="doc"><p>Generalizing <code>Const</code> so we can apply simple <code>Applicative</code>
transformations to it and so we can get nicer error messages
</p><p>A <code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code> <code>Functor</code> ignores its argument, which it carries solely as a
phantom type parameter.
</p><p>To ensure this, an instance of <code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code> is required to satisfy:
-</p><pre><code>id</code> = <code>fmap</code> f = <code><a href="Control-Lens-Internal.html#v:coerce">coerce</a></code></pre></div><div class="subs instances"><p id="control.i:Gettable" class="caption collapser" onclick="toggleSection('i:Gettable')">Instances</p><div id="section.i:Gettable" class="show"><table><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Const r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Backwards f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Functor f, <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> g) =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Compose f g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> g =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EvilBazaar">EvilBazaar</a> g a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Accessor" class="def">Accessor</a> r a <a href="src/Control-Lens-Internal.html#Accessor" class="link">Source</a></p><div class="doc"><p>Used instead of <code>Const</code> to report
+</p><pre><code>id</code> = <code>fmap</code> f = <code><a href="Control-Lens-Classes.html#v:coerce">coerce</a></code></pre><p>Which is equivalent to making a <code><code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code> f</code> an &quot;anyvariant&quot; functor.
+</p><p>Due to the structure of this library, if you built an illegal <code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code>
+ instance that defined <code><code><a href="Control-Lens-Classes.html#v:coerce">coerce</a></code> = <code>undefined</code></code>, it would be possible to
+ produce code that would <code>unsafeCoerce</code>.
+</p><p>This would violate the promises of <code>SafeHaskell</code>.
+</p><p>That said, the existing instances are all safe. To verify that any
+ additional instances that *you* provide are safe, you must
+</p><pre> import Control.Lens.Unsafe
+</pre><p>and provide an instance of <code>Trustworthy</code> for your data type. That module
+ does not make <code>SafeHaskell</code> guarantees, so by doing so you've taken the
+ <code>SafeHaskell</code> proof obligation into your own hands.
+</p></div><div class="subs instances"><p id="control.i:Gettable" class="caption collapser" onclick="toggleSection('i:Gettable')">Instances</p><div id="section.i:Gettable" class="show"><table><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Const r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Backwards f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Functor f, <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> g) =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Compose f g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> g =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Accessor" class="def">Accessor</a> r a <a href="src/Control-Lens-Internal.html#Accessor" class="link">Source</a></p><div class="doc"><p>Used instead of <code>Const</code> to report
</p><pre>No instance of (<code><a href="Control-Lens-Setter.html#t:Settable">Settable</a></code> <code><a href="Control-Lens-Getter.html#t:Accessor">Accessor</a></code>)</pre><p>when the user attempts to misuse a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> as a
<code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code>, rather than a monolithic unification error.
-</p></div><div class="subs instances"><p id="control.i:Accessor" class="caption collapser" onclick="toggleSection('i:Accessor')">Instances</p><div id="section.i:Accessor" class="show"><table><tr><td class="src"><a href="Control-Lens-Internal.html#t:Effective">Effective</a> Identity r (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monoid r =&gt; Applicative (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> ((-&gt;) b) ((-&gt;) a) <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> b a</td><td class="doc"><pre><code><a href="Control-Lens-Zoom.html#v:magnify">magnify</a></code> = <code><a href="Control-Lens-Getter.html#v:views">views</a></code></pre></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.1</p></div></body></html>
+</p></div><div class="subs instances"><p id="control.i:Accessor" class="caption collapser" onclick="toggleSection('i:Accessor')">Instances</p><div id="section.i:Accessor" class="show"><table><tr><td class="src"><a href="Control-Lens-Classes.html#t:Effective">Effective</a> Identity r (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monoid r =&gt; Applicative (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> ((-&gt;) b) ((-&gt;) a) <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> b a</td><td class="doc"><pre><code><a href="Control-Lens-Zoom.html#v:magnify">magnify</a></code> = <code><a href="Control-Lens-Getter.html#v:views">views</a></code></pre></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.1</p></div></body></html>
View
2  Control-Lens-Indexed.html
@@ -1,7 +1,7 @@
<!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.Lens.Indexed</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-Lens-Indexed.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Indexed.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Indexed</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Functions
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Indexed.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Indexed</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Functions
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Combinators for working with <code><a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a></code> functions.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> <a href="#t:Indexed">Indexed</a> i k <span class="keyword">where</span><ul class="subs"><li><a href="#v:index">index</a> :: ((i -&gt; a) -&gt; b) -&gt; k a b</li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:Indexable">Indexable</a> i a b = <span class="keyword">forall</span> k. <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; k a b</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Index">Index</a> i a b = <a href="#v:Index">Index</a> {<ul class="subs"><li><a href="#v:withIndex">withIndex</a> :: (i -&gt; a) -&gt; b</li></ul>}</li><li class="src short"><a href="#v:-60-.-62-">(&lt;.&gt;)</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> (i, j) k =&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i b c -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> j a b -&gt; k a c</li><li class="src short"><a href="#v:-60-.">(&lt;.)</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i b c -&gt; (a -&gt; b) -&gt; k a c</li><li class="src short"><a href="#v:.-62-">(.&gt;)</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; (b -&gt; c) -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i a b -&gt; k a c</li><li class="src short"><a href="#v:icompose">icompose</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> k r =&gt; (i -&gt; j -&gt; k) -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i b c -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> j a b -&gt; r a c</li><li class="src short"><a href="#v:reindex">reindex</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> j k =&gt; (i -&gt; j) -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i a b -&gt; k a b</li><li class="src short"><a href="#v:indexed">indexed</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> Int k =&gt; ((a -&gt; <a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f b) -&gt; s -&gt; <a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f t) -&gt; k (a -&gt; f b) (s -&gt; f t)</li></ul></div><div id="interface"><h1 id="g:1">Indexed Functions
</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Indexed" class="def">Indexed</a> i k <span class="keyword">where</span><a href="src/Control-Lens-Indexed.html#Indexed" class="link">Source</a></p><div class="doc"><p>Permit overloading of function application for things that also admit a notion of a key or index.
View
12 Control-Lens-IndexedFold.html
@@ -1,13 +1,13 @@
<!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.Lens.IndexedFold</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-Lens-IndexedFold.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedFold.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedFold</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Folds
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedFold.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedFold</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Folds
</a></li><li><a href="#g:2">Consuming Indexed Folds
</a></li><li><a href="#g:3">Converting to Folds
</a></li><li><a href="#g:4">Building Indexed Folds
</a></li><li><a href="#g:5">Storing Indexed Folds
-</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedFold">IndexedFold</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><a href="#v:ifoldMapOf">ifoldMapOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i m s t a b -&gt; (i -&gt; a -&gt; m) -&gt; s -&gt; m</li><li class="src short"><a href="#v:ifoldrOf">ifoldrOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo r) s t a b -&gt; (i -&gt; a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ifoldlOf">ifoldlOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Dual (Endo r)) s t a b -&gt; (i -&gt; r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ianyOf">ianyOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i Any s t a b -&gt; (i -&gt; a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:iallOf">iallOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i All s t a b -&gt; (i -&gt; a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:itraverseOf_">itraverseOf_</a> :: Functor f =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; (i -&gt; a -&gt; f r) -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:iforOf_">iforOf_</a> :: Functor f =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; s -&gt; (i -&gt; a -&gt; f r) -&gt; f ()</li><li class="src short"><a href="#v:imapMOf_">imapMOf_</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; (i -&gt; a -&gt; m r) -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:iforMOf_">iforMOf_</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; s -&gt; (i -&gt; a -&gt; m r) -&gt; m ()</li><li class="src short"><a href="#v:iconcatMapOf">iconcatMapOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [r] s t a b -&gt; (i -&gt; a -&gt; [r]) -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:ifindOf">ifindOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (First (i, a)) s t a b -&gt; (i -&gt; a -&gt; Bool) -&gt; s -&gt; Maybe (i, a)</li><li class="src short"><a href="#v:ifoldrOf-39-">ifoldrOf'</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Dual (Endo (r -&gt; r))) s t a b -&gt; (i -&gt; a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ifoldlOf-39-">ifoldlOf'</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (r -&gt; r)) s t a b -&gt; (i -&gt; r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ifoldrMOf">ifoldrMOf</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Dual (Endo (r -&gt; m r))) s t a b -&gt; (i -&gt; a -&gt; r -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:ifoldlMOf">ifoldlMOf</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (r -&gt; m r)) s t a b -&gt; (i -&gt; r -&gt; a -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:itoListOf">itoListOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s t a b -&gt; s -&gt; [(i, a)]</li><li class="src short"><a href="#v:withIndicesOf">withIndicesOf</a> :: Functor f =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t (i, a) (j, b)</li><li class="src short"><a href="#v:indicesOf">indicesOf</a> :: <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t i j</li><li class="src short"><a href="#v:ifiltering">ifiltering</a> :: (Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; f a) (s -&gt; f t) -&gt; k (a -&gt; f a) (s -&gt; f t)</li><li class="src short"><a href="#v:ibackwards">ibackwards</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; Backwards f b) (s -&gt; Backwards f t) -&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:itakingWhile">itakingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><a href="#v:idroppingWhile">idroppingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s, f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedFold">ReifiedIndexedFold</a> i s a = <a href="#v:ReifyIndexedFold">ReifyIndexedFold</a> {<ul class="subs"><li><a href="#v:reflectIndexedFold">reflectIndexedFold</a> :: <a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a> i s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Indexed Folds
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedFold" class="def">IndexedFold</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#IndexedFold" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> is a valid <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>.
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedFold">IndexedFold</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><a href="#v:ifoldMapOf">ifoldMapOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i m s t a b -&gt; (i -&gt; a -&gt; m) -&gt; s -&gt; m</li><li class="src short"><a href="#v:ifoldrOf">ifoldrOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo r) s t a b -&gt; (i -&gt; a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ifoldlOf">ifoldlOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Dual (Endo r)) s t a b -&gt; (i -&gt; r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ianyOf">ianyOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i Any s t a b -&gt; (i -&gt; a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:iallOf">iallOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i All s t a b -&gt; (i -&gt; a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:itraverseOf_">itraverseOf_</a> :: Functor f =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; (i -&gt; a -&gt; f r) -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:iforOf_">iforOf_</a> :: Functor f =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; s -&gt; (i -&gt; a -&gt; f r) -&gt; f ()</li><li class="src short"><a href="#v:imapMOf_">imapMOf_</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; (i -&gt; a -&gt; m r) -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:iforMOf_">iforMOf_</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; s -&gt; (i -&gt; a -&gt; m r) -&gt; m ()</li><li class="src short"><a href="#v:iconcatMapOf">iconcatMapOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [r] s t a b -&gt; (i -&gt; a -&gt; [r]) -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:ifindOf">ifindOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (First (i, a)) s t a b -&gt; (i -&gt; a -&gt; Bool) -&gt; s -&gt; Maybe (i, a)</li><li class="src short"><a href="#v:ifoldrOf-39-">ifoldrOf'</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Dual (Endo (r -&gt; r))) s t a b -&gt; (i -&gt; a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ifoldlOf-39-">ifoldlOf'</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (r -&gt; r)) s t a b -&gt; (i -&gt; r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ifoldrMOf">ifoldrMOf</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Dual (Endo (r -&gt; m r))) s t a b -&gt; (i -&gt; a -&gt; r -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:ifoldlMOf">ifoldlMOf</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (r -&gt; m r)) s t a b -&gt; (i -&gt; r -&gt; a -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:itoListOf">itoListOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s t a b -&gt; s -&gt; [(i, a)]</li><li class="src short"><a href="#v:withIndicesOf">withIndicesOf</a> :: Functor f =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t (i, a) (j, b)</li><li class="src short"><a href="#v:indicesOf">indicesOf</a> :: <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t i j</li><li class="src short"><a href="#v:ifiltering">ifiltering</a> :: (Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; f a) (s -&gt; f t) -&gt; k (a -&gt; f a) (s -&gt; f t)</li><li class="src short"><a href="#v:ibackwards">ibackwards</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; Backwards f b) (s -&gt; Backwards f t) -&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:itakingWhile">itakingWhile</a> :: (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><a href="#v:idroppingWhile">idroppingWhile</a> :: (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s, f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedFold">ReifiedIndexedFold</a> i s a = <a href="#v:ReifyIndexedFold">ReifyIndexedFold</a> {<ul class="subs"><li><a href="#v:reflectIndexedFold">reflectIndexedFold</a> :: <a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a> i s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Indexed Folds
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedFold" class="def">IndexedFold</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#IndexedFold" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> is a valid <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>.
</p></div></div><h1 id="g:2">Consuming Indexed Folds
</h1><div class="top"><p class="src"><a name="v:ifoldMapOf" class="def">ifoldMapOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i m s t a b -&gt; (i -&gt; a -&gt; m) -&gt; s -&gt; m<a href="src/Control-Lens-IndexedFold.html#ifoldMapOf" class="link">Source</a></p><div class="doc"><p>Fold an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> by mapping indices and values to an arbitrary <code>Monoid</code> with access
to the index <code>i</code>.
@@ -148,7 +148,7 @@
</p><pre>
<code><a href="Control-Lens-IndexedFold.html#v:withIndicesOf">withIndicesOf</a></code> :: <code>IndexedTraversal</code> i s t a b -&gt; <code>Traversal</code> s t (i, a) (j, b)
</pre><p>Change made to the indices will be discarded.
-</p></div></div><div class="top"><p class="src"><a name="v:indicesOf" class="def">indicesOf</a> :: <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t i j<a href="src/Control-Lens-IndexedFold.html#indicesOf" class="link">Source</a></p><div class="doc"><p>Transform an indexed fold into a fold of the indices.
+</p></div></div><div class="top"><p class="src"><a name="v:indicesOf" class="def">indicesOf</a> :: <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t i j<a href="src/Control-Lens-IndexedFold.html#indicesOf" class="link">Source</a></p><div class="doc"><p>Transform an indexed fold into a fold of the indices.
</p><pre>
<code><a href="Control-Lens-IndexedFold.html#v:indicesOf">indicesOf</a></code> :: <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> i s a -&gt; <code>Fold</code> s i
<code><a href="Control-Lens-IndexedFold.html#v:indicesOf">indicesOf</a></code> :: <code>SimpleIndexedLens</code> i s a -&gt; <code>Getter</code> s i
@@ -159,8 +159,8 @@
</p><p>See <code>filtered</code> for a related counter-example.
</p></div></div><div class="top"><p class="src"><a name="v:ibackwards" class="def">ibackwards</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; Backwards f b) (s -&gt; Backwards f t) -&gt; k (a -&gt; f b) (s -&gt; f t)<a href="src/Control-Lens-IndexedFold.html#ibackwards" class="link">Source</a></p><div class="doc"><p>Reverse the order of the elements of an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code>.
This has no effect on an <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code>, or <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code>.
-</p></div></div><div class="top"><p class="src"><a name="v:itakingWhile" class="def">itakingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#itakingWhile" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by taking elements from another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> while a predicate holds.
-</p></div></div><div class="top"><p class="src"><a name="v:idroppingWhile" class="def">idroppingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s, f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#idroppingWhile" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by dropping elements from another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> while a predicate holds.
+</p></div></div><div class="top"><p class="src"><a name="v:itakingWhile" class="def">itakingWhile</a> :: (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#itakingWhile" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by taking elements from another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> while a predicate holds.
+</p></div></div><div class="top"><p class="src"><a name="v:idroppingWhile" class="def">idroppingWhile</a> :: (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s, f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#idroppingWhile" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by dropping elements from another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> while a predicate holds.
</p></div></div><h1 id="g:5">Storing Indexed Folds
</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedIndexedFold" class="def">ReifiedIndexedFold</a> i s a <a href="src/Control-Lens-IndexedFold.html#ReifiedIndexedFold" class="link">Source</a></p><div class="doc"><p>Useful for storage.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyIndexedFold" class="def">ReifyIndexedFold</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:reflectIndexedFold" class="def">reflectIndexedFold</a> :: <a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a> i s a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>
View
6 Control-Lens-IndexedGetter.html
@@ -1,9 +1,9 @@
<!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.Lens.IndexedGetter</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-Lens-IndexedGetter.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedGetter.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedGetter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Folds
-</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedGetter">IndexedGetter</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedGetting">IndexedGetting</a> i m s t a b = <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m b) (s -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m t)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedGetter">ReifiedIndexedGetter</a> i s a = <a href="#v:ReifyIndexedGetter">ReifyIndexedGetter</a> {<ul class="subs"><li><a href="#v:reflectIndexedGetter">reflectIndexedGetter</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a> i s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Indexed Folds
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedGetter" class="def">IndexedGetter</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedGetter.html#IndexedGetter" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> is a valid <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> and <code>Getter</code>.
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedGetter.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedGetter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Folds
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedGetter">IndexedGetter</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedGetting">IndexedGetting</a> i m s t a b = <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m b) (s -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m t)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedGetter">ReifiedIndexedGetter</a> i s a = <a href="#v:ReifyIndexedGetter">ReifyIndexedGetter</a> {<ul class="subs"><li><a href="#v:reflectIndexedGetter">reflectIndexedGetter</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a> i s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Indexed Folds
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedGetter" class="def">IndexedGetter</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedGetter.html#IndexedGetter" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> is a valid <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> and <code>Getter</code>.
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedGetting" class="def">IndexedGetting</a> i m s t a b = <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m b) (s -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m t)<a href="src/Control-Lens-IndexedGetter.html#IndexedGetting" class="link">Source</a></p><div class="doc"><p>Used to consume an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>.
</p></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedIndexedGetter" class="def">ReifiedIndexedGetter</a> i s a <a href="src/Control-Lens-IndexedGetter.html#ReifiedIndexedGetter" class="link">Source</a></p><div class="doc"><p>Useful for storage.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyIndexedGetter" class="def">ReifyIndexedGetter</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:reflectIndexedGetter" class="def">reflectIndexedGetter</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a> i s a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>
View
2  Control-Lens-IndexedLens.html
@@ -1,7 +1,7 @@
<!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.Lens.IndexedLens</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-Lens-IndexedLens.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedLens.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.IndexedLens</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Lenses
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedLens.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.IndexedLens</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Lenses
</a></li><li><a href="#g:2">Common Indexed Lenses
</a></li><li><a href="#g:3">Indexed Lens Combinators
</a></li><li><a href="#g:4">Storing Indexed Lenses
View
6 Control-Lens-IndexedSetter.html
@@ -1,11 +1,11 @@
<!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.Lens.IndexedSetter</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-Lens-IndexedSetter.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedSetter.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedSetter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Setter
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedSetter.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedSetter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Setter
</a></li><li><a href="#g:2">Storing Indexed Setters
</a></li><li><a href="#g:3">Simple
-</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedSetter">IndexedSetter</a> i s t a b = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Settable">Settable</a> f) =&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:imapOf">imapOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:iover">iover</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:isets">isets</a> :: ((i -&gt; a -&gt; b) -&gt; s -&gt; t) -&gt; <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s t a b</li><li class="src short"><a href="#v:-37--64--126-">(%@~)</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:-37--64--61-">(%@=)</a> :: MonadState s m =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m ()</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i s t a b = <a href="#v:ReifyIndexedSetter">ReifyIndexedSetter</a> {<ul class="subs"><li><a href="#v:reflectIndexedSetter">reflectIndexedSetter</a> :: <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s t a b</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIndexedSetter">SimpleIndexedSetter</a> i s a = <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIndexedSetter">SimpleReifiedIndexedSetter</a> i s a = <a href="Control-Lens-IndexedSetter.html#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i s s a a</li></ul></div><div id="interface"><h1 id="g:1">Indexed Setter
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedSetter" class="def">IndexedSetter</a> i s t a b = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Settable">Settable</a> f) =&gt; k (a -&gt; f b) (s -&gt; f t)<a href="src/Control-Lens-IndexedSetter.html#IndexedSetter" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> is a valid <code>Setter</code>
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedSetter">IndexedSetter</a> i s t a b = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Classes.html#t:Settable">Settable</a> f) =&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:imapOf">imapOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:iover">iover</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:isets">isets</a> :: ((i -&gt; a -&gt; b) -&gt; s -&gt; t) -&gt; <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s t a b</li><li class="src short"><a href="#v:-37--64--126-">(%@~)</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:-37--64--61-">(%@=)</a> :: MonadState s m =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m ()</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i s t a b = <a href="#v:ReifyIndexedSetter">ReifyIndexedSetter</a> {<ul class="subs"><li><a href="#v:reflectIndexedSetter">reflectIndexedSetter</a> :: <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s t a b</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIndexedSetter">SimpleIndexedSetter</a> i s a = <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIndexedSetter">SimpleReifiedIndexedSetter</a> i s a = <a href="Control-Lens-IndexedSetter.html#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i s s a a</li></ul></div><div id="interface"><h1 id="g:1">Indexed Setter
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedSetter" class="def">IndexedSetter</a> i s t a b = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Classes.html#t:Settable">Settable</a> f) =&gt; k (a -&gt; f b) (s -&gt; f t)<a href="src/Control-Lens-IndexedSetter.html#IndexedSetter" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> is a valid <code>Setter</code>
</p><p>The <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> laws are still required to hold.
</p></div></div><div class="top"><p class="src"><a name="v:imapOf" class="def">imapOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t<a href="src/Control-Lens-IndexedSetter.html#imapOf" class="link">Source</a></p><div class="doc"><p>Map with index.
</p><p>When you do not need access to the index, then <code>mapOf</code> is more liberal in what it can accept.
View
2  Control-Lens-IndexedTraversal.html
@@ -1,7 +1,7 @@
<!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.Lens.IndexedTraversal</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-Lens-IndexedTraversal.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedTraversal.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.IndexedTraversal</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Traversals
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedTraversal.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.IndexedTraversal</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Traversals
</a></li><li><a href="#g:2">Common Indexed Traversals
</a></li><li><a href="#g:3">Indexed Traversal Combinators
</a></li><li><a href="#g:4">Storing Indexed Traversals
View
56 Control-Lens-Internal.html
@@ -1,36 +1,21 @@
<!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.Lens.Internal</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-Lens-Internal.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Internal.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.Internal</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Internal Classes
-</a></li><li><a href="#g:2">Internal Types
-</a></li><li><a href="#g:3">Evil Internal Types
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Internal.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.Internal</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Internal Types
+</a></li><li><a href="#g:2">Hidden implementations
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>These are some of the explicit Functor instances that leak into the
type signatures of Control.Lens. You shouldn't need to import this
module directly, unless you are coming up with a whole new kind of
&quot;Family&quot; and need to add instances.
-</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> Functor f =&gt; <a href="#t:Gettable">Gettable</a> f <span class="keyword">where</span><ul class="subs"><li><a href="#v:coerce">coerce</a> :: f a -&gt; f b</li></ul></li><li class="src short"><span class="keyword">class</span> (Monad m, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; <a href="#t:Effective">Effective</a> m r f | f -&gt; m r <span class="keyword">where</span><ul class="subs"><li><a href="#v:effective">effective</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; k (m r) (f a)</li></ul></li><li class="src short"><a href="#v:ineffective">ineffective</a> :: <a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; k (f a) (m r)</li><li class="src short"><a href="#v:noEffect">noEffect</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; f a</li><li class="src short"><span class="keyword">class</span> Applicative f =&gt; <a href="#t:Settable">Settable</a> f <span class="keyword">where</span><ul class="subs"><li><a href="#v:untainted">untainted</a> :: f a -&gt; a</li><li><a href="#v:untainted-35-">untainted#</a> :: (a -&gt; f b) -&gt; a -&gt; b</li><li><a href="#v:tainted-35-">tainted#</a> :: (a -&gt; b) -&gt; a -&gt; f b</li></ul></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:May">May</a> a = <a href="#v:May">May</a> {<ul class="subs"><li><a href="#v:getMay">getMay</a> :: Maybe a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Folding">Folding</a> f a = <a href="#v:Folding">Folding</a> {<ul class="subs"><li><a href="#v:getFolding">getFolding</a> :: f a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Effect">Effect</a> m r a = <a href="#v:Effect">Effect</a> {<ul class="subs"><li><a href="#v:getEffect">getEffect</a> :: m r</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:EffectRWS">EffectRWS</a> w st m s a = <a href="#v:EffectRWS">EffectRWS</a> {<ul class="subs"><li><a href="#v:getEffectRWS">getEffectRWS</a> :: st -&gt; m (s, st, w)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Accessor">Accessor</a> r a = <a href="#v:Accessor">Accessor</a> {<ul class="subs"><li><a href="#v:runAccessor">runAccessor</a> :: r</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Err">Err</a> e a = <a href="#v:Err">Err</a> {<ul class="subs"><li><a href="#v:getErr">getErr</a> :: Either e a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Traversed">Traversed</a> f = <a href="#v:Traversed">Traversed</a> {<ul class="subs"><li><a href="#v:getTraversed">getTraversed</a> :: f ()</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Sequenced">Sequenced</a> m = <a href="#v:Sequenced">Sequenced</a> {<ul class="subs"><li><a href="#v:getSequenced">getSequenced</a> :: m ()</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Focusing">Focusing</a> m s a = <a href="#v:Focusing">Focusing</a> {<ul class="subs"><li><a href="#v:unfocusing">unfocusing</a> :: m (s, a)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingWith">FocusingWith</a> w m s a = <a href="#v:FocusingWith">FocusingWith</a> {<ul class="subs"><li><a href="#v:unfocusingWith">unfocusingWith</a> :: m (s, a, w)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingPlus">FocusingPlus</a> w k s a = <a href="#v:FocusingPlus">FocusingPlus</a> {<ul class="subs"><li><a href="#v:unfocusingPlus">unfocusingPlus</a> :: k (s, w) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingOn">FocusingOn</a> f k s a = <a href="#v:FocusingOn">FocusingOn</a> {<ul class="subs"><li><a href="#v:unfocusingOn">unfocusingOn</a> :: k (f s) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingMay">FocusingMay</a> k s a = <a href="#v:FocusingMay">FocusingMay</a> {<ul class="subs"><li><a href="#v:unfocusingMay">unfocusingMay</a> :: k (<a href="Control-Lens-Internal.html#t:May">May</a> s) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingErr">FocusingErr</a> e k s a = <a href="#v:FocusingErr">FocusingErr</a> {<ul class="subs"><li><a href="#v:unfocusingErr">unfocusingErr</a> :: k (<a href="Control-Lens-Internal.html#t:Err">Err</a> e s) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Mutator">Mutator</a> a = <a href="#v:Mutator">Mutator</a> {<ul class="subs"><li><a href="#v:runMutator">runMutator</a> :: a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Bazaar">Bazaar</a> a b t = <a href="#v:Bazaar">Bazaar</a> {<ul class="subs"><li><a href="#v:runBazaar">runBazaar</a> :: <span class="keyword">forall</span> f. Applicative f =&gt; (a -&gt; f b) -&gt; f t</li></ul>}</li><li class="src short"><a href="#v:bazaar">bazaar</a> :: Applicative f =&gt; (a -&gt; f b) -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b t -&gt; f t</li><li class="src short"><a href="#v:duplicateBazaar">duplicateBazaar</a> :: <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a c t -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> b c t)</li><li class="src short"><a href="#v:sell">sell</a> :: a -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b b</li><li class="src short"><span class="keyword">data</span> <a href="#t:Context">Context</a> a b t = <a href="#v:Context">Context</a> (b -&gt; t) a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Max">Max</a> a<ul class="subs"><li>= <a href="#v:NoMax">NoMax</a> </li><li>| <a href="#v:Max">Max</a> a </li></ul></li><li class="src short"><a href="#v:getMax">getMax</a> :: <a href="Control-Lens-Internal.html#t:Max">Max</a> a -&gt; Maybe a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Min">Min</a> a<ul class="subs"><li>= <a href="#v:NoMin">NoMin</a> </li><li>| <a href="#v:Min">Min</a> a </li></ul></li><li class="src short"><a href="#v:getMin">getMin</a> :: <a href="Control-Lens-Internal.html#t:Min">Min</a> a -&gt; Maybe a</li><li class="src short"><span class="keyword">data</span> <a href="#t:ElementOfResult">ElementOfResult</a> f a = <a href="#v:Searching">Searching</a> Int a (Maybe (f a))</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ElementOf">ElementOf</a> f a = <a href="#v:ElementOf">ElementOf</a> {<ul class="subs"><li><a href="#v:getElementOf">getElementOf</a> :: Int -&gt; <a href="Control-Lens-Internal.html#t:ElementOfResult">ElementOfResult</a> f a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Indexing">Indexing</a> f a = <a href="#v:Indexing">Indexing</a> {<ul class="subs"><li><a href="#v:runIndexing">runIndexing</a> :: Int -&gt; (f a, Int)</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:Level">Level</a> a = <a href="#v:Level">Level</a> !Int [a] a [a]</li><li class="src short"><a href="#v:levelWidth">levelWidth</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; Int</li><li class="src short"><a href="#v:leftLevel">leftLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; Maybe (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)</li><li class="src short"><a href="#v:left1Level">left1Level</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:leftmostLevel">leftmostLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:rightmostLevel">rightmostLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:rightLevel">rightLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; Maybe (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)</li><li class="src short"><a href="#v:right1Level">right1Level</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:focusLevel">focusLevel</a> :: Functor f =&gt; (a -&gt; f a) -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; f (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)</li><li class="src short"><a href="#v:rezipLevel">rezipLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; NonEmpty a</li><li class="src short"><span class="keyword">data</span> <a href="#t:EvilBazaar">EvilBazaar</a> g a b s</li></ul></div><div id="interface"><h1 id="g:1">Internal Classes
-</h1><div class="top"><p class="src"><span class="keyword">class</span> Functor f =&gt; <a name="t:Gettable" class="def">Gettable</a> f <span class="keyword">where</span><a href="src/Control-Lens-Internal.html#Gettable" class="link">Source</a></p><div class="doc"><p>Generalizing <code>Const</code> so we can apply simple <code>Applicative</code>
- transformations to it and so we can get nicer error messages
-</p><p>A <code><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a></code> <code>Functor</code> ignores its argument, which it carries solely as a
- phantom type parameter.
-</p><p>To ensure this, an instance of <code><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a></code> is required to satisfy:
-</p><pre><code>id</code> = <code>fmap</code> f = <code><a href="Control-Lens-Internal.html#v:coerce">coerce</a></code></pre></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:coerce" class="def">coerce</a> :: f a -&gt; f b<a href="src/Control-Lens-Internal.html#coerce" class="link">Source</a></p><div class="doc"><p>Replace the phantom type argument.
-</p></div></div><div class="subs instances"><p id="control.i:Gettable" class="caption collapser" onclick="toggleSection('i:Gettable')">Instances</p><div id="section.i:Gettable" class="show"><table><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (Const r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (Backwards f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Functor f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> g) =&gt; <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (Compose f g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> g =&gt; <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EvilBazaar">EvilBazaar</a> g a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (Monad m, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; <a name="t:Effective" class="def">Effective</a> m r f | f -&gt; m r <span class="keyword">where</span><a href="src/Control-Lens-Internal.html#Effective" class="link">Source</a></p><div class="doc"><p>An <code><a href="Control-Lens-Internal.html#t:Effective">Effective</a></code> <code>Functor</code> ignores its argument and is isomorphic to a monad wrapped around a value.
-</p><p>That said, the monad is possibly rather unrelated to any <code>Applicative</code> structure.
-</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:effective" class="def">effective</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; k (m r) (f a)<a href="src/Control-Lens-Internal.html#effective" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:Effective" class="caption collapser" onclick="toggleSection('i:Effective')">Instances</p><div id="section.i:Effective" class="show"><table><tr><td class="src"><a href="Control-Lens-Internal.html#t:Effective">Effective</a> Identity r (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monad m =&gt; <a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f =&gt; <a href="Control-Lens-Internal.html#t:Effective">Effective</a> m (Dual r) (Backwards f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:ineffective" class="def">ineffective</a> :: <a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; k (f a) (m r)<a href="src/Control-Lens-Internal.html#ineffective" class="link">Source</a></p><div class="doc"><p>A convenient antonym that is used internally.
-</p></div></div><div class="top"><p class="src"><a name="v:noEffect" class="def">noEffect</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; f a<a href="src/Control-Lens-Internal.html#noEffect" class="link">Source</a></p><div class="doc"><p>The <code>mempty</code> equivalent for a <code><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a></code> <code>Applicative</code> <code>Functor</code>.
-</p></div></div><div class="top"><p class="src"><span class="keyword">class</span> Applicative f =&gt; <a name="t:Settable" class="def">Settable</a> f <span class="keyword">where</span><a href="src/Control-Lens-Internal.html#Settable" class="link">Source</a></p><div class="doc"><p>Anything <code><a href="Control-Lens-Internal.html#t:Settable">Settable</a></code> must be isomorphic to the <code>Identity</code> <code>Functor</code>.
-</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:untainted" class="def">untainted</a> :: f a -&gt; a<a href="src/Control-Lens-Internal.html#untainted" class="link">Source</a></p><p class="src"><a name="v:untainted-35-" class="def">untainted#</a> :: (a -&gt; f b) -&gt; a -&gt; b<a href="src/Control-Lens-Internal.html#untainted%23" class="link">Source</a></p><p class="src"><a name="v:tainted-35-" class="def">tainted#</a> :: (a -&gt; b) -&gt; a -&gt; f b<a href="src/Control-Lens-Internal.html#tainted%23" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:Settable" class="caption collapser" onclick="toggleSection('i:Settable')">Instances</p><div id="section.i:Settable" class="show"><table><tr><td class="src"><a href="Control-Lens-Internal.html#t:Settable">Settable</a> Identity</td><td class="doc"><p>so you can pass our a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> into combinators from other lens libraries
-</p></td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Settable">Settable</a> <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Settable">Settable</a> f =&gt; <a href="Control-Lens-Internal.html#t:Settable">Settable</a> (Backwards f)</td><td class="doc"><p><code><a href="Control-Lens-Fold.html#t:backwards">backwards</a></code>
-</p></td></tr><tr><td class="src">(<a href="Control-Lens-Internal.html#t:Settable">Settable</a> f, <a href="Control-Lens-Internal.html#t:Settable">Settable</a> g) =&gt; <a href="Control-Lens-Internal.html#t:Settable">Settable</a> (Compose f g)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Internal Types
+</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">newtype</span> <a href="#t:May">May</a> a = <a href="#v:May">May</a> {<ul class="subs"><li><a href="#v:getMay">getMay</a> :: Maybe a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Folding">Folding</a> f a = <a href="#v:Folding">Folding</a> {<ul class="subs"><li><a href="#v:getFolding">getFolding</a> :: f a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Effect">Effect</a> m r a = <a href="#v:Effect">Effect</a> {<ul class="subs"><li><a href="#v:getEffect">getEffect</a> :: m r</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:EffectRWS">EffectRWS</a> w st m s a = <a href="#v:EffectRWS">EffectRWS</a> {<ul class="subs"><li><a href="#v:getEffectRWS">getEffectRWS</a> :: st -&gt; m (s, st, w)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Accessor">Accessor</a> r a = <a href="#v:Accessor">Accessor</a> {<ul class="subs"><li><a href="#v:runAccessor">runAccessor</a> :: r</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Err">Err</a> e a = <a href="#v:Err">Err</a> {<ul class="subs"><li><a href="#v:getErr">getErr</a> :: Either e a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Traversed">Traversed</a> f = <a href="#v:Traversed">Traversed</a> {<ul class="subs"><li><a href="#v:getTraversed">getTraversed</a> :: f ()</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Sequenced">Sequenced</a> m = <a href="#v:Sequenced">Sequenced</a> {<ul class="subs"><li><a href="#v:getSequenced">getSequenced</a> :: m ()</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Focusing">Focusing</a> m s a = <a href="#v:Focusing">Focusing</a> {<ul class="subs"><li><a href="#v:unfocusing">unfocusing</a> :: m (s, a)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingWith">FocusingWith</a> w m s a = <a href="#v:FocusingWith">FocusingWith</a> {<ul class="subs"><li><a href="#v:unfocusingWith">unfocusingWith</a> :: m (s, a, w)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingPlus">FocusingPlus</a> w k s a = <a href="#v:FocusingPlus">FocusingPlus</a> {<ul class="subs"><li><a href="#v:unfocusingPlus">unfocusingPlus</a> :: k (s, w) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingOn">FocusingOn</a> f k s a = <a href="#v:FocusingOn">FocusingOn</a> {<ul class="subs"><li><a href="#v:unfocusingOn">unfocusingOn</a> :: k (f s) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingMay">FocusingMay</a> k s a = <a href="#v:FocusingMay">FocusingMay</a> {<ul class="subs"><li><a href="#v:unfocusingMay">unfocusingMay</a> :: k (<a href="Control-Lens-Internal.html#t:May">May</a> s) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingErr">FocusingErr</a> e k s a = <a href="#v:FocusingErr">FocusingErr</a> {<ul class="subs"><li><a href="#v:unfocusingErr">unfocusingErr</a> :: k (<a href="Control-Lens-Internal.html#t:Err">Err</a> e s) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Mutator">Mutator</a> a = <a href="#v:Mutator">Mutator</a> {<ul class="subs"><li><a href="#v:runMutator">runMutator</a> :: a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Bazaar">Bazaar</a> a b t = <a href="#v:Bazaar">Bazaar</a> {<ul class="subs"><li><a href="#v:runBazaar">runBazaar</a> :: <span class="keyword">forall</span> f. Applicative f =&gt; (a -&gt; f b) -&gt; f t</li></ul>}</li><li class="src short"><a href="#v:bazaar">bazaar</a> :: Applicative f =&gt; (a -&gt; f b) -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b t -&gt; f t</li><li class="src short"><a href="#v:duplicateBazaar">duplicateBazaar</a> :: <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a c t -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> b c t)</li><li class="src short"><a href="#v:sell">sell</a> :: a -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b b</li><li class="src short"><span class="keyword">data</span> <a href="#t:Context">Context</a> a b t = <a href="#v:Context">Context</a> (b -&gt; t) a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Max">Max</a> a<ul class="subs"><li>= <a href="#v:NoMax">NoMax</a> </li><li>| <a href="#v:Max">Max</a> a </li></ul></li><li class="src short"><a href="#v:getMax">getMax</a> :: <a href="Control-Lens-Internal.html#t:Max">Max</a> a -&gt; Maybe a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Min">Min</a> a<ul class="subs"><li>= <a href="#v:NoMin">NoMin</a> </li><li>| <a href="#v:Min">Min</a> a </li></ul></li><li class="src short"><a href="#v:getMin">getMin</a> :: <a href="Control-Lens-Internal.html#t:Min">Min</a> a -&gt; Maybe a</li><li class="src short"><span class="keyword">data</span> <a href="#t:ElementOfResult">ElementOfResult</a> f a = <a href="#v:Searching">Searching</a> Int a (Maybe (f a))</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ElementOf">ElementOf</a> f a = <a href="#v:ElementOf">ElementOf</a> {<ul class="subs"><li><a href="#v:getElementOf">getElementOf</a> :: Int -&gt; <a href="Control-Lens-Internal.html#t:ElementOfResult">ElementOfResult</a> f a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Indexing">Indexing</a> f a = <a href="#v:Indexing">Indexing</a> {<ul class="subs"><li><a href="#v:runIndexing">runIndexing</a> :: Int -&gt; (f a, Int)</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:Level">Level</a> a = <a href="#v:Level">Level</a> !Int [a] a [a]</li><li class="src short"><a href="#v:levelWidth">levelWidth</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; Int</li><li class="src short"><a href="#v:leftLevel">leftLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; Maybe (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)</li><li class="src short"><a href="#v:left1Level">left1Level</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:leftmostLevel">leftmostLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:rightmostLevel">rightmostLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:rightLevel">rightLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; Maybe (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)</li><li class="src short"><a href="#v:right1Level">right1Level</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:focusLevel">focusLevel</a> :: Functor f =&gt; (a -&gt; f a) -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; f (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)</li><li class="src short"><a href="#v:rezipLevel">rezipLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; NonEmpty a</li><li class="src short"><span class="keyword">data</span> <a href="#t:BazaarT">BazaarT</a> a b g s</li></ul></div><div id="interface"><h1 id="g:1">Internal Types
</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:May" class="def">May</a> a <a href="src/Control-Lens-Internal.html#May" class="link">Source</a></p><div class="doc"><p>Make a monoid out of <code>Maybe</code> for error handling
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:May" class="def">May</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getMay" class="def">getMay</a> :: Maybe a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:May" class="caption collapser" onclick="toggleSection('i:May')">Instances</p><div id="section.i:May" class="show"><table><tr><td class="src">Monoid a =&gt; Monoid (<a href="Control-Lens-Internal.html#t:May">May</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Folding" class="def">Folding</a> f a <a href="src/Control-Lens-Internal.html#Folding" class="link">Source</a></p><div class="doc"><p>A <code>Monoid</code> for a <code><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a></code> <code>Applicative</code>.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Folding" class="def">Folding</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getFolding" class="def">getFolding</a> :: f a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Folding" class="caption collapser" onclick="toggleSection('i:Folding')">Instances</p><div id="section.i:Folding" class="show"><table><tr><td class="src">(<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Folding">Folding</a> f a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Effect" class="def">Effect</a> m r a <a href="src/Control-Lens-Internal.html#Effect" class="link">Source</a></p><div class="doc"><p>Wrap a monadic effect with a phantom type argument.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Effect" class="def">Effect</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getEffect" class="def">getEffect</a> :: m r</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Effect" class="caption collapser" onclick="toggleSection('i:Effect')">Instances</p><div id="section.i:Effect" class="show"><table><tr><td class="src">Monad m =&gt; <a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid r) =&gt; Applicative (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monad m =&gt; <a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> (ReaderT b m) (ReaderT a m) (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m) b a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid r) =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:EffectRWS" class="def">EffectRWS</a> w st m s a <a href="src/Control-Lens-Internal.html#EffectRWS" class="link">Source</a></p><div class="doc"><p>Wrap a monadic effect with a phantom type argument. Used when magnifying RWST.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:EffectRWS" class="def">EffectRWS</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getEffectRWS" class="def">getEffectRWS</a> :: st -&gt; m (s, st, w)</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:EffectRWS" class="caption collapser" onclick="toggleSection('i:EffectRWS')">Instances</p><div id="section.i:EffectRWS" class="show"><table><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monoid s, Monoid w, Monad m) =&gt; Applicative (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid w) =&gt; <a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> (RWST b w s m) (RWST a w s m) (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m) b a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid w) =&gt; <a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> (RWST b w s m) (RWST a w s m) (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m) b a</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Accessor" class="def">Accessor</a> r a <a href="src/Control-Lens-Internal.html#Accessor" class="link">Source</a></p><div class="doc"><p>Used instead of <code>Const</code> to report
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:May" class="def">May</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getMay" class="def">getMay</a> :: Maybe a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:May" class="caption collapser" onclick="toggleSection('i:May')">Instances</p><div id="section.i:May" class="show"><table><tr><td class="src">Monoid a =&gt; Monoid (<a href="Control-Lens-Internal.html#t:May">May</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Folding" class="def">Folding</a> f a <a href="src/Control-Lens-Internal.html#Folding" class="link">Source</a></p><div class="doc"><p>A <code>Monoid</code> for a <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> <code>Applicative</code>.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Folding" class="def">Folding</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getFolding" class="def">getFolding</a> :: f a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Folding" class="caption collapser" onclick="toggleSection('i:Folding')">Instances</p><div id="section.i:Folding" class="show"><table><tr><td class="src">(<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Folding">Folding</a> f a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Effect" class="def">Effect</a> m r a <a href="src/Control-Lens-Internal.html#Effect" class="link">Source</a></p><div class="doc"><p>Wrap a monadic effect with a phantom type argument.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Effect" class="def">Effect</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getEffect" class="def">getEffect</a> :: m r</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Effect" class="caption collapser" onclick="toggleSection('i:Effect')">Instances</p><div id="section.i:Effect" class="show"><table><tr><td class="src">Monad m =&gt; <a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid r) =&gt; Applicative (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monad m =&gt; <a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> (ReaderT b m) (ReaderT a m) (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m) b a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid r) =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:EffectRWS" class="def">EffectRWS</a> w st m s a <a href="src/Control-Lens-Internal.html#EffectRWS" class="link">Source</a></p><div class="doc"><p>Wrap a monadic effect with a phantom type argument. Used when magnifying RWST.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:EffectRWS" class="def">EffectRWS</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getEffectRWS" class="def">getEffectRWS</a> :: st -&gt; m (s, st, w)</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:EffectRWS" class="caption collapser" onclick="toggleSection('i:EffectRWS')">Instances</p><div id="section.i:EffectRWS" class="show"><table><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monoid s, Monoid w, Monad m) =&gt; Applicative (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid w) =&gt; <a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> (RWST b w s m) (RWST a w s m) (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m) b a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid w) =&gt; <a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> (RWST b w s m) (RWST a w s m) (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m) b a</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Accessor" class="def">Accessor</a> r a <a href="src/Control-Lens-Internal.html#Accessor" class="link">Source</a></p><div class="doc"><p>Used instead of <code>Const</code> to report
</p><pre>No instance of (<code><a href="Control-Lens-Setter.html#t:Settable">Settable</a></code> <code><a href="Control-Lens-Internal.html#t:Accessor">Accessor</a></code>)</pre><p>when the user attempts to misuse a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> as a
<code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code>, rather than a monolithic unification error.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Accessor" class="def">Accessor</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:runAccessor" class="def">runAccessor</a> :: r</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Accessor" class="caption collapser" onclick="toggleSection('i:Accessor')">Instances</p><div id="section.i:Accessor" class="show"><table><tr><td class="src"><a href="Control-Lens-Internal.html#t:Effective">Effective</a> Identity r (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monoid r =&gt; Applicative (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> ((-&gt;) b) ((-&gt;) a) <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> b a</td><td class="doc"><pre><code><a href="Control-Lens-Zoom.html#v:magnify">magnify</a></code> = <code><a href="Control-Lens-Getter.html#v:views">views</a></code></pre></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Err" class="def">Err</a> e a <a href="src/Control-Lens-Internal.html#Err" class="link">Source</a></p><div class="doc"><p>Make a monoid out of <code>Either</code> for error handling
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Accessor" class="def">Accessor</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:runAccessor" class="def">runAccessor</a> :: r</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Accessor" class="caption collapser" onclick="toggleSection('i:Accessor')">Instances</p><div id="section.i:Accessor" class="show"><table><tr><td class="src"><a href="Control-Lens-Classes.html#t:Effective">Effective</a> Identity r (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monoid r =&gt; Applicative (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> ((-&gt;) b) ((-&gt;) a) <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> b a</td><td class="doc"><pre><code><a href="Control-Lens-Zoom.html#v:magnify">magnify</a></code> = <code><a href="Control-Lens-Getter.html#v:views">views</a></code></pre></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Err" class="def">Err</a> e a <a href="src/Control-Lens-Internal.html#Err" class="link">Source</a></p><div class="doc"><p>Make a monoid out of <code>Either</code> for error handling
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Err" class="def">Err</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getErr" class="def">getErr</a> :: Either e a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Err" class="caption collapser" onclick="toggleSection('i:Err')">Instances</p><div id="section.i:Err" class="show"><table><tr><td class="src">Monoid a =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Err">Err</a> e a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Traversed" class="def">Traversed</a> f <a href="src/Control-Lens-Internal.html#Traversed" class="link">Source</a></p><div class="doc"><p>Used internally by <code><a href="Control-Lens-Traversal.html#t:traverseOf_">traverseOf_</a></code> and the like.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Traversed" class="def">Traversed</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getTraversed" class="def">getTraversed</a> :: f ()</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Traversed" class="caption collapser" onclick="toggleSection('i:Traversed')">Instances</p><div id="section.i:Traversed" class="show"><table><tr><td class="src">Applicative f =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Sequenced" class="def">Sequenced</a> m <a href="src/Control-Lens-Internal.html#Sequenced" class="link">Source</a></p><div class="doc"><p>Used internally by <code><a href="Control-Lens-Traversal.html#t:mapM_">mapM_</a></code> and the like.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Sequenced" class="def">Sequenced</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getSequenced" class="def">getSequenced</a> :: m ()</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Sequenced" class="caption collapser" onclick="toggleSection('i:Sequenced')">Instances</p><div id="section.i:Sequenced" class="show"><table><tr><td class="src">Monad m =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Focusing" class="def">Focusing</a> m s a <a href="src/Control-Lens-Internal.html#Focusing" class="link">Source</a></p><div class="doc"><p>Used by <code><a href="Control-Lens-Type.html#t:Zoom">Zoom</a></code> to <code><a href="Control-Lens-Type.html#t:zoom">zoom</a></code> into <code><a href="Control-Monad-State.html#t:StateT">StateT</a></code>
@@ -42,7 +27,7 @@
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:FocusingErr" class="def">FocusingErr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:unfocusingErr" class="def">unfocusingErr</a> :: k (<a href="Control-Lens-Internal.html#t:Err">Err</a> e s) a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:FocusingErr" class="caption collapser" onclick="toggleSection('i:FocusingErr')">Instances</p><div id="section.i:FocusingErr" class="show"><table><tr><td class="src">(Error e, <a href="Control-Lens-Zoom.html#t:Zoom">Zoom</a> m n k s t) =&gt; <a href="Control-Lens-Zoom.html#t:Zoom">Zoom</a> (ErrorT e m) (ErrorT e n) (<a href="Control-Lens-Internal.html#t:FocusingErr">FocusingErr</a> e k) s t</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (k (<a href="Control-Lens-Internal.html#t:Err">Err</a> e s)) =&gt; Functor (<a href="Control-Lens-Internal.html#t:FocusingErr">FocusingErr</a> e k s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Applicative (k (<a href="Control-Lens-Internal.html#t:Err">Err</a> e s)) =&gt; Applicative (<a href="Control-Lens-Internal.html#t:FocusingErr">FocusingErr</a> e k s)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Mutator" class="def">Mutator</a> a <a href="src/Control-Lens-Internal.html#Mutator" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-Internal.html#t:Mutator">Mutator</a></code> is just a renamed <code>Identity</code> functor to give better error
messages when someone attempts to use a getter as a setter.
</p><p>Most user code will never need to see this type.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Mutator" class="def">Mutator</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:runMutator" class="def">runMutator</a> :: a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Mutator" class="caption collapser" onclick="toggleSection('i:Mutator')">Instances</p><div id="section.i:Mutator" class="show"><table><tr><td class="src">Functor <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Applicative <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Settable">Settable</a> <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Bazaar" class="def">Bazaar</a> a b t <a href="src/Control-Lens-Internal.html#Bazaar" class="link">Source</a></p><div class="doc"><p>This is used to characterize a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Mutator" class="def">Mutator</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:runMutator" class="def">runMutator</a> :: a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Mutator" class="caption collapser" onclick="toggleSection('i:Mutator')">Instances</p><div id="section.i:Mutator" class="show"><table><tr><td class="src">Functor <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Applicative <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Settable">Settable</a> <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Bazaar" class="def">Bazaar</a> a b t <a href="src/Control-Lens-Internal.html#Bazaar" class="link">Source</a></p><div class="doc"><p>This is used to characterize a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>.
</p><p>a.k.a. indexed Cartesian store comonad, indexed Kleene store comonad, or an indexed <code>FunList</code>.
</p><p><a href="http://twanvl.nl/blog/haskell/non-regular1">http://twanvl.nl/blog/haskell/non-regular1</a>
</p><p><code><code><a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a></code> a b t</code> is isomorphic to <code>data Bazaar a b t = Buy t | Trade (Bazaar a b (b -&gt; t)) a</code>,
@@ -66,9 +51,11 @@
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NoMax" class="def">NoMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Max" class="def">Max</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Max" class="caption collapser" onclick="toggleSection('i:Max')">Instances</p><div id="section.i:Max" class="show"><table><tr><td class="src">Ord a =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Max">Max</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:getMax" class="def">getMax</a> :: <a href="Control-Lens-Internal.html#t:Max">Max</a> a -&gt; Maybe a<a href="src/Control-Lens-Internal.html#getMax" class="link">Source</a></p><div class="doc"><p>Obtain the maximum
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Min" class="def">Min</a> a <a href="src/Control-Lens-Internal.html#Min" class="link">Source</a></p><div class="doc"><p>Used for <code><a href="Control-Lens-Fold.html#t:minimumOf">minimumOf</a></code>
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NoMin" class="def">NoMin</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Min" class="def">Min</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Min" class="caption collapser" onclick="toggleSection('i:Min')">Instances</p><div id="section.i:Min" class="show"><table><tr><td class="src">Ord a =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Min">Min</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:getMin" class="def">getMin</a> :: <a href="Control-Lens-Internal.html#t:Min">Min</a> a -&gt; Maybe a<a href="src/Control-Lens-Internal.html#getMin" class="link">Source</a></p><div class="doc"><p>Obtain the minimum.
-</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ElementOfResult" class="def">ElementOfResult</a> f a <a href="src/Control-Lens-Internal.html#ElementOfResult" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Searching" class="def">Searching</a> Int a (Maybe (f a))</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ElementOfResult" class="caption collapser" onclick="toggleSection('i:ElementOfResult')">Instances</p><div id="section.i:ElementOfResult" class="show"><table><tr><td class="src">Functor f =&gt; Functor (<a href="Control-Lens-Internal.html#t:ElementOfResult">ElementOfResult</a> f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ElementOf" class="def">ElementOf</a> f a <a href="src/Control-Lens-Internal.html#ElementOf" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ElementOf" class="def">ElementOf</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getElementOf" class="def">getElementOf</a> :: Int -&gt; <a href="Control-Lens-Internal.html#t:ElementOfResult">ElementOfResult</a> f a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:ElementOf" class="caption collapser" onclick="toggleSection('i:ElementOf')">Instances</p><div id="section.i:ElementOf" class="show"><table><tr><td class="src">Functor f =&gt; Functor (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor f =&gt; Applicative (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Indexing" class="def">Indexing</a> f a <a href="src/Control-Lens-Internal.html#Indexing" class="link">Source</a></p><div class="doc"><p>Applicative composition of <code><code><a href="Control-Monad-Trans-State-Lazy.html#t:State">State</a></code> <code>Int</code></code> with a <code>Functor</code>, used
+</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ElementOfResult" class="def">ElementOfResult</a> f a <a href="src/Control-Lens-Internal.html#ElementOfResult" class="link">Source</a></p><div class="doc"><p>The result of searching for a particular element in a Traversal.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Searching" class="def">Searching</a> Int a (Maybe (f a))</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ElementOfResult" class="caption collapser" onclick="toggleSection('i:ElementOfResult')">Instances</p><div id="section.i:ElementOfResult" class="show"><table><tr><td class="src">Functor f =&gt; Functor (<a href="Control-Lens-Internal.html#t:ElementOfResult">ElementOfResult</a> f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ElementOf" class="def">ElementOf</a> f a <a href="src/Control-Lens-Internal.html#ElementOf" class="link">Source</a></p><div class="doc"><p>Searches for a particular element in a Traversal.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ElementOf" class="def">ElementOf</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getElementOf" class="def">getElementOf</a> :: Int -&gt; <a href="Control-Lens-Internal.html#t:ElementOfResult">ElementOfResult</a> f a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:ElementOf" class="caption collapser" onclick="toggleSection('i:ElementOf')">Instances</p><div id="section.i:ElementOf" class="show"><table><tr><td class="src">Functor f =&gt; Functor (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor f =&gt; Applicative (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> f =&gt; <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Indexing" class="def">Indexing</a> f a <a href="src/Control-Lens-Internal.html#Indexing" class="link">Source</a></p><div class="doc"><p>Applicative composition of <code><code><a href="Control-Monad-Trans-State-Lazy.html#t:State">State</a></code> <code>Int</code></code> with a <code>Functor</code>, used
by <code><a href="Control-Lens-Indexed.html#t:indexed">indexed</a></code>
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Indexing" class="def">Indexing</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:runIndexing" class="def">runIndexing</a> :: Int -&gt; (f a, Int)</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Indexing" class="caption collapser" onclick="toggleSection('i:Indexing')">Instances</p><div id="section.i:Indexing" class="show"><table><tr><td class="src">Functor f =&gt; Functor (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Applicative f =&gt; Applicative (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Level" class="def">Level</a> a <a href="src/Control-Lens-Internal.html#Level" class="link">Source</a></p><div class="doc"><p>A basic non-empty list zipper
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Indexing" class="def">Indexing</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:runIndexing" class="def">runIndexing</a> :: Int -&gt; (f a, Int)</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Indexing" class="caption collapser" onclick="toggleSection('i:Indexing')">Instances</p><div id="section.i:Indexing" class="show"><table><tr><td class="src">Functor f =&gt; Functor (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Applicative f =&gt; Applicative (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> f =&gt; <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Level" class="def">Level</a> a <a href="src/Control-Lens-Internal.html#Level" class="link">Source</a></p><div class="doc"><p>A basic non-empty list zipper
</p><p>All combinators assume the invariant that the length stored matches the number
of elements in list of items to the left, and the list of items to the left is
stored reversed.
@@ -82,12 +69,13 @@
</p></div></div><div class="top"><p class="src"><a name="v:right1Level" class="def">right1Level</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a<a href="src/Control-Lens-Internal.html#right1Level" class="link">Source</a></p><div class="doc"><p>Pull the non-empty list zipper right one entry, stopping at the last entry.
</p></div></div><div class="top"><p class="src"><a name="v:focusLevel" class="def">focusLevel</a> :: Functor f =&gt; (a -&gt; f a) -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; f (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)<a href="src/Control-Lens-Internal.html#focusLevel" class="link">Source</a></p><div class="doc"><p>This is a <code>Lens</code> targeting the value that we would <code>extract</code> from the non-empty list zipper.
</p><pre><code>view</code> <code><a href="Control-Lens-Internal.html#v:focusLevel">focusLevel</a></code> &#8801; <code>extract</code></pre><pre><code><a href="Control-Lens-Internal.html#v:focusLevel">focusLevel</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> (<code><a href="Control-Lens-Internal.html#t:Level">Level</a></code> a) a</pre></div></div><div class="top"><p class="src"><a name="v:rezipLevel" class="def">rezipLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; NonEmpty a<a href="src/Control-Lens-Internal.html#rezipLevel" class="link">Source</a></p><div class="doc"><p>Zip a non-empty list zipper back up, and return the result.
-</p></div></div><h1 id="g:3">Evil Internal Types
-</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:EvilBazaar" class="def">EvilBazaar</a> g a b s <a href="src/Control-Lens-Evil.html#EvilBazaar" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-Internal.html#t:EvilBazaar">EvilBazaar</a></code> is like <code><a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a></code>, except that it has an evil <code>Gettable</code> instance
- where <code><code><a href="Control-Lens-Internal.html#t:coerce">coerce</a></code> = <code><a href="Unsafe-Coerce.html#t:unsafeCoerce">unsafeCoerce</a></code></code>.
-</p><p>This lets us write a suitably polymorphic and lazy <code><a href="Control-Lens-Traversal.html#t:taking">taking</a></code>, but there *must* be a better way!.
-</p><p>This type isn't exported from the package in a way that allows anyone to
- write <code><a href="Unsafe-Coerce.html#t:unsafeCoerce">unsafeCoerce</a></code> with it. It's only used in the implementation of
- <code><a href="Control-Lens-Traversal.html#t:taking">taking</a></code>.
+</p></div></div><h1 id="g:2">Hidden implementations
+</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:BazaarT" class="def">BazaarT</a> a b g s <a href="src/Control-Lens-Internal-BazaarT.html#BazaarT" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a></code> is like <code><a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a></code>, except that it provides a questionable <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> instance
+ where <code><code><a href="Control-Lens-Internal.html#t:coerce">coerce</a></code> = <code>unsafeCoerce</code></code>. To protect this instance it relies on
+ a combination of the fact that we do not export the tools for working with this type, beyond its type signature
+ to user code, and the fact that it borrows a proof obligation that the <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> instance is sound from another
+ <code>Getter</code>.
+</p><p>For example. This lets us write a suitably polymorphic and lazy <code><a href="Control-Lens-Traversal.html#t:taking">taking</a></code>, but there
+ must be a better way!
</p><p><code>g</code> is a phantom type used in the <code><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a></code> instance.
-</p></div><div class="subs instances"><p id="control.i:EvilBazaar" class="caption collapser" onclick="toggleSection('i:EvilBazaar')">Instances</p><div id="section.i:EvilBazaar" class="show"><table><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:EvilBazaar">EvilBazaar</a> g a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Applicative (<a href="Control-Lens-Internal.html#t:EvilBazaar">EvilBazaar</a> g a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> g =&gt; <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EvilBazaar">EvilBazaar</a> g a b)</td><td class="doc empty">&nbsp;</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.1</p></div></body></html>
+</p></div><div class="subs instances"><p id="control.i:BazaarT" class="caption collapser" onclick="toggleSection('i:BazaarT')">Instances</p><div id="section.i:BazaarT" class="show"><table><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Applicative (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> g =&gt; <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</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.1</p></div></body></html>
View
2  Control-Lens-Iso.html
@@ -1,7 +1,7 @@
<!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.Lens.Iso</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-Lens-Iso.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Iso.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Iso</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Isomorphism Lenses
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Iso.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Iso</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Isomorphism Lenses
</a></li><li><a href="#g:2">Working with isomorphisms
</a></li><li><a href="#g:3">Primitive isomorphisms
</a><ul><li><a href="#g:4">Common Isomorphisms
View
2  Control-Lens-Isomorphic.html
@@ -1,7 +1,7 @@
<!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.Lens.Isomorphic</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-Lens-Isomorphic.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Isomorphic.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Isomorphic</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> Category k =&gt; <a href="#t:Isomorphic">Isomorphic</a> k <span class="keyword">where</span><ul class="subs"><li><a href="#v:isomorphic">isomorphic</a> :: (a -&gt; b) -&gt; (b -&gt; a) -&gt; k a b</li><li><a href="#v:isomap">isomap</a> :: ((a -&gt; b) -&gt; c -&gt; d) -&gt; ((b -&gt; a) -&gt; d -&gt; c) -&gt; k a b -&gt; k c d</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Isomorphism">Isomorphism</a> a b = <a href="#v:Isomorphism">Isomorphism</a> (a -&gt; b) (b -&gt; a)</li><li class="src short"><a href="#v:from">from</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphism">Isomorphism</a> a b -&gt; k b a</li><li class="src short"><a href="#v:via">via</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphism">Isomorphism</a> a b -&gt; k a b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">class</span> Category k =&gt; <a name="t:Isomorphic" class="def">Isomorphic</a> k <span class="keyword">where</span><a href="src/Control-Lens-Isomorphic.html#Isomorphic" class="link">Source</a></p><div class="doc"><p>Used to provide overloading of isomorphism application
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Isomorphic.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Isomorphic</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> Category k =&gt; <a href="#t:Isomorphic">Isomorphic</a> k <span class="keyword">where</span><ul class="subs"><li><a href="#v:isomorphic">isomorphic</a> :: (a -&gt; b) -&gt; (b -&gt; a) -&gt; k a b</li><li><a href="#v:isomap">isomap</a> :: ((a -&gt; b) -&gt; c -&gt; d) -&gt; ((b -&gt; a) -&gt; d -&gt; c) -&gt; k a b -&gt; k c d</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Isomorphism">Isomorphism</a> a b = <a href="#v:Isomorphism">Isomorphism</a> (a -&gt; b) (b -&gt; a)</li><li class="src short"><a href="#v:from">from</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphism">Isomorphism</a> a b -&gt; k b a</li><li class="src short"><a href="#v:via">via</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphism">Isomorphism</a> a b -&gt; k a b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">class</span> Category k =&gt; <a name="t:Isomorphic" class="def">Isomorphic</a> k <span class="keyword">where</span><a href="src/Control-Lens-Isomorphic.html#Isomorphic" class="link">Source</a></p><div class="doc"><p>Used to provide overloading of isomorphism application
</p><p>This is a <code>Category</code> with a canonical mapping to it from the
category of isomorphisms over Haskell types.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:isomorphic" class="def">isomorphic</a> :: (a -&gt; b) -&gt; (b -&gt; a) -&gt; k a b<a href="src/Control-Lens-Isomorphic.html#isomorphic" class="link">Source</a></p><div class="doc"><p>Build this morphism out of an isomorphism
View
2  Control-Lens-Loupe.html
@@ -1,7 +1,7 @@
<!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.Lens.Loupe</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-Lens-Loupe.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Loupe.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Loupe</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Lenses
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Loupe.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Loupe</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Lenses
</a></li><li><a href="#g:2">Simplified
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A <code><a href="Control-Lens-Loupe.html#t:Loupe">Loupe</a></code> is a minimalist <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> suitable for storing in containers
or returning monadically that can still be composed with other lenses.
View
2  Control-Lens-Plated.html
@@ -1,7 +1,7 @@
<!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.Lens.Plated</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-Lens-Plated.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Plated.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Plated</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Uniplate
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Plated.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Plated</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Uniplate
</a></li><li><a href="#g:2">Uniplate Combinators
</a></li><li><a href="#g:3">Compos
</a></li><li><a href="#g:4">Parts
View
2  Control-Lens-Projection.html
@@ -1,7 +1,7 @@
<!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.Lens.Projection</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-Lens-Projection.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Projection.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Projection</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Simple
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Projection.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Projection</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Simple
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Projection">Projection</a> s t a b = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Projection.html#t:Projective">Projective</a> k s b, Applicative f) =&gt; k (a -&gt; f b) (s -&gt; f s)</li><li class="src short"><span class="keyword">class</span> <a href="#t:Projective">Projective</a> k a d <span class="keyword">where</span><ul class="subs"><li><a href="#v:projective">projective</a> :: (d -&gt; a) -&gt; (x -&gt; y) -&gt; k x y</li></ul></li><li class="src short"><a href="#v:project">project</a> :: <a href="Control-Lens-Projection.html#t:Projective">Projective</a> k s b =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Projection.html#t:Project">Project</a> s b) f s s a b -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s s a b</li><li class="src short"><a href="#v:by">by</a> :: <a href="Control-Lens-Projection.html#t:Project">Project</a> s b (b -&gt; Identity b) (s -&gt; Identity s) -&gt; <a href="Control-Lens-Getter.html#t:Getter">Getter</a> b s</li><li class="src short"><span class="keyword">data</span> <a href="#t:Project">Project</a> s b x y = <a href="#v:Project">Project</a> (b -&gt; s) (x -&gt; y)</li><li class="src short"><a href="#v:projection">projection</a> :: (b -&gt; s) -&gt; (s -&gt; Maybe a) -&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> s t a b</li><li class="src short"><a href="#v:stereo">stereo</a> :: <a href="Control-Lens-Projection.html#t:Projective">Projective</a> k s a =&gt; <a href="Control-Lens-Projection.html#t:Project">Project</a> t a y z -&gt; <a href="Control-Lens-Projection.html#t:Project">Project</a> s t x y -&gt; k x z</li><li class="src short"><a href="#v:mirror">mirror</a> :: <a href="Control-Lens-Projection.html#t:Projective">Projective</a> k s a =&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s a -&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Projection.html#t:Projection">Projection</a> s a</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleProjection">SimpleProjection</a> s a = <a href="Control-Lens-Projection.html#t:Projection">Projection</a> s s a a</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Projection" class="def">Projection</a> s t a b = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Projection.html#t:Projective">Projective</a> k s b, Applicative f) =&gt; k (a -&gt; f b) (s -&gt; f s)<a href="src/Control-Lens-Projection.html#Projection" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Projection.html#t:Projection">Projection</a></code> is a <code>Traversal</code> that can also be turned around with <code><a href="Control-Lens-Projection.html#v:by">by</a></code> to obtain a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code>
</p></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Projective" class="def">Projective</a> k a d <span class="keyword">where</span><a href="src/Control-Lens-Projection.html#Projective" class="link">Source</a></p><div class="doc"><p>Used to provide overloading of projections.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:projective" class="def">projective</a> :: (d -&gt; a) -&gt; (x -&gt; y) -&gt; k x y<a href="src/Control-Lens-Projection.html#projective" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:Projective" class="caption collapser" onclick="toggleSection('i:Projective')">Instances</p><div id="section.i:Projective" class="show"><table><tr><td class="src"><a href="Control-Lens-Projection.html#t:Projective">Projective</a> (-&gt;) a d</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(~ * s s', ~ * b b') =&gt; <a href="Control-Lens-Projection.html#t:Projective">Projective</a> (<a href="Control-Lens-Projection.html#t:Project">Project</a> s b) s' b'</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:project" class="def">project</a> :: <a href="Control-Lens-Projection.html#t:Projective">Projective</a> k s b =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Projection.html#t:Project">Project</a> s b) f s s a b -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s s a b<a href="src/Control-Lens-Projection.html#project" class="link">Source</a></p><div class="doc"><p>Reflect a <code><a href="Control-Lens-Projection.html#t:Projection">Projection</a></code>.
View
2  Control-Lens-Representable.html
@@ -1,7 +1,7 @@
<!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.Lens.Representable</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-Lens-Representable.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Representable.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>RankNTypes</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Representable</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Representable Functors
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Representable.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>RankNTypes</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Representable</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Representable Functors
</a></li><li><a href="#g:2">Using Lenses as Representations
</a></li><li><a href="#g:3">Default definitions
</a></li><li><a href="#g:4">Wrapped Representations
View
6 Control-Lens-Setter.html
@@ -1,7 +1,7 @@
<!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.Lens.Setter</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-Lens-Setter.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Setter.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Setter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Setters
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Setter.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Setter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Setters
</a></li><li><a href="#g:2">Building Setters
</a></li><li><a href="#g:3">Common Setters
</a></li><li><a href="#g:4">Functional Combinators
@@ -27,7 +27,7 @@
</pre><p>These an be stated more directly:
</p><pre>
l <code>pure</code> &#8801; <code>pure</code>
- l f . <code><a href="Control-Lens-Internal.html#v:untainted">untainted</a></code> . l g &#8801; l (f . <code><a href="Control-Lens-Internal.html#v:untainted">untainted</a></code> . g)
+ l f . <code><a href="Control-Lens-Classes.html#v:untainted">untainted</a></code> . l g &#8801; l (f . <code><a href="Control-Lens-Classes.html#v:untainted">untainted</a></code> . g)
</pre><p>You can compose a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> with a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> or a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> using (<code>.</code>) from the Prelude
and the result is always only a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> and nothing more.
</p></div></div><h1 id="g:2">Building Setters
@@ -386,7 +386,7 @@
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleSetter" class="def">SimpleSetter</a> s a = <a href="Control-Lens-Setter.html#t:Setter">Setter</a> s s a a<a href="src/Control-Lens-Setter.html#SimpleSetter" class="link">Source</a></p><div class="doc"><p>A Simple Setter is just a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> that doesn't change the types.
</p><p>These are particularly common when talking about monomorphic containers. <em>e.g.</em>
</p><pre><code><a href="Control-Lens-Setter.html#v:sets">sets</a></code> Data.Text.map :: <code><a href="Control-Lens-Setter.html#t:SimpleSetter">SimpleSetter</a></code> <code><a href="Data-Text-Internal.html#t:Text">Text</a></code> <code>Char</code></pre><pre>type <code><a href="Control-Lens-Setter.html#t:SimpleSetter">SimpleSetter</a></code> = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code></pre></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleReifiedSetter" class="def">SimpleReifiedSetter</a> s a = <a href="Control-Lens-Setter.html#t:ReifiedSetter">ReifiedSetter</a> s s a a<a href="src/Control-Lens-Setter.html#SimpleReifiedSetter" class="link">Source</a></p><div class="doc"><pre>type <code><a href="Control-Lens-Setter.html#t:SimpleReifiedSetter">SimpleReifiedSetter</a></code> = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:ReifiedSetter">ReifiedSetter</a></code></pre></div></div><h1 id="g:9">Exported for legible error messages
-</h1><div class="top"><p class="src"><span class="keyword">class</span> Applicative f =&gt; <a name="t:Settable" class="def">Settable</a> f <a href="src/Control-Lens-Internal.html#Settable" class="link">Source</a></p><div class="doc"><p>Anything <code><a href="Control-Lens-Setter.html#t:Settable">Settable</a></code> must be isomorphic to the <code>Identity</code> <code>Functor</code>.
+</h1><div class="top"><p class="src"><span class="keyword">class</span> Applicative f =&gt; <a name="t:Settable" class="def">Settable</a> f <a href="src/Control-Lens-Classes.html#Settable" class="link">Source</a></p><div class="doc"><p>Anything <code><a href="Control-Lens-Setter.html#t:Settable">Settable</a></code> must be isomorphic to the <code>Identity</code> <code>Functor</code>.
</p></div><div class="subs instances"><p id="control.i:Settable" class="caption collapser" onclick="toggleSection('i:Settable')">Instances</p><div id="section.i:Settable" class="show"><table><tr><td class="src"><a href="Control-Lens-Setter.html#t:Settable">Settable</a> Identity</td><td class="doc"><p>so you can pass our a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> into combinators from other lens libraries
</p></td></tr><tr><td class="src"><a href="Control-Lens-Setter.html#t:Settable">Settable</a> <a href="Control-Lens-Setter.html#t:Mutator">Mutator</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Setter.html#t:Settable">Settable</a> f =&gt; <a href="Control-Lens-Setter.html#t:Settable">Settable</a> (Backwards f)</td><td class="doc"><p><code><a href="Control-Lens-Fold.html#t:backwards">backwards</a></code>
</p></td></tr><tr><td class="src">(<a href="Control-Lens-Setter.html#t:Settable">Settable</a> f, <a href="Control-Lens-Setter.html#t:Settable">Settable</a> g) =&gt; <a href="Control-Lens-Setter.html#t:Settable">Settable</a> (Compose f g)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Mutator" class="def">Mutator</a> a <a href="src/Control-Lens-Internal.html#Mutator" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-Setter.html#t:Mutator">Mutator</a></code> is just a renamed <code>Identity</code> functor to give better error
View
2  Control-Lens-Simple.html
@@ -1,7 +1,7 @@
<!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.Lens.Simple</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-Lens-Simple.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Simple.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Simple</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Infix type operators for simple lenses and traversals.
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Simple.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Simple</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Infix type operators for simple lenses and traversals.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t::-45--62-">:-&gt;</a> s a = <span class="keyword">forall</span> f. Functor f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><span class="keyword">type</span> <a href="#t::-61--62-">:=&gt;</a> s a = <span class="keyword">forall</span> f. Applicative f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><span class="keyword">type</span> <a href="#t::-60--45--62-">:&lt;-&gt;</a> s a = <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s s a a</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t::-45--62-" class="def">:-&gt;</a> s a = <span class="keyword">forall</span> f. Functor f =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Simple.html#%3A-%3E" class="link">Source</a></p><div class="doc"><p>This is a commonly used infix alias for a <code><code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code></code>.
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t::-61--62-" class="def">:=&gt;</a> s a = <span class="keyword">forall</span> f. Applicative f =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Simple.html#%3A%3D%3E" class="link">Source</a></p><div class="doc"><p>This is a commonly-used infix alias for a <code><code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code></code>.
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t::-60--45--62-" class="def">:&lt;-&gt;</a> s a = <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s s a a<a href="src/Control-Lens-Simple.html#%3A%3C-%3E" class="link">Source</a></p><div class="doc"><p>This is a commonly-used infix alias for a <code><code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code></code>
View
2  Control-Lens-TH.html
@@ -1,7 +1,7 @@
<!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.Lens.TH</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-Lens-TH.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-TH.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.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>TemplateHaskell</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.TH</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Constructing Lenses Automatically
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-TH.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.5: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>TemplateHaskell</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.TH</p></div><