Skip to content
Browse files

3.0 release docs

  • Loading branch information...
1 parent 0761b92 commit 15b597e5b0e34b552f290256a78fdbc0685deb5d @ekmett committed
Showing with 978 additions and 721 deletions.
  1. +1 −1 Control-Exception-Lens.html
  2. +1 −1 Control-Lens-Action.html
  3. +1 −1 Control-Lens-Combinators.html
  4. +1 −1 Control-Lens-Fold.html
  5. +1 −1 Control-Lens-Getter.html
  6. +1 −1 Control-Lens-Indexed.html
  7. +1 −1 Control-Lens-IndexedFold.html
  8. +1 −1 Control-Lens-IndexedGetter.html
  9. +1 −1 Control-Lens-IndexedLens.html
  10. +1 −1 Control-Lens-IndexedSetter.html
  11. +1 −1 Control-Lens-IndexedTraversal.html
  12. +25 −5 Control-Lens-Internal.html
  13. +4 −3 Control-Lens-Iso.html
  14. +1 −1 Control-Lens-Isomorphic.html
  15. +1 −1 Control-Lens-Plated.html
  16. +1 −1 Control-Lens-Projection.html
  17. +1 −1 Control-Lens-Representable.html
  18. +1 −1 Control-Lens-Setter.html
  19. +1 −1 Control-Lens-TH.html
  20. +6 −5 Control-Lens-Traversal.html
  21. +1 −1 Control-Lens-Tuple.html
  22. +11 −4 Control-Lens-Type.html
  23. +1 −1 Control-Lens-WithIndex.html
  24. +101 −0 Control-Lens-Zipper.html
  25. +1 −1 Control-Lens-Zoom.html
  26. +3 −3 Control-Lens.html
  27. +1 −1 Control-Parallel-Strategies-Lens.html
  28. +1 −1 Control-Seq-Lens.html
  29. +1 −1 Data-Array-Lens.html
  30. +1 −1 Data-Bits-Lens.html
  31. +1 −1 Data-ByteString-Lazy-Lens.html
  32. +1 −1 Data-ByteString-Lens.html
  33. +1 −1 Data-ByteString-Strict-Lens.html
  34. +1 −1 Data-Complex-Lens.html
  35. +1 −1 Data-Data-Lens.html
  36. +1 −1 Data-Dynamic-Lens.html
  37. +1 −1 Data-HashSet-Lens.html
  38. +1 −1 Data-IntSet-Lens.html
  39. +1 −1 Data-List-Lens.html
  40. +1 −1 Data-Monoid-Lens.html
  41. +1 −1 Data-Sequence-Lens.html
  42. +1 −1 Data-Set-Lens.html
  43. +1 −1 Data-Text-Lazy-Lens.html
  44. +1 −1 Data-Text-Lens.html
  45. +1 −1 Data-Text-Strict-Lens.html
  46. +1 −1 Data-Tree-Lens.html
  47. +1 −1 Data-Typeable-Lens.html
  48. +1 −1 GHC-Generics-Lens.html
  49. +1 −1 Language-Haskell-TH-Lens.html
  50. +1 −1 System-FilePath-Lens.html
  51. +2 −2 doc-index-124.html
  52. +2 −2 doc-index-126.html
  53. +2 −2 doc-index-37.html
  54. +2 −2 doc-index-38.html
  55. +2 −2 doc-index-42.html
  56. +2 −2 doc-index-43.html
  57. +2 −2 doc-index-45.html
  58. +2 −2 doc-index-46.html
  59. +2 −2 doc-index-47.html
  60. +4 −0 doc-index-58.html
  61. +2 −2 doc-index-60.html
  62. +2 −2 doc-index-61.html
  63. +2 −2 doc-index-94.html
  64. +2 −2 doc-index-95.html
  65. +2 −2 doc-index-A.html
  66. +2 −2 doc-index-All.html
  67. +2 −2 doc-index-B.html
  68. +2 −2 doc-index-C.html
  69. +2 −2 doc-index-D.html
  70. +2 −2 doc-index-E.html
  71. +2 −2 doc-index-F.html
  72. +2 −2 doc-index-G.html
  73. +2 −2 doc-index-H.html
  74. +2 −2 doc-index-I.html
  75. +2 −2 doc-index-L.html
  76. +2 −2 doc-index-M.html
  77. +2 −2 doc-index-N.html
  78. +2 −2 doc-index-O.html
  79. +2 −2 doc-index-P.html
  80. +2 −2 doc-index-Q.html
  81. +2 −2 doc-index-R.html
  82. +2 −2 doc-index-S.html
  83. +2 −2 doc-index-T.html
  84. +2 −2 doc-index-U.html
  85. +2 −2 doc-index-V.html
  86. +2 −2 doc-index-W.html
  87. +2 −2 doc-index-Z.html
  88. +2 −2 doc-index.html
  89. +2 −2 index-frames.html
  90. +4 −4 index.html
  91. BIN lens.haddock
  92. +4 −1 mini_Control-Lens-Internal.html
  93. +1 −1 mini_Control-Lens-Iso.html
  94. +1 −1 mini_Control-Lens-Traversal.html
  95. +2 −2 mini_Control-Lens-Type.html
  96. +10 −0 mini_Control-Lens-Zipper.html
  97. +523 −420 src/Control-Lens-Internal.html
  98. +159 −152 src/Control-Lens-Iso.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-2.9: 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> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a> b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> 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> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a> b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> a b<a href="src/Control-Exception-Lens.html#exception" class="link">Source</a></p><div class="doc"><p>Traverse the strongly typed <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a></code> contained in <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a></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.0: 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> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a> b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> 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> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a> b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> a b<a href="src/Control-Exception-Lens.html#exception" class="link">Source</a></p><div class="doc"><p>Traverse the strongly typed <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a></code> contained in <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a></code> where the type of your function matches
the desired <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a></code>.
</p><pre>
exception :: (<code>Applicative</code> f, <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a></code> a, <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a></code> b)
View
2 Control-Lens-Action.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.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-2.9: 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>None</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.0: 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>None</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 a c = <span class="keyword">forall</span> f r. <a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f =&gt; (c -&gt; f c) -&gt; a -&gt; f a</li><li class="src short"><a href="#v:act">act</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m c) -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> m a c</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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m c a b c d -&gt; a -&gt; m c</li><li class="src short"><a href="#v:performs">performs</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m e a b c d -&gt; (c -&gt; e) -&gt; a -&gt; m e</li><li class="src short"><a href="#v:liftAct">liftAct</a> :: (MonadTrans t, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m c a b c d -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> (t m) a c</li><li class="src short"><a href="#v:-94--33-">(^!)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; a -&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m c a b c d -&gt; m c</li><li class="src short"><span class="keyword">type</span> <a href="#t:MonadicFold">MonadicFold</a> m a c = <span class="keyword">forall</span> f r. (<a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f) =&gt; (c -&gt; f c) -&gt; a -&gt; f a</li><li class="src short"><span class="keyword">type</span> <a href="#t:Acting">Acting</a> m r a b c d = (c -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r d) -&gt; a -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r b</li></ul></div><div id="interface"><h1 id="g:1">Composable Actions
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-2.9: 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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; b) -&gt; m a -&gt; m b</li><li class="src short"><a href="#v:-60--36--33-">(&lt;$!)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> 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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> 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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/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.0: 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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; b) -&gt; m a -&gt; m b</li><li class="src short"><a href="#v:-60--36--33-">(&lt;$!)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> 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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> 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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> 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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Functor.html#t:-60--36-">&lt;$</a></code>) for monads.
View
2 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-2.9: 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>None</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.0: 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>None</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
View
2 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-2.9: 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>None</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.0: 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>None</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
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-2.9: 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>None</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.0: 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>None</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> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> k =&gt; ((c -&gt; <a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f d) -&gt; a -&gt; <a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f b) -&gt; k (c -&gt; f d) (a -&gt; f b)</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
2 Control-Lens-IndexedFold.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.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-2.9: 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>None</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.0: 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>None</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
View
2 Control-Lens-IndexedGetter.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.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-2.9: 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>None</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
+</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.0: 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>None</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 a c = <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 (c -&gt; f c) (a -&gt; f a)</li><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedGetting">IndexedGetting</a> i m a b c d = <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (c -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m d) (a -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m b)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedGetter">ReifiedIndexedGetter</a> i a c = <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 a c</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 a c = <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 (c -&gt; f c) (a -&gt; f a)<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 a b c d = <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (c -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m d) (a -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m b)<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>.
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-2.9: 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>None</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.0: 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>None</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
2 Control-Lens-IndexedSetter.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.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-2.9: 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>None</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.0: 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>None</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 a b c d = <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 (c -&gt; f d) (a -&gt; f b)</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> a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b</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> a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b</li><li class="src short"><a href="#v:isets">isets</a> :: ((i -&gt; c -&gt; d) -&gt; a -&gt; b) -&gt; <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i a b c d</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> a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b</li><li class="src short"><a href="#v:-37--64--61-">(%@=)</a> :: MonadState a 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> a a c d -&gt; (i -&gt; c -&gt; d) -&gt; m ()</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i a b c d = <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 a b c d</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIndexedSetter">SimpleIndexedSetter</a> i a b = <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIndexedSetter">SimpleReifiedIndexedSetter</a> i a b = <a href="Control-Lens-IndexedSetter.html#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i a a b b</li></ul></div><div id="interface"><h1 id="g:1">Indexed Setter
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-2.9: 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>None</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.0: 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>None</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
30 Control-Lens-Internal.html
@@ -1,12 +1,15 @@
<!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-2.9: 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>None</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">Implementation details
+</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.0: 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>None</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">Implementation details
+</a></li><li><a href="#g:2">Getter internals
+</a></li><li><a href="#g:3">Setter internals
+</a></li><li><a href="#g:4">Zipper internals
</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">data</span> <a href="#t:Context">Context</a> c d a = <a href="#v:Context">Context</a> (d -&gt; a) c</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Focusing">Focusing</a> m c a = <a href="#v:Focusing">Focusing</a> {<ul class="subs"><li><a href="#v:unfocusing">unfocusing</a> :: m (c, a)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingWith">FocusingWith</a> w m c a = <a href="#v:FocusingWith">FocusingWith</a> {<ul class="subs"><li><a href="#v:unfocusingWith">unfocusingWith</a> :: m (c, a, w)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingPlus">FocusingPlus</a> w k c a = <a href="#v:FocusingPlus">FocusingPlus</a> {<ul class="subs"><li><a href="#v:unfocusingPlus">unfocusingPlus</a> :: k (c, w) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingOn">FocusingOn</a> f k c a = <a href="#v:FocusingOn">FocusingOn</a> {<ul class="subs"><li><a href="#v:unfocusingOn">unfocusingOn</a> :: k (f c) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingErr">FocusingErr</a> e k c 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 c) a</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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> e a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingMay">FocusingMay</a> k c 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> c) a</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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> 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:Indexing">Indexing</a> f a = <a href="#v:Indexing">Indexing</a> {<ul class="subs"><li><a href="#v:runIndexing">runIndexing</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Control-Lens-Internal.html#t:IndexingResult">IndexingResult</a> f a</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:IndexingResult">IndexingResult</a> f a = <a href="#v:IndexingResult">IndexingResult</a> (f a) !<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</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; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> 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; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> 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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Control-Lens-Internal.html#t:ElementOfResult">ElementOfResult</a> f a</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:ElementOfResult">ElementOfResult</a> f a<ul class="subs"><li>= <a href="#v:Searching">Searching</a> !<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> a </li><li>| <a href="#v:Found">Found</a> !<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> (f a) </li><li>| <a href="#v:NotFound">NotFound</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> </li></ul></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Bazaar">Bazaar</a> c d a = <a href="#v:Bazaar">Bazaar</a> {<ul class="subs"><li><a href="#v:_runBazaar">_runBazaar</a> :: <span class="keyword">forall</span> f. <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (c -&gt; f d) -&gt; f a</li></ul>}</li><li class="src short"><a href="#v:bazaar">bazaar</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (c -&gt; f d) -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c d b -&gt; f b</li><li class="src short"><a href="#v:duplicateBazaar">duplicateBazaar</a> :: <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c e a -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c d (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> d e a)</li><li class="src short"><a href="#v:sell">sell</a> :: c -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c d d</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 s m c a = <a href="#v:EffectRWS">EffectRWS</a> {<ul class="subs"><li><a href="#v:getEffectRWS">getEffectRWS</a> :: s -&gt; m (c, s, w)</li></ul>}</li><li class="src short"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</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"><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">class</span> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> 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> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; f a</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">class</span> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> 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></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></ul></div><div id="interface"><h1 id="g:1">Implementation details
+</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Context">Context</a> c d a = <a href="#v:Context">Context</a> (d -&gt; a) c</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Focusing">Focusing</a> m c a = <a href="#v:Focusing">Focusing</a> {<ul class="subs"><li><a href="#v:unfocusing">unfocusing</a> :: m (c, a)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingWith">FocusingWith</a> w m c a = <a href="#v:FocusingWith">FocusingWith</a> {<ul class="subs"><li><a href="#v:unfocusingWith">unfocusingWith</a> :: m (c, a, w)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingPlus">FocusingPlus</a> w k c a = <a href="#v:FocusingPlus">FocusingPlus</a> {<ul class="subs"><li><a href="#v:unfocusingPlus">unfocusingPlus</a> :: k (c, w) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingOn">FocusingOn</a> f k c a = <a href="#v:FocusingOn">FocusingOn</a> {<ul class="subs"><li><a href="#v:unfocusingOn">unfocusingOn</a> :: k (f c) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingErr">FocusingErr</a> e k c 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 c) a</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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> e a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingMay">FocusingMay</a> k c 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> c) a</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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> 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:Indexing">Indexing</a> f a = <a href="#v:Indexing">Indexing</a> {<ul class="subs"><li><a href="#v:runIndexing">runIndexing</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Control-Lens-Internal.html#t:IndexingResult">IndexingResult</a> f a</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:IndexingResult">IndexingResult</a> f a = <a href="#v:IndexingResult">IndexingResult</a> (f a) !<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</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; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> 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; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> 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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Control-Lens-Internal.html#t:ElementOfResult">ElementOfResult</a> f a</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:ElementOfResult">ElementOfResult</a> f a<ul class="subs"><li>= <a href="#v:Searching">Searching</a> !<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> a </li><li>| <a href="#v:Found">Found</a> !<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> (f a) </li><li>| <a href="#v:NotFound">NotFound</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> </li></ul></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Bazaar">Bazaar</a> c d a = <a href="#v:Bazaar">Bazaar</a> {<ul class="subs"><li><a href="#v:_runBazaar">_runBazaar</a> :: <span class="keyword">forall</span> f. <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (c -&gt; f d) -&gt; f a</li></ul>}</li><li class="src short"><a href="#v:bazaar">bazaar</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (c -&gt; f d) -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c d b -&gt; f b</li><li class="src short"><a href="#v:duplicateBazaar">duplicateBazaar</a> :: <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c e a -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c d (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> d e a)</li><li class="src short"><a href="#v:sell">sell</a> :: c -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c d d</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 s m c a = <a href="#v:EffectRWS">EffectRWS</a> {<ul class="subs"><li><a href="#v:getEffectRWS">getEffectRWS</a> :: s -&gt; m (c, s, w)</li></ul>}</li><li class="src short"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</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"><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">class</span> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> 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> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; f a</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">class</span> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> 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></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">data</span> <a href="#t:Level">Level</a> a = <a href="#v:Level">Level</a> !<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> [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; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:leftLevel">leftLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<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:rightLevel">rightLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<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: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:rezipLevel">rezipLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; NonEmpty a</li><li class="src short"><a href="#v:focusLevel">focusLevel</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> 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></ul></div><div id="interface"><h1 id="g:1">Implementation details
</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Context" class="def">Context</a> c d a <a href="src/Control-Lens-Internal.html#Context" class="link">Source</a></p><div class="doc"><p>The indexed store can be used to characterize a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>
and is used by <code><a href="Control-Lens-Type.html#t:clone">clone</a></code>
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Context" class="def">Context</a> (d -&gt; a) c</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Context" class="caption collapser" onclick="toggleSection('i:Context')">Instances</p><div id="section.i:Context" class="show"><table><tr><td class="src">(Comonad (<a href="Control-Lens-Internal.html#t:Context">Context</a> c d), ~ * c d) =&gt; ComonadStore c (<a href="Control-Lens-Internal.html#t:Context">Context</a> c d)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:Context">Context</a> c d)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:Context">Context</a> c d), ~ * c d) =&gt; Comonad (<a href="Control-Lens-Internal.html#t:Context">Context</a> c d)</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 c 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>
@@ -39,7 +42,8 @@
</p></div></div><div class="top"><p class="src"><a name="v:sell" class="def">sell</a> :: c -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c d d<a href="src/Control-Lens-Internal.html#sell" class="link">Source</a></p><div class="doc"><p>A trivial <code><a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a></code>.
</p></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">(<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> 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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> r) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r) =&gt; <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">(MonadReader b (ReaderT b m), MonadReader a (ReaderT a m), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> 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">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> r) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> (<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 s m c 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> :: s -&gt; m (c, s, 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"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m c), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> c, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> w, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m c) =&gt; <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(MonadReader b (RWST b w s m), MonadReader a (RWST a w s m), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> 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">(MonadReader b (RWST b w s m), MonadReader a (RWST a w s m), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> 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">class</span> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> 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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Const">Const</a></code> so we can apply simple <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code>
+</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> :: s -&gt; m (c, s, 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"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m c), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> c, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> w, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m c) =&gt; <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(MonadReader b (RWST b w s m), MonadReader a (RWST a w s m), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> 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">(MonadReader b (RWST b w s m), MonadReader a (RWST a w s m), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> 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><h1 id="g:2">Getter internals
+</h1><div class="top"><p class="src"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> 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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Const">Const</a></code> so we can apply simple <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a></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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a></code> ignores its argument, which it carries solely as a
phantom type parameter.
@@ -54,10 +58,26 @@
</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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> Identity, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)) =&gt; <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">(<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> 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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> (Backwards f), <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 (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Dual">Dual</a> 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> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> 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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#v:mempty">mempty</a></code> equivalent for a <code><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a></code>.
</p></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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a></code> for a <code><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a></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, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> (<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">class</span> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> 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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a></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, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Control-Lens-Internal.html#t:Folding">Folding</a> f a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:3">Setter internals
+</h1><div class="top"><p class="src"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> 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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a></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></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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> (Backwards f), <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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> (Compose f g), <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><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"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</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> <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a></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.12.0</p></div></body></html>
+</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"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</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> <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:4">Zipper internals
+</h1><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.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Level" class="def">Level</a> !<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> [a] a [a]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Level" class="caption collapser" onclick="toggleSection('i:Level')">Instances</p><div id="section.i:Level" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> <a href="Control-Lens-Internal.html#t:Level">Level</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> <a href="Control-Lens-Internal.html#t:Level">Level</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="Control-Lens-Internal.html#t:Level">Level</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Comonad <a href="Control-Lens-Internal.html#t:Level">Level</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">ComonadStore <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> <a href="Control-Lens-Internal.html#t:Level">Level</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:levelWidth" class="def">levelWidth</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a><a href="src/Control-Lens-Internal.html#levelWidth" class="link">Source</a></p><div class="doc"><p>How many entries are there in this level?
+</p></div></div><div class="top"><p class="src"><a name="v:leftLevel" class="def">leftLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)<a href="src/Control-Lens-Internal.html#leftLevel" class="link">Source</a></p><div class="doc"><p>Pull the non-emtpy list zipper left one entry
+</p></div></div><div class="top"><p class="src"><a name="v:left1Level" class="def">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<a href="src/Control-Lens-Internal.html#left1Level" class="link">Source</a></p><div class="doc"><p>Pull the non-empty list zipper left one entry, stopping at the first entry.
+</p></div></div><div class="top"><p class="src"><a name="v:leftmostLevel" class="def">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<a href="src/Control-Lens-Internal.html#leftmostLevel" class="link">Source</a></p><div class="doc"><p>Pull the non-empty list zipper all the way to the left.
+</p></div></div><div class="top"><p class="src"><a name="v:rightLevel" class="def">rightLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)<a href="src/Control-Lens-Internal.html#rightLevel" class="link">Source</a></p><div class="doc"><p>Pull the non-empty list zipper right one entry.
+</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:rightmostLevel" class="def">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<a href="src/Control-Lens-Internal.html#rightmostLevel" class="link">Source</a></p><div class="doc"><p>Pul the non-empty list zipper all the way to the right.
+ <em>NB:</em>, when given an infinite list this may not terminate.
+</p></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><div class="top"><p class="src"><a name="v:focusLevel" class="def">focusLevel</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> 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>Simple</code> <code>Lens</code> (<code><a href="Control-Lens-Internal.html#t:Level">Level</a></code> a) a</pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.12.0</p></div></body></html>
View
7 Control-Lens-Iso.html
@@ -1,12 +1,12 @@
<!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-2.9: 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>None</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.0: 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>None</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">Primitive isomorphisms
</a><ul><li><a href="#g:3">Common Isomorphisms
</a></li></ul></li><li><a href="#g:4">Storing Isomorphisms
</a></li><li><a href="#g:5">Simplicity
-</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:Iso">Iso</a> a b c d = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f) =&gt; k (c -&gt; f d) (a -&gt; f b)</li><li class="src short"><a href="#v:iso">iso</a> :: (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f) =&gt; (a -&gt; b) -&gt; (b -&gt; a) -&gt; k (b -&gt; f b) (a -&gt; f a)</li><li class="src short"><a href="#v:isos">isos</a> :: (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f) =&gt; (a -&gt; c) -&gt; (c -&gt; a) -&gt; (b -&gt; d) -&gt; (d -&gt; b) -&gt; k (c -&gt; f d) (a -&gt; f b)</li><li class="src short"><a href="#v:ala">ala</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b -&gt; ((a -&gt; b) -&gt; c -&gt; b) -&gt; c -&gt; a</li><li class="src short"><a href="#v:auf">auf</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b -&gt; ((d -&gt; b) -&gt; c -&gt; b) -&gt; (d -&gt; a) -&gt; c -&gt; a</li><li class="src short"><a href="#v:under">under</a> :: <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> (c -&gt; <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> d) (a -&gt; <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> b) -&gt; (a -&gt; b) -&gt; c -&gt; d</li><li class="src short"><a href="#v:from">from</a> :: <a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Iso.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-Iso.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> a b -&gt; k a b</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"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Category.html#t:Category">Category</a> 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"><a href="#v:_const">_const</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Const">Const</a> a c) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Const">Const</a> b d)</li><li class="src short"><a href="#v:identity">identity</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b (Identity a) (Identity b)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIso">ReifiedIso</a> a b c d = <a href="#v:ReifyIso">ReifyIso</a> {<ul class="subs"><li><a href="#v:reflectIso">reflectIso</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b c d</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIso">SimpleIso</a> a b = <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIso">SimpleReifiedIso</a> a b = <a href="Control-Lens-Iso.html#t:ReifiedIso">ReifiedIso</a> a a b b</li></ul></div><div id="interface"><h1 id="g:1">Isomorphism Lenses
+</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:Iso">Iso</a> a b c d = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f) =&gt; k (c -&gt; f d) (a -&gt; f b)</li><li class="src short"><span class="keyword">type</span> <a href="#t::-60--45--62-">:&lt;-&gt;</a> a b = <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a a b b</li><li class="src short"><a href="#v:iso">iso</a> :: (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f) =&gt; (a -&gt; b) -&gt; (b -&gt; a) -&gt; k (b -&gt; f b) (a -&gt; f a)</li><li class="src short"><a href="#v:isos">isos</a> :: (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f) =&gt; (a -&gt; c) -&gt; (c -&gt; a) -&gt; (b -&gt; d) -&gt; (d -&gt; b) -&gt; k (c -&gt; f d) (a -&gt; f b)</li><li class="src short"><a href="#v:ala">ala</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b -&gt; ((a -&gt; b) -&gt; c -&gt; b) -&gt; c -&gt; a</li><li class="src short"><a href="#v:auf">auf</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b -&gt; ((d -&gt; b) -&gt; c -&gt; b) -&gt; (d -&gt; a) -&gt; c -&gt; a</li><li class="src short"><a href="#v:under">under</a> :: <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> (c -&gt; <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> d) (a -&gt; <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> b) -&gt; (a -&gt; b) -&gt; c -&gt; d</li><li class="src short"><a href="#v:from">from</a> :: <a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Iso.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-Iso.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> a b -&gt; k a b</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"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Category.html#t:Category">Category</a> 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"><a href="#v:_const">_const</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Const">Const</a> a c) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Const">Const</a> b d)</li><li class="src short"><a href="#v:identity">identity</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b (Identity a) (Identity b)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIso">ReifiedIso</a> a b c d = <a href="#v:ReifyIso">ReifyIso</a> {<ul class="subs"><li><a href="#v:reflectIso">reflectIso</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b c d</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIso">SimpleIso</a> a b = <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIso">SimpleReifiedIso</a> a b = <a href="Control-Lens-Iso.html#t:ReifiedIso">ReifiedIso</a> a a b b</li></ul></div><div id="interface"><h1 id="g:1">Isomorphism Lenses
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Iso" class="def">Iso</a> a b c d = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f) =&gt; k (c -&gt; f d) (a -&gt; f b)<a href="src/Control-Lens-Iso.html#Iso" class="link">Source</a></p><div class="doc"><p>Isomorphim families can be composed with other lenses using either (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Category.html#v:.">.</a></code>) and <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Category.html#v:id">id</a></code>
from the Prelude or from Control.Category. However, if you compose them
with each other using (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Category.html#v:.">.</a></code>) from the Prelude, they will be dumbed down to a
@@ -14,7 +14,8 @@
</p><pre>
import Control.Category
import Prelude hiding ((<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:.">.</a></code>),<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:id">id</a></code>)
-</pre><pre>type <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a b c d = forall k f. (<code><a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a></code> k, <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a></code> f) =&gt; <code><a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a></code> k f a b c d</pre></div></div><div class="top"><p class="src"><a name="v:iso" class="def">iso</a> :: (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f) =&gt; (a -&gt; b) -&gt; (b -&gt; a) -&gt; k (b -&gt; f b) (a -&gt; f a)<a href="src/Control-Lens-Iso.html#iso" class="link">Source</a></p><div class="doc"><p>Build a simple isomorphism from a pair of inverse functions
+</pre><pre>type <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a b c d = forall k f. (<code><a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a></code> k, <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a></code> f) =&gt; <code><a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a></code> k f a b c d</pre></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t::-60--45--62-" class="def">:&lt;-&gt;</a> a b = <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a a b b<a href="src/Control-Lens-Iso.html#%3A%3C-%3E" class="link">Source</a></p><div class="doc"><p>An commonly used infix alias for <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>
+</p></div></div><div class="top"><p class="src"><a name="v:iso" class="def">iso</a> :: (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f) =&gt; (a -&gt; b) -&gt; (b -&gt; a) -&gt; k (b -&gt; f b) (a -&gt; f a)<a href="src/Control-Lens-Iso.html#iso" class="link">Source</a></p><div class="doc"><p>Build a simple isomorphism from a pair of inverse functions
</p><pre>
<code><a href="Control-Lens-Getter.html#v:view">view</a></code> (<code><a href="Control-Lens-Iso.html#v:iso">iso</a></code> f g) &#8801; f
<code><a href="Control-Lens-Getter.html#v:view">view</a></code> (<code><a href="Control-Lens-Iso.html#v:from">from</a></code> (<code><a href="Control-Lens-Iso.html#v:iso">iso</a></code> f g)) &#8801; g
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-2.9: 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> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Category.html#t:Category">Category</a> 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> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Category.html#t:Category">Category</a> 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.0: 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> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Category.html#t:Category">Category</a> 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> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Category.html#t:Category">Category</a> 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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Category.html#t:Category">Category</a></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-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-2.9: 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>None</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.0: 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>None</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-2.9: 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>None</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.0: 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>None</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> a b c d = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Projection.html#t:Projective">Projective</a> k a d, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f) =&gt; k (c -&gt; f d) (a -&gt; f a)</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 a d =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Projection.html#t:Project">Project</a> a d) f a a c d -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f a a c d</li><li class="src short"><a href="#v:by">by</a> :: <a href="Control-Lens-Projection.html#t:Project">Project</a> a d (d -&gt; Identity d) (a -&gt; Identity a) -&gt; <a href="Control-Lens-Getter.html#t:Getter">Getter</a> d a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Project">Project</a> a d x y = <a href="#v:Project">Project</a> (d -&gt; a) (x -&gt; y)</li><li class="src short"><a href="#v:projection">projection</a> :: (d -&gt; a) -&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> c) -&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> a b c d</li><li class="src short"><a href="#v:stereo">stereo</a> :: <a href="Control-Lens-Projection.html#t:Projective">Projective</a> k a c =&gt; <a href="Control-Lens-Projection.html#t:Project">Project</a> b c y z -&gt; <a href="Control-Lens-Projection.html#t:Project">Project</a> a b 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 a c =&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a c -&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Projection.html#t:Projection">Projection</a> a c</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleProjection">SimpleProjection</a> a b = <a href="Control-Lens-Projection.html#t:Projection">Projection</a> a a b b</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> a b c d = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Projection.html#t:Projective">Projective</a> k a d, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f) =&gt; k (c -&gt; f d) (a -&gt; f a)<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">(~ * a a', ~ * d d') =&gt; <a href="Control-Lens-Projection.html#t:Projective">Projective</a> (<a href="Control-Lens-Projection.html#t:Project">Project</a> a d) a' d'</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 a d =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Projection.html#t:Project">Project</a> a d) f a a c d -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f a a c d<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-2.9: 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>None</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.0: 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>None</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
2 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-2.9: 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>None</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.0: 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>None</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
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-2.9: 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.0: 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
</a></li><li><a href="#g:2">Configuring Lenses
</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"><a href="#v:makeLenses">makeLenses</a> :: <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> [<a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Dec">Dec</a>]</li><li class="src short"><a href="#v:makeLensesFor">makeLensesFor</a> :: [(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a>)] -&gt; <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> [<a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Dec">Dec</a>]</li><li class="src short"><a href="#v:makeClassy">makeClassy</a> :: <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> [<a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Dec">Dec</a>]</li><li class="src short"><a href="#v:makeClassyFor">makeClassyFor</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -&gt; [(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a>)] -&gt; <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> [<a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Dec">Dec</a>]</li><li class="src short"><a href="#v:makeIso">makeIso</a> :: <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> [<a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Dec">Dec</a>]</li><li class="src short"><a href="#v:makeLensesWith">makeLensesWith</a> :: <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> [<a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Dec">Dec</a>]</li><li class="src short"><a href="#v:defaultRules">defaultRules</a> :: <a href="Control-Lens-TH.html#t:LensRules">LensRules</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:LensRules">LensRules</a> = <a href="#v:LensRules">LensRules</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a>) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a>) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a>)) (<a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Set.html#t:Set">Set</a> <a href="Control-Lens-TH.html#t:LensFlag">LensFlag</a>)</li><li class="src short"><a href="#v:lensRules">lensRules</a> :: <a href="Control-Lens-TH.html#t:LensRules">LensRules</a></li><li class="src short"><a href="#v:classyRules">classyRules</a> :: <a href="Control-Lens-TH.html#t:LensRules">LensRules</a></li><li class="src short"><a href="#v:isoRules">isoRules</a> :: <a href="Control-Lens-TH.html#t:LensRules">LensRules</a></li><li class="src short"><a href="#v:lensIso">lensIso</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a>)</li><li class="src short"><a href="#v:lensField">lensField</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a>)</li><li class="src short"><a href="#v:lensClass">lensClass</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a>))</li><li class="src short"><a href="#v:lensFlags">lensFlags</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> (<a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Set.html#t:Set">Set</a> <a href="Control-Lens-TH.html#t:LensFlag">LensFlag</a>)</li><li class="src short"><span class="keyword">data</span> <a href="#t:LensFlag">LensFlag</a> <ul class="subs"><li>= <a href="#v:SimpleLenses">SimpleLenses</a> </li><li>| <a href="#v:PartialLenses">PartialLenses</a> </li><li>| <a href="#v:BuildTraversals">BuildTraversals</a> </li><li>| <a href="#v:SingletonAndField">SingletonAndField</a> </li><li>| <a href="#v:SingletonIso">SingletonIso</a> </li><li>| <a href="#v:HandleSingletons">HandleSingletons</a> </li><li>| <a href="#v:SingletonRequired">SingletonRequired</a> </li><li>| <a href="#v:CreateClass">CreateClass</a> </li><li>| <a href="#v:CreateInstance">CreateInstance</a> </li><li>| <a href="#v:ClassRequired">ClassRequired</a> </li></ul></li><li class="src short"><a href="#v:simpleLenses">simpleLenses</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:partialLenses">partialLenses</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:buildTraversals">buildTraversals</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:handleSingletons">handleSingletons</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:singletonIso">singletonIso</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:singletonRequired">singletonRequired</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:createClass">createClass</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:createInstance">createInstance</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:classRequired">classRequired</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:singletonAndField">singletonAndField</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="Control-Lens-TH.html#t:LensRules">LensRules</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1 id="g:1">Constructing Lenses Automatically
</h1><div class="top"><p class="src"><a name="v:makeLenses" class="def">makeLenses</a> :: <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> [<a href="/usr/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/Language-Haskell-TH-Syntax.html#t:Dec">Dec</a>]<a href="src/Control-Lens-TH.html#makeLenses" class="link">Source</a></p><div class="doc"><p>Build lenses (and traversals) with a sensible default configuration.
View
11 Control-Lens-Traversal.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.Traversal</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-Traversal.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Traversal.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-2.9: 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>None</td></tr></table><p class="caption">Control.Lens.Traversal</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-Traversal.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.0: 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>None</td></tr></table><p class="caption">Control.Lens.Traversal</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Lenses
</a><ul><li><a href="#g:2">Lensing Traversals
</a></li></ul></li><li><a href="#g:3">Traversing and Lensing
</a></li><li><a href="#g:4">Common Traversals
@@ -18,7 +18,7 @@
for <code>(<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Const">Const</a></code> m)</code>. Everything you know how to do with a <code><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a></code>
container, you can with with a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, and here we provide
combinators that generalize the usual <code><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a></code> operations.
-</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:Traversal">Traversal</a> a b c d = <span class="keyword">forall</span> f. <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><a href="#v:element">element</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> t =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> (t a) a</li><li class="src short"><a href="#v:elementOf">elementOf</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f) a b c c -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c c</li><li class="src short"><a href="#v:traverseOf">traverseOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c d -&gt; (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><a href="#v:forOf">forOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c d -&gt; a -&gt; (c -&gt; f d) -&gt; f b</li><li class="src short"><a href="#v:sequenceAOf">sequenceAOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b (f c) c -&gt; a -&gt; f b</li><li class="src short"><a href="#v:mapMOf">mapMOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c d -&gt; (c -&gt; m d) -&gt; a -&gt; m b</li><li class="src short"><a href="#v:forMOf">forMOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c d -&gt; a -&gt; (c -&gt; m d) -&gt; m b</li><li class="src short"><a href="#v:sequenceOf">sequenceOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b (m c) c -&gt; a -&gt; m b</li><li class="src short"><a href="#v:transposeOf">transposeOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:ZipList">ZipList</a> a b [c] c -&gt; a -&gt; [b]</li><li class="src short"><a href="#v:mapAccumLOf">mapAccumLOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (Backwards (State s)) a b c d -&gt; (s -&gt; c -&gt; (s, d)) -&gt; s -&gt; a -&gt; (s, b)</li><li class="src short"><a href="#v:mapAccumROf">mapAccumROf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (State s) a b c d -&gt; (s -&gt; c -&gt; (s, d)) -&gt; s -&gt; a -&gt; (s, b)</li><li class="src short"><a href="#v:scanr1Of">scanr1Of</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (State (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> c)) a b c c -&gt; (c -&gt; c -&gt; c) -&gt; a -&gt; b</li><li class="src short"><a href="#v:scanl1Of">scanl1Of</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (Backwards (State (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> c))) a b c c -&gt; (c -&gt; c -&gt; c) -&gt; a -&gt; b</li><li class="src short"><span class="keyword">class</span> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> t, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> t) =&gt; <a href="#t:Traversable">Traversable</a> t <span class="keyword">where</span><ul class="subs"><li><a href="#v:traverse">traverse</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (a -&gt; f b) -&gt; t a -&gt; f (t b)</li></ul></li><li class="src short"><a href="#v:ignored">ignored</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a a c d</li><li class="src short"><a href="#v:traverseLeft">traverseLeft</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> b c) a b</li><li class="src short"><a href="#v:traverseRight">traverseRight</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> c b) a b</li><li class="src short"><a href="#v:both">both</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> (a, a) (b, b) a b</li><li class="src short"><a href="#v:cloneTraversal">cloneTraversal</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; ((c -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c d d) -&gt; a -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c d b) -&gt; (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><span class="keyword">data</span> <a href="#t:ReifiedTraversal">ReifiedTraversal</a> a b c d = <a href="#v:ReifyTraversal">ReifyTraversal</a> {<ul class="subs"><li><a href="#v:reflectTraversal">reflectTraversal</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a b c d</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleTraversal">SimpleTraversal</a> a b = <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedTraversal">SimpleReifiedTraversal</a> a b = <a href="Control-Lens-Traversal.html#t:ReifiedTraversal">ReifiedTraversal</a> a a b b</li></ul></div><div id="interface"><h1 id="g:1">Lenses
+</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:Traversal">Traversal</a> a b c d = <span class="keyword">forall</span> f. <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><span class="keyword">type</span> <a href="#t::-61--62-">:=&gt;</a> a b = <span class="keyword">forall</span> f. <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (b -&gt; f b) -&gt; a -&gt; f a</li><li class="src short"><a href="#v:element">element</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> t =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; t a <a href="Control-Lens-Type.html#t::-45--62-">:-&gt;</a> a</li><li class="src short"><a href="#v:elementOf">elementOf</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f) a b c c -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c c</li><li class="src short"><a href="#v:traverseOf">traverseOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c d -&gt; (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><a href="#v:forOf">forOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c d -&gt; a -&gt; (c -&gt; f d) -&gt; f b</li><li class="src short"><a href="#v:sequenceAOf">sequenceAOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b (f c) c -&gt; a -&gt; f b</li><li class="src short"><a href="#v:mapMOf">mapMOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c d -&gt; (c -&gt; m d) -&gt; a -&gt; m b</li><li class="src short"><a href="#v:forMOf">forMOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c d -&gt; a -&gt; (c -&gt; m d) -&gt; m b</li><li class="src short"><a href="#v:sequenceOf">sequenceOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b (m c) c -&gt; a -&gt; m b</li><li class="src short"><a href="#v:transposeOf">transposeOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:ZipList">ZipList</a> a b [c] c -&gt; a -&gt; [b]</li><li class="src short"><a href="#v:mapAccumLOf">mapAccumLOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (Backwards (State s)) a b c d -&gt; (s -&gt; c -&gt; (s, d)) -&gt; s -&gt; a -&gt; (s, b)</li><li class="src short"><a href="#v:mapAccumROf">mapAccumROf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (State s) a b c d -&gt; (s -&gt; c -&gt; (s, d)) -&gt; s -&gt; a -&gt; (s, b)</li><li class="src short"><a href="#v:scanr1Of">scanr1Of</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (State (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> c)) a b c c -&gt; (c -&gt; c -&gt; c) -&gt; a -&gt; b</li><li class="src short"><a href="#v:scanl1Of">scanl1Of</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (Backwards (State (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> c))) a b c c -&gt; (c -&gt; c -&gt; c) -&gt; a -&gt; b</li><li class="src short"><span class="keyword">class</span> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> t, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> t) =&gt; <a href="#t:Traversable">Traversable</a> t <span class="keyword">where</span><ul class="subs"><li><a href="#v:traverse">traverse</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (a -&gt; f b) -&gt; t a -&gt; f (t b)</li></ul></li><li class="src short"><a href="#v:ignored">ignored</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a a c d</li><li class="src short"><a href="#v:traverseLeft">traverseLeft</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> b c) a b</li><li class="src short"><a href="#v:traverseRight">traverseRight</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> c b) a b</li><li class="src short"><a href="#v:both">both</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> (a, a) (b, b) a b</li><li class="src short"><a href="#v:cloneTraversal">cloneTraversal</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; ((c -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c d d) -&gt; a -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c d b) -&gt; (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><span class="keyword">data</span> <a href="#t:ReifiedTraversal">ReifiedTraversal</a> a b c d = <a href="#v:ReifyTraversal">ReifyTraversal</a> {<ul class="subs"><li><a href="#v:reflectTraversal">reflectTraversal</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a b c d</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleTraversal">SimpleTraversal</a> a b = <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedTraversal">SimpleReifiedTraversal</a> a b = <a href="Control-Lens-Traversal.html#t:ReifiedTraversal">ReifiedTraversal</a> a a b b</li></ul></div><div id="interface"><h1 id="g:1">Lenses
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Traversal" class="def">Traversal</a> a b c d = <span class="keyword">forall</span> f. <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (c -&gt; f d) -&gt; a -&gt; f b<a href="src/Control-Lens-Traversal.html#Traversal" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> can be used directly as a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> or a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> (but not as a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>) and provides
the ability to both read and update multiple fields, subject to some relatively weak <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> laws.
</p><p>These have also been known as multilenses, but they have the signature and spirit of
@@ -35,8 +35,9 @@
is that the caveat expressed in section 5.5 of the &quot;Essence of the Iterator Pattern&quot; about exotic
<code><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a></code> instances that <code><a href="Control-Lens-Traversal.html#v:traverse">traverse</a></code> the same entry multiple times was actually already ruled out by the
second law in that same paper!
+</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t::-61--62-" class="def">:=&gt;</a> a b = <span class="keyword">forall</span> f. <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (b -&gt; f b) -&gt; a -&gt; f a<a href="src/Control-Lens-Traversal.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><h2 id="g:2">Lensing Traversals
-</h2><div class="top"><p class="src"><a name="v:element" class="def">element</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> t =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> (t a) a<a href="src/Control-Lens-Traversal.html#element" class="link">Source</a></p><div class="doc"><p>Access the <em>nth</em> element of a <code><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a></code> container.
+</h2><div class="top"><p class="src"><a name="v:element" class="def">element</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> t =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; t a <a href="Control-Lens-Type.html#t::-45--62-">:-&gt;</a> a<a href="src/Control-Lens-Traversal.html#element" class="link">Source</a></p><div class="doc"><p>Access the <em>nth</em> element of a <code><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a></code> container.
</p><p>Attempts to access beyond the range of the <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> will cause an error.
</p><pre><code><a href="Control-Lens-Traversal.html#v:element">element</a></code> &#8801; <code><a href="Control-Lens-Traversal.html#v:elementOf">elementOf</a></code> <code><a href="Control-Lens-Traversal.html#v:traverse">traverse</a></code></pre></div></div><div class="top"><p class="src"><a name="v:elementOf" class="def">elementOf</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f) a b c c -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c c<a href="src/Control-Lens-Traversal.html#elementOf" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> to 'Control.Lens.Getter.view'/'Control.Lens.Setter.set' the nth element <code><a href="Control-Lens-Traversal.html#v:elementOf">elementOf</a></code> a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> or <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code>.
</p><p>Attempts to access beyond the range of the <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> will cause an error.
@@ -143,7 +144,7 @@
(<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Traversable.html#v:foldMapDefault">foldMapDefault</a></code>).
</li></ul></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:traverse" class="def">traverse</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (a -&gt; f b) -&gt; t a -&gt; f (t b)</p><div class="doc"><p>Map each element of a structure to an action, evaluate
these actions from left to right, and collect the results.
-</p></div></div><div class="subs instances"><p id="control.i:Traversable" class="caption collapser" onclick="toggleSection('i:Traversable')">Instances</p><div id="section.i:Traversable" class="show"><table><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> []</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> Digit</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> Node</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> Elem</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> FingerTree</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Tree.html#t:Tree">Tree</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Sequence.html#t:Seq">Seq</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Sequence.html#t:ViewL">ViewL</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Sequence.html#t:ViewR">ViewR</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-IntMap-Strict.html#t:IntMap">IntMap</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> Identity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="/usr/share/doc/ghc/html/libraries/array-0.4.0.1/Data-Array.html#t:Array">Array</a> i), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (<a href="/usr/share/doc/ghc/html/libraries/array-0.4.0.1/Data-Array.html#t:Array">Array</a> i), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Ix.html#t:Ix">Ix</a> i) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (<a href="/usr/share/doc/ghc/html/libraries/array-0.4.0.1/Data-Array.html#t:Array">Array</a> i)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Map-Lazy.html#t:Map">Map</a> k), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (<a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Map-Lazy.html#t:Map">Map</a> k)) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (<a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Map-Lazy.html#t:Map">Map</a> k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (Backwards f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (Backwards f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (Backwards f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (IdentityT f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (IdentityT f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (IdentityT f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (MaybeT f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (MaybeT f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (MaybeT f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (ListT f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (ListT f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (ListT f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (HashMap k), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (HashMap k)) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (HashMap k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (EnvT e w), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (EnvT e w), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> w) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (EnvT e w)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (Compose f g), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (Compose f g), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f, <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> g) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (Compose f g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (ErrorT e f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (ErrorT e f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (ErrorT e f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (WriterT w f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (WriterT w f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (WriterT w f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (WriterT w f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (WriterT w f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (WriterT w f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:ignored" class="def">ignored</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a a c d<a href="src/Control-Lens-Traversal.html#ignored" class="link">Source</a></p><div class="doc"><p>This is the trivial empty traversal.
+</p></div></div><div class="subs instances"><p id="control.i:Traversable" class="caption collapser" onclick="toggleSection('i:Traversable')">Instances</p><div id="section.i:Traversable" class="show"><table><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> []</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> Digit</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> Node</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> Elem</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> FingerTree</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Tree.html#t:Tree">Tree</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Sequence.html#t:Seq">Seq</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Sequence.html#t:ViewL">ViewL</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Sequence.html#t:ViewR">ViewR</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-IntMap-Strict.html#t:IntMap">IntMap</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> NonEmpty</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> Identity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> <a href="Control-Lens-Internal.html#t:Level">Level</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="/usr/share/doc/ghc/html/libraries/array-0.4.0.1/Data-Array.html#t:Array">Array</a> i), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (<a href="/usr/share/doc/ghc/html/libraries/array-0.4.0.1/Data-Array.html#t:Array">Array</a> i), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Ix.html#t:Ix">Ix</a> i) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (<a href="/usr/share/doc/ghc/html/libraries/array-0.4.0.1/Data-Array.html#t:Array">Array</a> i)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Map-Lazy.html#t:Map">Map</a> k), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (<a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Map-Lazy.html#t:Map">Map</a> k)) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (<a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Map-Lazy.html#t:Map">Map</a> k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (Backwards f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (Backwards f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (Backwards f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (IdentityT f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (IdentityT f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (IdentityT f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (MaybeT f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (MaybeT f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (MaybeT f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (ListT f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (ListT f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (ListT f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (HashMap k), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (HashMap k)) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (HashMap k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (EnvT e w), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (EnvT e w), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> w) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (EnvT e w)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (Compose f g), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (Compose f g), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f, <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> g) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (Compose f g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (ErrorT e f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (ErrorT e f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (ErrorT e f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (WriterT w f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (WriterT w f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (WriterT w f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (WriterT w f), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (WriterT w f), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f) =&gt; <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (WriterT w f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:ignored" class="def">ignored</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a a c d<a href="src/Control-Lens-Traversal.html#ignored" class="link">Source</a></p><div class="doc"><p>This is the trivial empty traversal.
</p><pre><code><a href="Control-Lens-Traversal.html#v:ignored">ignored</a></code> :: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> f =&gt; (c -&gt; f d) -&gt; a -&gt; f a</pre><pre><code><a href="Control-Lens-Traversal.html#v:ignored">ignored</a></code> &#8801; <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:const">const</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#v:pure">pure</a></code></pre></div></div><div class="top"><p class="src"><a name="v:traverseLeft" class="def">traverseLeft</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> b c) a b<a href="src/Control-Lens-Traversal.html#traverseLeft" class="link">Source</a></p><div class="doc"><p>A traversal for tweaking the left-hand value of an <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a></code>:
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>over traverseLeft (+1) (Left 2)
</code></strong>Left 3
@@ -185,6 +186,6 @@
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>let foo l a = (view (cloneTraversal l) a, set (cloneTraversal l) 10 a)
</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>foo both (&quot;hello&quot;,&quot;world&quot;)
</code></strong>(&quot;helloworld&quot;,(10,10))
-</pre></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ReifiedTraversal" class="def">ReifiedTraversal</a> a b c d <a href="src/Control-Lens-Traversal.html#ReifiedTraversal" class="link">Source</a></p><div class="doc"><p>A form of <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> that can be stored monomorphically in a container.
+</pre><pre><code><a href="Control-Lens-Traversal.html#v:cloneTraversal">cloneTraversal</a></code> :: <code><a href="Control-Lens-Type.html#t:LensLike">LensLike</a></code> (<code><a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a></code> c d) a b c d -&gt; <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b c d</pre></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ReifiedTraversal" class="def">ReifiedTraversal</a> a b c d <a href="src/Control-Lens-Traversal.html#ReifiedTraversal" class="link">Source</a></p><div class="doc"><p>A form of <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> that can be stored monomorphically in a container.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyTraversal" class="def">ReifyTraversal</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:reflectTraversal" class="def">reflectTraversal</a> :: <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a b c d</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><h1 id="g:6">Simple
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleTraversal" class="def">SimpleTraversal</a> a b = <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a a b b<a href="src/Control-Lens-Traversal.html#SimpleTraversal" class="link">Source</a></p><div class="doc"><pre>type SimpleTraversal = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code></pre></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleReifiedTraversal" class="def">SimpleReifiedTraversal</a> a b = <a href="Control-Lens-Traversal.html#t:ReifiedTraversal">ReifiedTraversal</a> a a b b<a href="src/Control-Lens-Traversal.html#SimpleReifiedTraversal" class="link">Source</a></p><div class="doc"><pre>type SimpleReifiedTraversal = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:ReifiedTraversal">ReifiedTraversal</a></code></pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.12.0</p></div></body></html>
View
2 Control-Lens-Tuple.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.Tuple</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-Tuple.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Tuple.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-2.9: 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>None</td></tr></table><p class="caption">Control.Lens.Tuple</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Tuples
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Tuple.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.0: 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>None</td></tr></table><p class="caption">Control.Lens.Tuple</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Tuples
</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> <a href="#t:Field1">Field1</a> a b c d | a -&gt; c, b -&gt; d, a d -&gt; b, b c -&gt; a <span class="keyword">where</span><ul class="subs"><li><a href="#v:_1">_1</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:Field2">Field2</a> a b c d | a -&gt; c, b -&gt; d, a d -&gt; b, b c -&gt; a <span class="keyword">where</span><ul class="subs"><li><a href="#v:_2">_2</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:Field3">Field3</a> a b c d | a -&gt; c, b -&gt; d, a d -&gt; b, b c -&gt; a <span class="keyword">where</span><ul class="subs"><li><a href="#v:_3">_3</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:Field4">Field4</a> a b c d | a -&gt; c, b -&gt; d, a d -&gt; b, b c -&gt; a <span class="keyword">where</span><ul class="subs"><li><a href="#v:_4">_4</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:Field5">Field5</a> a b c d | a -&gt; c, b -&gt; d, a d -&gt; b, b c -&gt; a <span class="keyword">where</span><ul class="subs"><li><a href="#v:_5">_5</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:Field6">Field6</a> a b c d | a -&gt; c, b -&gt; d, a d -&gt; b, b c -&gt; a <span class="keyword">where</span><ul class="subs"><li><a href="#v:_6">_6</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:Field7">Field7</a> a b c d | a -&gt; c, b -&gt; d, a d -&gt; b, b c -&gt; a <span class="keyword">where</span><ul class="subs"><li><a href="#v:_7">_7</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:Field8">Field8</a> a b c d | a -&gt; c, b -&gt; d, a d -&gt; b, b c -&gt; a <span class="keyword">where</span><ul class="subs"><li><a href="#v:_8">_8</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:Field9">Field9</a> a b c d | a -&gt; c, b -&gt; d, a d -&gt; b, b c -&gt; a <span class="keyword">where</span><ul class="subs"><li><a href="#v:_9">_9</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d</li></ul></li></ul></div><div id="interface"><h1 id="g:1">Tuples
</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Field1" class="def">Field1</a> a b c d | a -&gt; c, b -&gt; d, a d -&gt; b, b c -&gt; a <span class="keyword">where</span><a href="src/Control-Lens-Tuple.html#Field1" class="link">Source</a></p><div class="doc"><p>Provides access to 1st field of a tuple.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_1" class="def">_1</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d<a href="src/Control-Lens-Tuple.html#_1" class="link">Source</a></p><div class="doc"><p>Access the 1st field of a tuple (and possibly change its type).
View
15 Control-Lens-Type.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.Type</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-Type.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Type.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-2.9: 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>None</td></tr></table><p class="caption">Control.Lens.Type</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-Type.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.0: 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>None</td></tr></table><p class="caption">Control.Lens.Type</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">Lateral Composition
</a></li><li><a href="#g:3">Setting Functionally with Passthrough
</a></li><li><a href="#g:4">Setting State with Passthrough
@@ -28,7 +28,7 @@
</p><p>The lens laws follow from this property and the desire for it to act like
a <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Traversable.html#t:Traversable">Traversable</a></code> when used as a
<code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>.
-</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Lens">Lens</a> a b c d = <span class="keyword">forall</span> f. <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><span class="keyword">type</span> <a href="#t:Simple">Simple</a> f a b = f a a b b</li><li class="src short"><a href="#v:lens">lens</a> :: (a -&gt; c) -&gt; (a -&gt; d -&gt; b) -&gt; <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d</li><li class="src short"><a href="#v:-37--37--126-">(%%~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c d -&gt; (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><a href="#v:-37--37--61-">(%%=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> e) a a c d -&gt; (c -&gt; (e, d)) -&gt; m e</li><li class="src short"><a href="#v:resultAt">resultAt</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Eq.html#t:Eq">Eq</a> e =&gt; e -&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> (e -&gt; a) a</li><li class="src short"><a href="#v:choosing">choosing</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c c -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a' b' c c -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> a a') (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> b b') c c</li><li class="src short"><a href="#v:chosen">chosen</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> a a) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> b b) a b</li><li class="src short"><a href="#v:alongside">alongside</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Context">Context</a> c d) a b c d -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Context">Context</a> c' d') a' b' c' d' -&gt; <a href="Control-Lens-Type.html#t:Lens">Lens</a> (a, a') (b, b') (c, c') (d, d')</li><li class="src short"><a href="#v:-60--37--126-">(&lt;%~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> d) a b c d -&gt; (c -&gt; d) -&gt; a -&gt; (d, b)</li><li class="src short"><a href="#v:-60--43--126-">(&lt;+~)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> c =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; c -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--45--126-">(&lt;-~)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> c =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; c -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--42--126-">(&lt;*~)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> c =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; c -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--47--47--126-">(&lt;//~)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Fractional">Fractional</a> c =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; c -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--94--126-">(&lt;^~)</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> c, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Integral">Integral</a> d) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; d -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--94--94--126-">(&lt;^^~)</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Fractional">Fractional</a> c, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Integral">Integral</a> d) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; d -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--42--42--126-">(&lt;**~)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Floating">Floating</a> c =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; c -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--124--124--126-">(&lt;||~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>) a b <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; a -&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>, b)</li><li class="src short"><a href="#v:-60--38--38--126-">(&lt;&amp;&amp;~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>) a b <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; a -&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>, b)</li><li class="src short"><a href="#v:-60--60--37--126-">(&lt;&lt;%~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c d -&gt; (c -&gt; d) -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--60-.-126-">(&lt;&lt;.~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c d -&gt; d -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--37--61-">(&lt;%=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> d) a a c d -&gt; (c -&gt; d) -&gt; m d</li><li class="src short"><a href="#v:-60--43--61-">(&lt;+=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> b) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; b -&gt; m b</li><li class="src short"><a href="#v:-60--45--61-">(&lt;-=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> b) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; b -&gt; m b</li><li class="src short"><a href="#v:-60--42--61-">(&lt;*=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> b) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; b -&gt; m b</li><li class="src short"><a href="#v:-60--47--47--61-">(&lt;//=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Fractional">Fractional</a> b) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; b -&gt; m b</li><li class="src short"><a href="#v:-60--94--61-">(&lt;^=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> b, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Integral">Integral</a> c) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; c -&gt; m b</li><li class="src short"><a href="#v:-60--94--94--61-">(&lt;^^=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Fractional">Fractional</a> b, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Integral">Integral</a> c) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; c -&gt; m b</li><li class="src short"><a href="#v:-60--42--42--61-">(&lt;**=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Floating">Floating</a> b) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; b -&gt; m b</li><li class="src short"><a href="#v:-60--124--124--61-">(&lt;||=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>) a <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-60--38--38--61-">(&lt;&amp;&amp;=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>) a <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-60--60--37--61-">(&lt;&lt;%=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a a c d -&gt; (c -&gt; d) -&gt; m c</li><li class="src short"><a href="#v:-60--60-.-61-">(&lt;&lt;.=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a a c d -&gt; d -&gt; m c</li><li class="src short"><a href="#v:cloneLens">cloneLens</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Context">Context</a> c d) a b c d -&gt; (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedLens">ReifiedLens</a> a b c d = <a href="#v:ReifyLens">ReifyLens</a> {<ul class="subs"><li><a href="#v:reflectLens">reflectLens</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:LensLike">LensLike</a> f a b c d = (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><span class="keyword">type</span> <a href="#t:Overloaded">Overloaded</a> k f a b c d = k (c -&gt; f d) (a -&gt; f b)</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleLens">SimpleLens</a> a b = <a href="Control-Lens-Type.html#t:Lens">Lens</a> a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleLensLike">SimpleLensLike</a> f a b = <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleOverloaded">SimpleOverloaded</a> k f a b = <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedLens">SimpleReifiedLens</a> a b = <a href="Control-Lens-Type.html#t:ReifiedLens">ReifiedLens</a> a a b b</li></ul></div><div id="interface"><h1 id="g:1">Lenses
+</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:Lens">Lens</a> a b c d = <span class="keyword">forall</span> f. <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><span class="keyword">type</span> <a href="#t:Simple">Simple</a> f a b = f a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t::-45--62-">:-&gt;</a> a b = <span class="keyword">forall</span> f. <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; (b -&gt; f b) -&gt; a -&gt; f a</li><li class="src short"><a href="#v:lens">lens</a> :: (a -&gt; c) -&gt; (a -&gt; d -&gt; b) -&gt; <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d</li><li class="src short"><a href="#v:-37--37--126-">(%%~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c d -&gt; (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><a href="#v:-37--37--61-">(%%=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> e) a a c d -&gt; (c -&gt; (e, d)) -&gt; m e</li><li class="src short"><a href="#v:resultAt">resultAt</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Eq.html#t:Eq">Eq</a> e =&gt; e -&gt; (e -&gt; a) <a href="Control-Lens-Type.html#t::-45--62-">:-&gt;</a> a</li><li class="src short"><a href="#v:choosing">choosing</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c c -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a' b' c c -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> a a') (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> b b') c c</li><li class="src short"><a href="#v:chosen">chosen</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> a a) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> b b) a b</li><li class="src short"><a href="#v:alongside">alongside</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Context">Context</a> c d) a b c d -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Context">Context</a> c' d') a' b' c' d' -&gt; <a href="Control-Lens-Type.html#t:Lens">Lens</a> (a, a') (b, b') (c, c') (d, d')</li><li class="src short"><a href="#v:-60--37--126-">(&lt;%~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> d) a b c d -&gt; (c -&gt; d) -&gt; a -&gt; (d, b)</li><li class="src short"><a href="#v:-60--43--126-">(&lt;+~)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> c =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; c -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--45--126-">(&lt;-~)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> c =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; c -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--42--126-">(&lt;*~)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> c =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; c -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--47--47--126-">(&lt;//~)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Fractional">Fractional</a> c =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; c -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--94--126-">(&lt;^~)</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> c, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Integral">Integral</a> d) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; d -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--94--94--126-">(&lt;^^~)</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Fractional">Fractional</a> c, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Integral">Integral</a> d) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; d -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--42--42--126-">(&lt;**~)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Floating">Floating</a> c =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c c -&gt; c -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--124--124--126-">(&lt;||~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>) a b <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; a -&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>, b)</li><li class="src short"><a href="#v:-60--38--38--126-">(&lt;&amp;&amp;~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>) a b <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; a -&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>, b)</li><li class="src short"><a href="#v:-60--60--37--126-">(&lt;&lt;%~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c d -&gt; (c -&gt; d) -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--60-.-126-">(&lt;&lt;.~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a b c d -&gt; d -&gt; a -&gt; (c, b)</li><li class="src short"><a href="#v:-60--37--61-">(&lt;%=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> d) a a c d -&gt; (c -&gt; d) -&gt; m d</li><li class="src short"><a href="#v:-60--43--61-">(&lt;+=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> b) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; b -&gt; m b</li><li class="src short"><a href="#v:-60--45--61-">(&lt;-=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> b) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; b -&gt; m b</li><li class="src short"><a href="#v:-60--42--61-">(&lt;*=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> b) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; b -&gt; m b</li><li class="src short"><a href="#v:-60--47--47--61-">(&lt;//=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Fractional">Fractional</a> b) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; b -&gt; m b</li><li class="src short"><a href="#v:-60--94--61-">(&lt;^=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Num">Num</a> b, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Integral">Integral</a> c) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; c -&gt; m b</li><li class="src short"><a href="#v:-60--94--94--61-">(&lt;^^=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Fractional">Fractional</a> b, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Integral">Integral</a> c) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; c -&gt; m b</li><li class="src short"><a href="#v:-60--42--42--61-">(&lt;**=)</a> :: (MonadState a m, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Floating">Floating</a> b) =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) a b -&gt; b -&gt; m b</li><li class="src short"><a href="#v:-60--124--124--61-">(&lt;||=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>) a <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-60--38--38--61-">(&lt;&amp;&amp;=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>) a <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-60--60--37--61-">(&lt;&lt;%=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a a c d -&gt; (c -&gt; d) -&gt; m c</li><li class="src short"><a href="#v:-60--60-.-61-">(&lt;&lt;.=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> c) a a c d -&gt; d -&gt; m c</li><li class="src short"><a href="#v:-60--60--126-">(&lt;&lt;~)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Context">Context</a> c d) a a c d -&gt; m d -&gt; m d</li><li class="src short"><a href="#v:cloneLens">cloneLens</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Context">Context</a> c d) a b c d -&gt; (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedLens">ReifiedLens</a> a b c d = <a href="#v:ReifyLens">ReifyLens</a> {<ul class="subs"><li><a href="#v:reflectLens">reflectLens</a> :: <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:LensLike">LensLike</a> f a b c d = (c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><span class="keyword">type</span> <a href="#t:Overloaded">Overloaded</a> k f a b c d = k (c -&gt; f d) (a -&gt; f b)</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleLens">SimpleLens</a> a b = <a href="Control-Lens-Type.html#t:Lens">Lens</a> a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleLensLike">SimpleLensLike</a> f a b = <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleOverloaded">SimpleOverloaded</a> k f a b = <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedLens">SimpleReifiedLens</a> a b = <a href="Control-Lens-Type.html#t:ReifiedLens">ReifiedLens</a> a a b b</li></ul></div><div id="interface"><h1 id="g:1">Lenses
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Lens" class="def">Lens</a> a b c d = <span class="keyword">forall</span> f. <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; (c -&gt; f d) -&gt; a -&gt; f b<a href="src/Control-Lens-Type.html#Lens" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> is actually a lens family as described in
<a href="http://comonad.com/reader/2012/mirrored-lenses/">http://comonad.com/reader/2012/mirrored-lenses/</a>.
</p><p>With great power comes great responsibility and a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>is subject to the
@@ -57,6 +57,7 @@
<code><a href="Data-List-Lens.html#t:traverseHead">traverseHead</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Lens.html#t:Traversal">Traversal</a></code> [a] a
</pre><p>Note: To use this alias in your own code with <code><code><a href="Control-Lens-Type.html#t:LensLike">LensLike</a></code> f</code> or
<code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code>, you may have to turn on <code>LiberalTypeSynonyms</code>.
+</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t::-45--62-" class="def">:-&gt;</a> a b = <span class="keyword">forall</span> f. <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; (b -&gt; f b) -&gt; a -&gt; f a<a href="src/Control-Lens-Type.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"><a name="v:lens" class="def">lens</a> :: (a -&gt; c) -&gt; (a -&gt; d -&gt; b) -&gt; <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b c d<a href="src/Control-Lens-Type.html#lens" class="link">Source</a></p><div class="doc"><p>Build a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> from a getter and a setter.
</p><pre><code><a href="Control-Lens-Type.html#v:lens">lens</a></code> :: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a></code> f =&gt; (a -&gt; c) -&gt; (a -&gt; d -&gt; b) -&gt; (c -&gt; f d) -&gt; a -&gt; f b</pre></div></div><div class="top"><p class="src"><a name="v:-37--37--126-" class="def">(%%~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c d -&gt; (c -&gt; f d) -&gt; a -&gt; f b<a href="src/Control-Lens-Type.html#%25%25~" class="link">Source</a></p><div class="doc"><p>(<code><a href="Control-Lens-Type.html#v:-37--37--126-">%%~</a></code>) can be used in one of two scenarios:
</p><p>When applied to a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, it can edit the target of the <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> in a
@@ -88,7 +89,7 @@
(<code><a href="Control-Lens-Type.html#v:-37--37--61-">%%=</a></code>) :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a a c d -&gt; (c -&gt; (e, d) -&gt; m e
(<code><a href="Control-Lens-Type.html#v:-37--37--61-">%%=</a></code>) :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a a c d -&gt; (c -&gt; (e, d) -&gt; m e
(<code><a href="Control-Lens-Type.html#v:-37--37--61-">%%=</a></code>) :: (<code>MonadState</code> a m, <code>Monoid</code> e) =&gt; <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a a c d -&gt; (c -&gt; (e, d) -&gt; m e
-</pre></div></div><div class="top"><p class="src"><a name="v:resultAt" class="def">resultAt</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Eq.html#t:Eq">Eq</a> e =&gt; e -&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> (e -&gt; a) a<a href="src/Control-Lens-Type.html#resultAt" class="link">Source</a></p><div class="doc"><p>This lens can be used to change the result of a function but only where
+</pre></div></div><div class="top"><p class="src"><a name="v:resultAt" class="def">resultAt</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Eq.html#t:Eq">Eq</a> e =&gt; e -&gt; (e -&gt; a) <a href="Control-Lens-Type.html#t::-45--62-">:-&gt;</a> a<a href="src/Control-Lens-Type.html#resultAt" class="link">Source</a></p><div class="doc"><p>This lens can be used to change the result of a function but only where
the arguments match the key given.
</p></div></div><h1 id="g:2">Lateral Composition
</h1><div class="top"><p class="src"><a name="v:choosing" class="def">choosing</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c c -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a' b' c c -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> a a') (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Either.html#t:Either">Either</a> b b') c c<a href="src/Control-Lens-Type.html#choosing" class="link">Source</a></p><div class="doc"><p>Merge two lenses, getters, setters, folds or traversals.
@@ -259,7 +260,13 @@
(<code><a href="Control-Lens-Type.html#v:-60--60--37--61-">&lt;&lt;%=</a></code>) :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a b -&gt; (b -&gt; b) -&gt; m b
(<code><a href="Control-Lens-Type.html#v:-60--60--37--61-">&lt;&lt;%=</a></code>) :: <code>MonadState</code> a m =&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> a b -&gt; (b -&gt; b) -&gt; m b
(<code><a href="Control-Lens-Type.html#v:-60--60--37--61-">&lt;&lt;%=</a></code>) :: (<code>MonadState</code> a m, <code>Monoid</code> b) =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code>Traveral</code> a b -&gt; (b -&gt; b) -&gt; m b
-</pre></div></div><h1 id="g:5">Cloning Lenses
+</pre></div></div><div class="top"><p class="src"><a name="v:-60--60--126-" class="def">(&lt;&lt;~)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Context">Context</a> c d) a a c d -&gt; m d -&gt; m d<a href="src/Control-Lens-Type.html#%3C%3C~" class="link">Source</a></p><div class="doc"><p>Run a monadic action, and set the target of <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> to its result.
+</p><pre>
+ (<code><a href="Control-Lens-Type.html#v:-60--60--126-">&lt;&lt;~</a></code>) :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a a c d -&gt; m d -&gt; m d
+ (<code><a href="Control-Lens-Type.html#v:-60--60--126-">&lt;&lt;~</a></code>) :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a a c d -&gt; m d -&gt; m d
+</pre><p>NB: This is limited to taking an actual <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> than admitting a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> because
+ there are potential loss of state issues otherwise.
+</p></div></div><h1 id="g:5">Cloning Lenses
</h1><div class="top"><p class="src"><a name="v:cloneLens" class="def">cloneLens</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Context">Context</a> c d) a b c d -&gt; (c -&gt; f d) -&gt; a -&gt; f b<a href="src/Control-Lens-Type.html#cloneLens" class="link">Source</a></p><div class="doc"><p>Cloning a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> is one way to make sure you arent given
something weaker, such as a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> and can be
used as a way to pass around lenses that have to be monomorphic in <code>f</code>.
View
2 Control-Lens-WithIndex.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.WithIndex</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-WithIndex.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-WithIndex.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-2.9: 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>None</td></tr></table><p class="caption">Control.Lens.WithIndex</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Functors
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-WithIndex.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.0: 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>None</td></tr></table><p class="caption">Control.Lens.WithIndex</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Functors
</a></li><li><a href="#g:2">Indexed Foldables
</a><ul><li><a href="#g:3">Indexed Foldable Combinators
</a></li></ul></li><li><a href="#g:4">Converting to Folds
View
101 Control-Lens-Zipper.html
@@ -0,0 +1,101 @@
+<!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.Zipper</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-Zipper.html");};
+//]]>
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Zipper.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.0: 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>experimental</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.Lens.Zipper</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Zippers
+</a><ul><li><a href="#g:2">Focusing
+</a></li><li><a href="#g:3">Horizontal movement
+</a></li><li><a href="#g:4">Lateral movement
+</a></li><li><a href="#g:5">Closing the Zipper
+</a></li><li><a href="#g:6">Saving your Progress
+</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module provides a <code><a href="Control-Lens-Zipper.html#t:Zipper">Zipper</a></code> with fairly strong type checking guarantees.
+</p><p>The code here is inspired by Brandon Simmons' <code>zippo</code> package, but uses
+ a slightly different approach to represent the <code><a href="Control-Lens-Zipper.html#t:Zipper">Zipper</a></code> that makes the whole thing
+ look like his breadcrumb trail, and can move side-to-side through traversals.
+</p><p>Some examples types:
+</p><dl><dt><code><code><a href="Control-Lens-Zipper.html#t:Top">Top</a></code> <code><a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a></code> a</code></dt><dd> represents a trivial <code><a href="Control-Lens-Zipper.html#t:Zipper">Zipper</a></code> with its focus at the root.
+</dd><dt><code><code><a href="Control-Lens-Zipper.html#t:Top">Top</a></code> <code><a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Tree.html#t:Tree">Tree</a></code> a <code><a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a></code> a</code></dt><dd> represents a zipper that starts with a
+ <code><a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Tree.html#t:Tree">Tree</a></code> and descends in a single step to values of type <code>a</code>.
+</dd><dt><code><code><a href="Control-Lens-Zipper.html#t:Top">Top</a></code> <code><a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Tree.html#t:Tree">Tree</a></code> a <code><a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Tree.html#t:Tree">Tree</a></code> a <code><a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Tree.html#t:Tree">Tree</a></code> a</code></dt><dd> represents a <code><a href="Control-Lens-Zipper.html#t:Zipper">Zipper</a></code> into a
+ <code><a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Tree.html#t:Tree">Tree</a></code> with an intermediate bookmarked <code><a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Tree.html#t:Tree">Tree</a></code>,
+ focusing in yet another <code><a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Tree.html#t:Tree">Tree</a></code>.
+</dd></dl><p>Since individual levels of a zipper are managed by an arbitrary <code>Traversal</code>,
+ you can move left and right through the <code>Traversal</code> selecting neighboring elements.
+</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>zipper (&quot;hello&quot;,&quot;world&quot;) % down _1 % fromWithin traverse % focus .~ 'J' % rightmost % focus .~ 'y' % rezip
+</code></strong>(&quot;Jelly&quot;,&quot;world&quot;)
+</pre><p>This is particularly powerful when compiled with <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>,
+ <code><a href="Data-Data-Lens.html#t:uniplate">uniplate</a></code> or <code><a href="Data-Data-Lens.html#t:biplate">biplate</a></code> for walking down into
+ self-similar children in syntax trees and other structures.
+</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Top">Top</a> </li><li class="src short"><span class="keyword">data</span> p <a href="#t::-62-">:&gt;</a> a</li><li class="src short"><a href="#v:zipper">zipper</a> :: a -&gt; <a href="Control-Lens-Zipper.html#t:Top">Top</a> <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a</li><li class="src short"><a href="#v:focus">focus</a> :: <a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a> (<a href="Control-Lens-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a)) (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a) a</li><li class="src short"><a href="#v:up">up</a> :: ((a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> c) -&gt; a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b</li><li class="src short"><a href="#v:down">down</a> :: <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Context">Context</a> c c) b c -&gt; (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> c</li><li class="src short"><a href="#v:within">within</a> :: <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) b c -&gt; (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> ((a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> c)</li><li class="src short"><a href="#v:fromWithin">fromWithin</a> :: <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) b c -&gt; (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> c</li><li class="src short"><a href="#v:left">left</a> :: (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b)</li><li class="src short"><a href="#v:left1">left1</a> :: (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b</li><li class="src short"><a href="#v:lefts">lefts</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a)</li><li class="src short"><a href="#v:lefts1">lefts1</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a) -&gt; h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a</li><li class="src short"><a href="#v:leftmost">leftmost</a> :: (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b</li><li class="src short"><a href="#v:right">right</a> :: (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b)</li><li class="src short"><a href="#v:right1">right1</a> :: (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b</li><li class="src short"><a href="#v:rights">rights</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a)</li><li class="src short"><a href="#v:rights1">rights1</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a) -&gt; h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a</li><li class="src short"><a href="#v:rightmost">rightmost</a> :: (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b</li><li class="src short"><a href="#v:goto">goto</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b)</li><li class="src short"><a href="#v:goto1">goto1</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> -&gt; (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b</li><li class="src short"><a href="#v:coordinate">coordinate</a> :: (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:width">width</a> :: (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:rezip">rezip</a> :: <a href="Control-Lens-Zipper.html#t:Zipper">Zipper</a> h a =&gt; (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="Control-Lens-Zipper.html#t:Zipped">Zipped</a> h a</li><li class="src short"><span class="keyword">type family</span> <a href="#t:Zipped">Zipped</a> h a </li><li class="src short"><span class="keyword">class</span> <a href="#t:Zipper">Zipper</a> h a </li><li class="src short"><span class="keyword">data</span> <a href="#t:Tape">Tape</a> k</li><li class="src short"><a href="#v:save">save</a> :: (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; <a href="Control-Lens-Zipper.html#t:Tape">Tape</a> (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b)</li><li class="src short"><a href="#v:restore">restore</a> :: <a href="Control-Lens-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="Control-Lens-Zipper.html#t:Zipped">Zipped</a> h a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a)</li><li class="src short"><a href="#v:restore1">restore1</a> :: <a href="Control-Lens-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="Control-Lens-Zipper.html#t:Zipped">Zipped</a> h a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a)</li><li class="src short"><a href="#v:unsafelyRestore">unsafelyRestore</a> :: <a href="Control-Lens-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="Control-Lens-Zipper.html#t:Zipped">Zipped</a> h a -&gt; h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a</li></ul></div><div id="interface"><h1 id="g:1">Zippers
+</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Top" class="def">Top</a> <a href="src/Control-Lens-Zipper.html#Top" class="link">Source</a></p><div class="doc"><p>This is used to represent the <code><a href="Control-Lens-Zipper.html#t:Top">Top</a></code> of the <code><a href="Control-Lens-Zipper.html#t:Zipper">Zipper</a></code>.
+</p><p>Every <code><a href="Control-Lens-Zipper.html#t:Zipper">Zipper</a></code> starts with <code><a href="Control-Lens-Zipper.html#t:Top">Top</a></code>.
+</p><p><em>e.g.</em> <code><code><a href="Control-Lens-Zipper.html#t:Top">Top</a></code> <code><a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a></code> a</code> is the trivial zipper.
+</p></div><div class="subs instances"><p id="control.i:Top" class="caption collapser" onclick="toggleSection('i:Top')">Instances</p><div id="section.i:Top" class="show"><table><tr><td class="src"><a href="Control-Lens-Zipper.html#t:Zipper">Zipper</a> <a href="Control-Lens-Zipper.html#t:Top">Top</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> p <a name="t::-62-" class="def">:&gt;</a> a <a href="src/Control-Lens-Zipper.html#%3A%3E" class="link">Source</a></p><div class="doc"><p>This is the type of a <code><a href="Control-Lens-Zipper.html#t:Zipper">Zipper</a></code>. It visually resembes a 'breadcrumb trail' as
+ used in website navigation. Each breadcrumb in the trail represents a level you
+ can move up to.
+</p><p>This type operator associates to the right, so you can use a type like
+</p><pre><code><a href="Control-Lens-Zipper.html#t:Top">Top</a></code> <code><a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a></code> (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a></code>,<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Double">Double</a></code>) <code><a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a></code> <code><a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Char.html#t:Char">Char</a></code></pre><p>to represent a zipper from <code>(<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a></code>,<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#t:Double">Double</a></code>)</code> down to <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Char.html#t:Char">Char</a></code> that has an intermediate
+ crumb for the <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a></code> containing the <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Char.html#t:Char">Char</a></code>.
+</p></div><div class="subs instances"><p id="control.i::-62-" class="caption collapser" onclick="toggleSection('i::-62-')">Instances</p><div id="section.i::-62-" class="show"><table><tr><td class="src"><a href="Control-Lens-Zipper.html#t:Zipper">Zipper</a> h b =&gt; <a href="Control-Lens-Zipper.html#t:Zipper">Zipper</a> (<a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> h b) c</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:zipper" class="def">zipper</a> :: a -&gt; <a href="Control-Lens-Zipper.html#t:Top">Top</a> <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a<a href="src/Control-Lens-Zipper.html#zipper" class="link">Source</a></p><div class="doc"><p>Construct a <code><a href="Control-Lens-Zipper.html#v:zipper">zipper</a></code> that can explore anything.
+</p></div></div><h2 id="g:2">Focusing
+</h2><div class="top"><p class="src"><a name="v:focus" class="def">focus</a> :: <a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a> (<a href="Control-Lens-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a)) (h <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> a) a<a href="src/Control-Lens-Zipper.html#focus" class="link">Source</a></p><div class="doc"><p>This <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> views the current target of the <code><a href="Control-Lens-Zipper.html#v:zipper">zipper</a></code>.
+</p></div></div><h2 id="g:3">Horizontal movement
+</h2><div class="top"><p class="src"><a name="v:up" class="def">up</a> :: ((a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> c) -&gt; a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b<a href="src/Control-Lens-Zipper.html#up" class="link">Source</a></p><div class="doc"><p>Move the <code><a href="Control-Lens-Zipper.html#v:zipper">zipper</a></code> <code><a href="Control-Lens-Zipper.html#v:up">up</a></code>, closing the current level and focusing on the parent element.
+</p></div></div><div class="top"><p class="src"><a name="v:down" class="def">down</a> :: <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Context">Context</a> c c) b c -&gt; (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> c<a href="src/Control-Lens-Zipper.html#down" class="link">Source</a></p><div class="doc"><p>Step down into a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>. This is a constrained form of <code><a href="Control-Lens-Zipper.html#v:fromWithin">fromWithin</a></code> for when you know
+ there is precisely one target.
+</p><pre>
+ <code><a href="Control-Lens-Zipper.html#v:down">down</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> b c -&gt; (a :&gt; b) -&gt; a :&gt; b :&gt; c
+ <code><a href="Control-Lens-Zipper.html#v:down">down</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code>Iso</code> b c -&gt; (a :&gt; b) -&gt; a :&gt; b :&gt; c
+</pre></div></div><div class="top"><p class="src"><a name="v:within" class="def">within</a> :: <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) b c -&gt; (a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> ((a <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Zipper.html#t::-62-">:&gt;</a> c)<a href="src/Control-Lens-Zipper.html#within" class="link">Source</a></p><div class="doc"><p>Step down into the <code><a href="Control-Lens-Zipper.html#v:leftmost">leftmost</a></code> entry of a <code>Traversal</code>.
+</p><pre>
+ <code><a href="Control-Lens-Zipper.html#v:within">within</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code>Traversal</code> b c -&gt; (a :&gt; b) -&gt; Maybe (a :&gt; b :&gt; c)
+ <code><a href="Control-Lens-Zipper.html#v:within">within</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> b c -&gt; (a :&gt; b) -&gt; Maybe (a :&gt; b :&gt; c)
+ <code><a href="Control-Lens-Zipper.html#v:within">within</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code>Iso</code> b c -&gt; (a :&gt; b) -&gt; Maybe (a :&gt; b :&gt; c)
+</pre></div></div><div class="top"><p class="src"><a name="v:fromWithin" class="def">fromWithin</a> :: <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a