Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

3.6 docs

  • Loading branch information...
commit e609ed72062620834982626cca1c84d6ca2bed14 1 parent b9b1e9c
@ekmett authored
Showing with 598 additions and 397 deletions.
  1. +1 −1  Control-Exception-Lens.html
  2. +5 −4 Control-Lens-Action.html
  3. +4 −14 Control-Lens-Classes.html
  4. +4 −3 Control-Lens-Combinators.html
  5. +2 −10 Control-Lens-Fold.html
  6. +6 −16 Control-Lens-Getter.html
  7. +1 −1  Control-Lens-Indexed.html
  8. +1 −1  Control-Lens-IndexedFold.html
  9. +1 −1  Control-Lens-IndexedGetter.html
  10. +1 −1  Control-Lens-IndexedLens.html
  11. +1 −1  Control-Lens-IndexedSetter.html
  12. +24 −6 Control-Lens-IndexedTraversal.html
  13. +101 −0 Control-Lens-Internal-Zipper.html
  14. +14 −33 Control-Lens-Internal.html
  15. +1 −1  Control-Lens-Iso.html
  16. +1 −1  Control-Lens-Isomorphic.html
  17. +1 −1  Control-Lens-Loupe.html
  18. +2 −2 Control-Lens-Plated.html
  19. +1 −1  Control-Lens-Projection.html
  20. +1 −1  Control-Lens-Representable.html
  21. +1 −1  Control-Lens-Setter.html
  22. +2 −1  Control-Lens-Simple.html
  23. +1 −1  Control-Lens-TH.html
  24. +28 −45 Control-Lens-Traversal.html
  25. +13 −3 Control-Lens-Tuple.html
  26. +1 −1  Control-Lens-Type.html
  27. +1 −1  Control-Lens-WithIndex.html
  28. +56 −57 Control-Lens-Zipper.html
  29. +1 −1  Control-Lens-Zoom.html
  30. +2 −2 Control-Lens.html
  31. +1 −1  Control-Parallel-Strategies-Lens.html
  32. +1 −1  Control-Seq-Lens.html
  33. +4 −4 Data-Array-Lens.html
  34. +58 −47 Data-Bits-Lens.html
  35. +1 −1  Data-ByteString-Lazy-Lens.html
  36. +2 −2 Data-ByteString-Lens.html
  37. +1 −1  Data-ByteString-Strict-Lens.html
  38. +13 −5 Data-Complex-Lens.html
  39. +56 −3 Data-Data-Lens.html
  40. +1 −1  Data-Dynamic-Lens.html
  41. +1 −1  Data-HashSet-Lens.html
  42. +1 −1  Data-IntSet-Lens.html
  43. +48 −6 Data-List-Lens.html
  44. +1 −1  Data-List-Split-Lens.html
  45. +9 −3 Data-Monoid-Lens.html
  46. +4 −4 Data-Sequence-Lens.html
  47. +1 −1  Data-Set-Lens.html
  48. +1 −1  Data-Text-Lazy-Lens.html
  49. +1 −1  Data-Text-Lens.html
  50. +1 −1  Data-Text-Strict-Lens.html
  51. +1 −1  Data-Tree-Lens.html
  52. +1 −1  Data-Typeable-Lens.html
  53. +6 −6 Data-Vector-Generic-Lens.html
  54. +6 −6 Data-Vector-Lens.html
  55. +1 −1  GHC-Generics-Lens.html
  56. +1 −1  Language-Haskell-TH-Lens.html
  57. +25 −15 System-FilePath-Lens.html
  58. +2 −2 doc-index-124.html
  59. +2 −2 doc-index-35.html
  60. +2 −2 doc-index-37.html
  61. +2 −2 doc-index-38.html
  62. +2 −2 doc-index-42.html
  63. +2 −2 doc-index-43.html
  64. +2 −2 doc-index-45.html
  65. +2 −2 doc-index-46.html
  66. +2 −2 doc-index-47.html
  67. +2 −2 doc-index-58.html
  68. +2 −2 doc-index-60.html
  69. +2 −2 doc-index-63.html
  70. +2 −2 doc-index-94.html
  71. +2 −2 doc-index-95.html
  72. +2 −2 doc-index-A.html
  73. +2 −2 doc-index-All.html
  74. +2 −2 doc-index-B.html
  75. +2 −2 doc-index-C.html
  76. +2 −2 doc-index-D.html
  77. +2 −2 doc-index-E.html
  78. +2 −2 doc-index-F.html
  79. +2 −2 doc-index-G.html
  80. +2 −2 doc-index-H.html
  81. +2 −2 doc-index-I.html
  82. +4 −0 doc-index-J.html
  83. +2 −2 doc-index-K.html
  84. +2 −2 doc-index-L.html
  85. +2 −2 doc-index-M.html
  86. +2 −2 doc-index-N.html
  87. +2 −2 doc-index-O.html
  88. +2 −2 doc-index-P.html
  89. +2 −2 doc-index-R.html
  90. +2 −2 doc-index-S.html
  91. +2 −2 doc-index-T.html
  92. +2 −2 doc-index-U.html
Sorry, we could not display the entire diff because it was too big.
View
2  Control-Exception-Lens.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Exception.Lens</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Exception-Lens.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Exception-Lens.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Control.Exception</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Exception.Lens</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:exception">exception</a> :: (Exception a, Exception b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> SomeException SomeException a b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:exception" class="def">exception</a> :: (Exception a, Exception b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> SomeException SomeException a b<a href="src/Control-Exception-Lens.html#exception" class="link">Source</a></p><div class="doc"><p>Traverse the strongly typed <code>Exception</code> contained in <code>SomeException</code> where the type of your function matches
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Exception-Lens.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Control.Exception</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Exception.Lens</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:exception">exception</a> :: (Exception a, Exception b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> SomeException SomeException a b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:exception" class="def">exception</a> :: (Exception a, Exception b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> SomeException SomeException a b<a href="src/Control-Exception-Lens.html#exception" class="link">Source</a></p><div class="doc"><p>Traverse the strongly typed <code>Exception</code> contained in <code>SomeException</code> where the type of your function matches
the desired <code>Exception</code>.
</p><pre>
exception :: (<code>Applicative</code> f, <code>Exception</code> a, <code>Exception</code> b)
View
9 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-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>MTPCs, FDs, Rank2</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Action</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Composable Actions
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Action.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>MTPCs, FDs, Rank2</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Action</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Composable Actions
</a></li><li><a href="#g:2">Folds with Effecs
</a></li><li><a href="#g:3">Implementation Details
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Action">Action</a> m s a = <span class="keyword">forall</span> f r. <a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><a href="#v:act">act</a> :: Monad m =&gt; (s -&gt; m a) -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> m s a</li><li class="src short"><a href="#v:acts">acts</a> :: <a href="Control-Lens-Action.html#t:Action">Action</a> m (m a) a</li><li class="src short"><a href="#v:perform">perform</a> :: Monad m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; s -&gt; m a</li><li class="src short"><a href="#v:performs">performs</a> :: Monad m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m e s t a b -&gt; (a -&gt; e) -&gt; s -&gt; m e</li><li class="src short"><a href="#v:liftAct">liftAct</a> :: (MonadTrans trans, Monad m) =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> (trans m) s a</li><li class="src short"><a href="#v:-94--33-">(^!)</a> :: Monad m =&gt; s -&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; m a</li><li class="src short"><span class="keyword">type</span> <a href="#t:MonadicFold">MonadicFold</a> m s a = <span class="keyword">forall</span> f r. (<a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><span class="keyword">type</span> <a href="#t:Acting">Acting</a> m r s t a b = (a -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r b) -&gt; s -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r t</li></ul></div><div id="interface"><h1 id="g:1">Composable Actions
@@ -9,12 +9,13 @@
</p><p>Every <code>Getter</code> can be used as an <code><a href="Control-Lens-Action.html#t:Action">Action</a></code>
</p><p>You can compose an <code><a href="Control-Lens-Action.html#t:Action">Action</a></code> with another <code><a href="Control-Lens-Action.html#t:Action">Action</a></code> using (<code>.</code>) from the <code>Prelude</code>.
</p></div></div><div class="top"><p class="src"><a name="v:act" class="def">act</a> :: Monad m =&gt; (s -&gt; m a) -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> m s a<a href="src/Control-Lens-Action.html#act" class="link">Source</a></p><div class="doc"><p>Construct an <code><a href="Control-Lens-Action.html#t:Action">Action</a></code> from a monadic side-effect
-</p></div></div><div class="top"><p class="src"><a name="v:acts" class="def">acts</a> :: <a href="Control-Lens-Action.html#t:Action">Action</a> m (m a) a<a href="src/Control-Lens-Action.html#acts" class="link">Source</a></p><div class="doc"><p>A self-running <code><a href="Control-Lens-Action.html#t:Action">Action</a></code>, analogous to <code><a href="Control-Monad.html#t:join">join</a></code>.
+</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[&quot;hello&quot;,&quot;world&quot;]^!folded.act (\x -&gt; [x,x ++ &quot;!&quot;])
+</code></strong>[&quot;helloworld&quot;,&quot;helloworld!&quot;,&quot;hello!world&quot;,&quot;hello!world!&quot;]
+</pre></div></div><div class="top"><p class="src"><a name="v:acts" class="def">acts</a> :: <a href="Control-Lens-Action.html#t:Action">Action</a> m (m a) a<a href="src/Control-Lens-Action.html#acts" class="link">Source</a></p><div class="doc"><p>A self-running <code><a href="Control-Lens-Action.html#t:Action">Action</a></code>, analogous to <code><a href="Control-Monad.html#t:join">join</a></code>.
</p><pre><code><a href="Control-Lens-Action.html#v:acts">acts</a></code> = <code><a href="Control-Lens-Action.html#v:act">act</a></code> <code>id</code></pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(1,&quot;hello&quot;)^!_2.acts.to succ
</code></strong>&quot;ifmmp&quot;
</pre></div></div><div class="top"><p class="src"><a name="v:perform" class="def">perform</a> :: Monad m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; s -&gt; m a<a href="src/Control-Lens-Action.html#perform" class="link">Source</a></p><div class="doc"><p>Perform an <code><a href="Control-Lens-Action.html#t:Action">Action</a></code>.
-</p><pre> perform = flip (^!)
-</pre></div></div><div class="top"><p class="src"><a name="v:performs" class="def">performs</a> :: Monad m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m e s t a b -&gt; (a -&gt; e) -&gt; s -&gt; m e<a href="src/Control-Lens-Action.html#performs" class="link">Source</a></p><div class="doc"><p>Perform an <code><a href="Control-Lens-Action.html#t:Action">Action</a></code> and modify the result.
+</p><pre><code><a href="Control-Lens-Action.html#v:perform">perform</a></code> &#8801; <code>flip</code> (<code><a href="Control-Lens-Action.html#v:-94--33-">^!</a></code>)</pre></div></div><div class="top"><p class="src"><a name="v:performs" class="def">performs</a> :: Monad m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m e s t a b -&gt; (a -&gt; e) -&gt; s -&gt; m e<a href="src/Control-Lens-Action.html#performs" class="link">Source</a></p><div class="doc"><p>Perform an <code><a href="Control-Lens-Action.html#t:Action">Action</a></code> and modify the result.
</p></div></div><div class="top"><p class="src"><a name="v:liftAct" class="def">liftAct</a> :: (MonadTrans trans, Monad m) =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> (trans m) s a<a href="src/Control-Lens-Action.html#liftAct" class="link">Source</a></p><div class="doc"><p>Apply a <code>Monad</code> transformer to an <code><a href="Control-Lens-Action.html#t:Action">Action</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:-94--33-" class="def">(^!)</a> :: Monad m =&gt; s -&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; m a<a href="src/Control-Lens-Action.html#%5E%21" class="link">Source</a></p><div class="doc"><p>Perform an <code><a href="Control-Lens-Action.html#t:Action">Action</a></code>
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[&quot;hello&quot;,&quot;world&quot;]^!folded.act putStrLn
View
18 Control-Lens-Classes.html
@@ -1,28 +1,18 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Classes</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Classes.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Classes.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.Classes</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Getters
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Classes.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.Classes</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Getters
</a></li><li><a href="#g:2">Actions
</a></li><li><a href="#g:3">Setters
-</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> (Functor f, <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> f) =&gt; <a href="#t:Gettable">Gettable</a> f <span class="keyword">where</span><ul class="subs"><li><a href="#v:coerce">coerce</a> :: f a -&gt; f b</li></ul></li><li class="src short"><a href="#v:noEffect">noEffect</a> :: (Applicative f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; f a</li><li class="src short"><span class="keyword">class</span> (Monad m, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; <a href="#t:Effective">Effective</a> m r f | f -&gt; m r <span class="keyword">where</span><ul class="subs"><li><a href="#v:effective">effective</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; k (m r) (f a)</li></ul></li><li class="src short"><a href="#v:ineffective">ineffective</a> :: <a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r f =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; k (f a) (m r)</li><li class="src short"><span class="keyword">class</span> Applicative f =&gt; <a href="#t:Settable">Settable</a> f <span class="keyword">where</span><ul class="subs"><li><a href="#v:untainted">untainted</a> :: f a -&gt; a</li><li><a href="#v:untainted-35-">untainted#</a> :: (a -&gt; f b) -&gt; a -&gt; b</li><li><a href="#v:tainted-35-">tainted#</a> :: (a -&gt; b) -&gt; a -&gt; f b</li></ul></li></ul></div><div id="interface"><h1 id="g:1">Getters
-</h1><div class="top"><p class="src"><span class="keyword">class</span> (Functor f, <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> f) =&gt; <a name="t:Gettable" class="def">Gettable</a> f <span class="keyword">where</span><a href="src/Control-Lens-Classes.html#Gettable" class="link">Source</a></p><div class="doc"><p>Generalizing <code>Const</code> so we can apply simple <code>Applicative</code>
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> Functor f =&gt; <a href="#t:Gettable">Gettable</a> f <span class="keyword">where</span><ul class="subs"><li><a href="#v:coerce">coerce</a> :: f a -&gt; f b</li></ul></li><li class="src short"><a href="#v:noEffect">noEffect</a> :: (Applicative f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; f a</li><li class="src short"><span class="keyword">class</span> (Monad m, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; <a href="#t:Effective">Effective</a> m r f | f -&gt; m r <span class="keyword">where</span><ul class="subs"><li><a href="#v:effective">effective</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; k (m r) (f a)</li></ul></li><li class="src short"><a href="#v:ineffective">ineffective</a> :: <a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r f =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; k (f a) (m r)</li><li class="src short"><span class="keyword">class</span> Applicative f =&gt; <a href="#t:Settable">Settable</a> f <span class="keyword">where</span><ul class="subs"><li><a href="#v:untainted">untainted</a> :: f a -&gt; a</li><li><a href="#v:untainted-35-">untainted#</a> :: (a -&gt; f b) -&gt; a -&gt; b</li><li><a href="#v:tainted-35-">tainted#</a> :: (a -&gt; b) -&gt; a -&gt; f b</li></ul></li></ul></div><div id="interface"><h1 id="g:1">Getters
+</h1><div class="top"><p class="src"><span class="keyword">class</span> Functor f =&gt; <a name="t:Gettable" class="def">Gettable</a> f <span class="keyword">where</span><a href="src/Control-Lens-Classes.html#Gettable" class="link">Source</a></p><div class="doc"><p>Generalizing <code>Const</code> so we can apply simple <code>Applicative</code>
transformations to it and so we can get nicer error messages
</p><p>A <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> <code>Functor</code> ignores its argument, which it carries solely as a
phantom type parameter.
</p><p>To ensure this, an instance of <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> is required to satisfy:
</p><pre><code>id</code> = <code>fmap</code> f = <code><a href="Control-Lens-Classes.html#v:coerce">coerce</a></code></pre><p>Which is equivalent to making a <code><code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> f</code> an &quot;anyvariant&quot; functor.
-</p><p>Due to the structure of this library, if you built an illegal <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code>
- instance that defined <code><code><a href="Control-Lens-Classes.html#v:coerce">coerce</a></code> = <code>undefined</code></code>, it would be possible to
- produce code that would <code>unsafeCoerce</code>.
-</p><p>This would violate the promises of <code>SafeHaskell</code>.
-</p><p>That said, the existing instances are all safe. To verify that any
- additional instances that *you* provide are safe, you must
-</p><pre> import Control.Lens.Unsafe
-</pre><p>and provide an instance of <code>Trustworthy</code> for your data type. That module
- does not make <code>SafeHaskell</code> guarantees, so by doing so you've taken the
- <code>SafeHaskell</code> proof obligation into your own hands.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:coerce" class="def">coerce</a> :: f a -&gt; f b<a href="src/Control-Lens-Classes.html#coerce" class="link">Source</a></p><div class="doc"><p>Replace the phantom type argument.
-</p></div></div><div class="subs instances"><p id="control.i:Gettable" class="caption collapser" onclick="toggleSection('i:Gettable')">Instances</p><div id="section.i:Gettable" class="show"><table><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (Const r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (Backwards f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Functor f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g) =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (Compose f g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:noEffect" class="def">noEffect</a> :: (Applicative f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; f a<a href="src/Control-Lens-Classes.html#noEffect" class="link">Source</a></p><div class="doc"><p>The <code>mempty</code> equivalent for a <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> <code>Applicative</code> <code>Functor</code>.
+</p></div></div><div class="subs instances"><p id="control.i:Gettable" class="caption collapser" onclick="toggleSection('i:Gettable')">Instances</p><div id="section.i:Gettable" class="show"><table><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (Const r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (Backwards f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Functor f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g) =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (Compose f g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:noEffect" class="def">noEffect</a> :: (Applicative f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; f a<a href="src/Control-Lens-Classes.html#noEffect" class="link">Source</a></p><div class="doc"><p>The <code>mempty</code> equivalent for a <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> <code>Applicative</code> <code>Functor</code>.
</p></div></div><h1 id="g:2">Actions
</h1><div class="top"><p class="src"><span class="keyword">class</span> (Monad m, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; <a name="t:Effective" class="def">Effective</a> m r f | f -&gt; m r <span class="keyword">where</span><a href="src/Control-Lens-Classes.html#Effective" class="link">Source</a></p><div class="doc"><p>An <code><a href="Control-Lens-Classes.html#t:Effective">Effective</a></code> <code>Functor</code> ignores its argument and is isomorphic to a monad wrapped around a value.
</p><p>That said, the monad is possibly rather unrelated to any <code>Applicative</code> structure.
View
7 Control-Lens-Combinators.html
@@ -1,10 +1,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Combinators</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Combinators.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Combinators.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Combinators</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:-60--36--33--62-">(&lt;$!&gt;)</a> :: Monad m =&gt; (a -&gt; b) -&gt; m a -&gt; m b</li><li class="src short"><a href="#v:-60--36--33-">(&lt;$!)</a> :: Monad m =&gt; b -&gt; m a -&gt; m b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:-60--36--33--62-" class="def">(&lt;$!&gt;)</a> :: Monad m =&gt; (a -&gt; b) -&gt; m a -&gt; m b<a href="src/Control-Lens-Combinators.html#%3C%24%21%3E" class="link">Source</a></p><div class="doc"><p>A strict version of (<code><a href="Data-Functor.html#t:-60--36--62-">&lt;$&gt;</a></code>) for monads.
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Combinators.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Combinators</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:-60--36--33--62-">(&lt;$!&gt;)</a> :: Monad m =&gt; (a -&gt; b) -&gt; m a -&gt; m b</li><li class="src short"><a href="#v:-60--36--33-">(&lt;$!)</a> :: Monad m =&gt; b -&gt; m a -&gt; m b</li><li class="src short"><a href="#v:-60--38--62-">(&lt;&amp;&gt;)</a> :: Functor f =&gt; f a -&gt; (a -&gt; b) -&gt; f b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:-60--36--33--62-" class="def">(&lt;$!&gt;)</a> :: Monad m =&gt; (a -&gt; b) -&gt; m a -&gt; m b<a href="src/Control-Lens-Combinators.html#%3C%24%21%3E" class="link">Source</a></p><div class="doc"><p>A strict version of (<code>&lt;$&gt;</code>) for monads.
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(+1) &lt;$!&gt; [1,2,3,4]
</code></strong>[2,3,4,5]
-</pre></div></div><div class="top"><p class="src"><a name="v:-60--36--33-" class="def">(&lt;$!)</a> :: Monad m =&gt; b -&gt; m a -&gt; m b<a href="src/Control-Lens-Combinators.html#%3C%24%21" class="link">Source</a></p><div class="doc"><p>A strict version of (<code><a href="Data-Functor.html#t:-60--36-">&lt;$</a></code>) for monads.
+</pre></div></div><div class="top"><p class="src"><a name="v:-60--36--33-" class="def">(&lt;$!)</a> :: Monad m =&gt; b -&gt; m a -&gt; m b<a href="src/Control-Lens-Combinators.html#%3C%24%21" class="link">Source</a></p><div class="doc"><p>A strict version of (<code>&lt;$</code>) for monads.
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>() &lt;$! [1,2,3,4]
</code></strong>[(),(),(),()]
-</pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>
+</pre></div></div><div class="top"><p class="src"><a name="v:-60--38--62-" class="def">(&lt;&amp;&gt;)</a> :: Functor f =&gt; f a -&gt; (a -&gt; b) -&gt; f b<a href="src/Control-Lens-Combinators.html#%3C%26%3E" class="link">Source</a></p><div class="doc"><p>Infix flipped fmap.
+</p><pre>(<code><a href="Control-Lens-Combinators.html#v:-60--38--62-">&lt;&amp;&gt;</a></code>) = <code>flip</code> <code>fmap</code></pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>
View
12 Control-Lens-Fold.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Fold</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Fold.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Fold.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Fold</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Folds
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Fold.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Fold</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Folds
</a><ul><li><a href="#g:2">Building Folds
</a></li><li><a href="#g:3">Folding
</a></li></ul></li><li><a href="#g:4">Storing Folds
@@ -19,7 +19,7 @@
<code>Applicative</code> transformers.
</p><p>Everything you can do with a <code>Foldable</code> container, you can with with a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> and there are
combinators that generalize the usual <code>Foldable</code> operations here.
-</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Fold">Fold</a> s a = <span class="keyword">forall</span> f. (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><a href="#v:-94-..">(^..)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] s t a b -&gt; [a]</li><li class="src short"><a href="#v:-94--63-">(^?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; Maybe a</li><li class="src short"><a href="#v:-94--63--33-">(^?!)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; a</li><li class="src short"><a href="#v:-94--33--63-">(^!?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; a</li><li class="src short"><a href="#v:folding">folding</a> :: (Foldable f, Applicative g, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g) =&gt; (s -&gt; f a) -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g s t a b</li><li class="src short"><a href="#v:folded">folded</a> :: Foldable f =&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> (f a) a</li><li class="src short"><a href="#v:unfolded">unfolded</a> :: (b -&gt; Maybe (a, b)) -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> b a</li><li class="src short"><a href="#v:iterated">iterated</a> :: (a -&gt; a) -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:filtered">filtered</a> :: Applicative f =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> f a a</li><li class="src short"><a href="#v:backwards">backwards</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (Backwards f) s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b</li><li class="src short"><a href="#v:repeated">repeated</a> :: <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:replicated">replicated</a> :: Int -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:cycled">cycled</a> :: (Applicative f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b</li><li class="src short"><a href="#v:takingWhile">takingWhile</a> :: (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a</li><li class="src short"><a href="#v:droppingWhile">droppingWhile</a> :: (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s, f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a</li><li class="src short"><a href="#v:foldMapOf">foldMapOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldOf">foldOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldrOf">foldrOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo r) s t a b -&gt; (a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldlOf">foldlOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo r)) s t a b -&gt; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:toListOf">toListOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo [a]) s t a b -&gt; s -&gt; [a]</li><li class="src short"><a href="#v:anyOf">anyOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:allOf">allOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:andOf">andOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t Bool b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:orOf">orOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t Bool b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:productOf">productOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Product a) s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:sumOf">sumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Sum a) s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:traverseOf_">traverseOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; (a -&gt; f r) -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:forOf_">forOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; s -&gt; (a -&gt; f r) -&gt; f ()</li><li class="src short"><a href="#v:sequenceAOf_">sequenceAOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t (f ()) b -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:mapMOf_">mapMOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; (a -&gt; m r) -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:forMOf_">forMOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; s -&gt; (a -&gt; m r) -&gt; m ()</li><li class="src short"><a href="#v:sequenceOf_">sequenceOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t (m a) b -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:asumOf">asumOf</a> :: Alternative f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f a)) s t (f a) b -&gt; s -&gt; f a</li><li class="src short"><a href="#v:msumOf">msumOf</a> :: MonadPlus m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (m a)) s t (m a) b -&gt; s -&gt; m a</li><li class="src short"><a href="#v:concatMapOf">concatMapOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [r] s t a b -&gt; (a -&gt; [r]) -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:concatOf">concatOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [r] s t [r] b -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:elemOf">elemOf</a> :: Eq a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t a b -&gt; a -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:notElemOf">notElemOf</a> :: Eq a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; a -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:lengthOf">lengthOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Sum Int) s t a b -&gt; s -&gt; Int</li><li class="src short"><a href="#v:nullOf">nullOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:headOf">headOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:lastOf">lastOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Last a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:maximumOf">maximumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Max">Max</a> a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:minimumOf">minimumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Min">Min</a> a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:maximumByOf">maximumByOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; Ordering) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:minimumByOf">minimumByOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; Ordering) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:findOf">findOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:foldrOf-39-">foldrOf'</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (r -&gt; r))) s t a b -&gt; (a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldlOf-39-">foldlOf'</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (r -&gt; r)) s t a b -&gt; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldr1Of">foldr1Of</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; a) -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldl1Of">foldl1Of</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (Maybe a))) s t a b -&gt; (a -&gt; a -&gt; a) -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldrMOf">foldrMOf</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (r -&gt; m r))) s t a b -&gt; (a -&gt; r -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:foldlMOf">foldlMOf</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (r -&gt; m r)) s t a b -&gt; (r -&gt; a -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedFold">ReifiedFold</a> s a = <a href="#v:ReifyFold">ReifyFold</a> {<ul class="subs"><li><a href="#v:reflectFold">reflectFold</a> :: <a href="Control-Lens-Fold.html#t:Fold">Fold</a> s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Folds
+</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Fold">Fold</a> s a = <span class="keyword">forall</span> f. (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><a href="#v:-94-..">(^..)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] s t a b -&gt; [a]</li><li class="src short"><a href="#v:-94--63-">(^?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; Maybe a</li><li class="src short"><a href="#v:-94--63--33-">(^?!)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; a</li><li class="src short"><a href="#v:folding">folding</a> :: (Foldable f, Applicative g, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g) =&gt; (s -&gt; f a) -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g s t a b</li><li class="src short"><a href="#v:folded">folded</a> :: Foldable f =&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> (f a) a</li><li class="src short"><a href="#v:unfolded">unfolded</a> :: (b -&gt; Maybe (a, b)) -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> b a</li><li class="src short"><a href="#v:iterated">iterated</a> :: (a -&gt; a) -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:filtered">filtered</a> :: Applicative f =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> f a a</li><li class="src short"><a href="#v:backwards">backwards</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (Backwards f) s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b</li><li class="src short"><a href="#v:repeated">repeated</a> :: <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:replicated">replicated</a> :: Int -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:cycled">cycled</a> :: (Applicative f, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b</li><li class="src short"><a href="#v:takingWhile">takingWhile</a> :: (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a</li><li class="src short"><a href="#v:droppingWhile">droppingWhile</a> :: (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s, f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a</li><li class="src short"><a href="#v:foldMapOf">foldMapOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldOf">foldOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldrOf">foldrOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo r) s t a b -&gt; (a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldlOf">foldlOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo r)) s t a b -&gt; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:toListOf">toListOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo [a]) s t a b -&gt; s -&gt; [a]</li><li class="src short"><a href="#v:anyOf">anyOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:allOf">allOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:andOf">andOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t Bool b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:orOf">orOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t Bool b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:productOf">productOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Product a) s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:sumOf">sumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Sum a) s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:traverseOf_">traverseOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; (a -&gt; f r) -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:forOf_">forOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; s -&gt; (a -&gt; f r) -&gt; f ()</li><li class="src short"><a href="#v:sequenceAOf_">sequenceAOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t (f ()) b -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:mapMOf_">mapMOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; (a -&gt; m r) -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:forMOf_">forMOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; s -&gt; (a -&gt; m r) -&gt; m ()</li><li class="src short"><a href="#v:sequenceOf_">sequenceOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t (m a) b -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:asumOf">asumOf</a> :: Alternative f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f a)) s t (f a) b -&gt; s -&gt; f a</li><li class="src short"><a href="#v:msumOf">msumOf</a> :: MonadPlus m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (m a)) s t (m a) b -&gt; s -&gt; m a</li><li class="src short"><a href="#v:concatMapOf">concatMapOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [r] s t a b -&gt; (a -&gt; [r]) -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:concatOf">concatOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [r] s t [r] b -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:elemOf">elemOf</a> :: Eq a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t a b -&gt; a -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:notElemOf">notElemOf</a> :: Eq a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; a -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:lengthOf">lengthOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Sum Int) s t a b -&gt; s -&gt; Int</li><li class="src short"><a href="#v:nullOf">nullOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:headOf">headOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:lastOf">lastOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Last a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:maximumOf">maximumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Max">Max</a> a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:minimumOf">minimumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Min">Min</a> a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:maximumByOf">maximumByOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; Ordering) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:minimumByOf">minimumByOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; Ordering) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:findOf">findOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:foldrOf-39-">foldrOf'</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (r -&gt; r))) s t a b -&gt; (a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldlOf-39-">foldlOf'</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (r -&gt; r)) s t a b -&gt; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldr1Of">foldr1Of</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; a) -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldl1Of">foldl1Of</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (Maybe a))) s t a b -&gt; (a -&gt; a -&gt; a) -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldrMOf">foldrMOf</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (r -&gt; m r))) s t a b -&gt; (a -&gt; r -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:foldlMOf">foldlMOf</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (r -&gt; m r)) s t a b -&gt; (r -&gt; a -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedFold">ReifiedFold</a> s a = <a href="#v:ReifyFold">ReifyFold</a> {<ul class="subs"><li><a href="#v:reflectFold">reflectFold</a> :: <a href="Control-Lens-Fold.html#t:Fold">Fold</a> s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Folds
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Fold" class="def">Fold</a> s a = <span class="keyword">forall</span> f. (<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Fold.html#Fold" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> describes how to retrieve multiple values in a way that can be composed
with other lens-like constructions.
</p><p>A <code><code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s a</code> provides a structure with operations very similar to those of the <code>Foldable</code>
@@ -60,14 +60,6 @@
(<code><a href="Control-Lens-Fold.html#v:-94--63--33-">^?!</a></code>) :: s -&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> s a -&gt; a
(<code><a href="Control-Lens-Fold.html#v:-94--63--33-">^?!</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; a
(<code><a href="Control-Lens-Fold.html#v:-94--63--33-">^?!</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s a -&gt; a
-</pre></div></div><div class="top"><p class="src"><a name="v:-94--33--63-" class="def">(^!?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; a<a href="src/Control-Lens-Fold.html#%5E%21%3F" class="link">Source</a></p><div class="doc"><p>Perform an *UNSAFE* <code>head</code> of a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> or <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> assuming that it is there.
-</p><p>This is an alias for (<code><a href="Control-Lens-Fold.html#v:-94--63--33-">^?!</a></code>).
-</p><pre>
- (<code><a href="Control-Lens-Fold.html#v:-94--33--63-">^!?</a></code>) :: s -&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a -&gt; a
- (<code><a href="Control-Lens-Fold.html#v:-94--33--63-">^!?</a></code>) :: s -&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s a -&gt; a
- (<code><a href="Control-Lens-Fold.html#v:-94--33--63-">^!?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> s a -&gt; a
- (<code><a href="Control-Lens-Fold.html#v:-94--33--63-">^!?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; a
- (<code><a href="Control-Lens-Fold.html#v:-94--33--63-">^!?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s a -&gt; a
</pre></div></div><h2 id="g:2">Building Folds
</h2><div class="top"><p class="src"><a name="v:folding" class="def">folding</a> :: (Foldable f, Applicative g, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g) =&gt; (s -&gt; f a) -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g s t a b<a href="src/Control-Lens-Fold.html#folding" class="link">Source</a></p><div class="doc"><p>Obtain a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> by lifting an operation that returns a foldable result.
</p><p>This can be useful to lift operations from <code>Data.List</code> and elsewhere into a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>.
View
22 Control-Lens-Getter.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Getter</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Getter.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Getter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.Getter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Getters
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Getter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.Getter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Getters
</a></li><li><a href="#g:2">Building Getters
</a></li><li><a href="#g:3">Combinators for Getters and Folds
</a></li><li><a href="#g:4">Storing Getters
@@ -18,7 +18,7 @@
in the opposite order.
</p><p>Since it is only a function, every <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> obviously only retrieves a
single value for a given input.
-</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Getter">Getter</a> s a = <span class="keyword">forall</span> f. <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><span class="keyword">type</span> <a href="#t:Getting">Getting</a> r s t a b = (a -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r b) -&gt; s -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r t</li><li class="src short"><a href="#v:to">to</a> :: (s -&gt; a) -&gt; <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</li><li class="src short"><a href="#v:-94-.">(^.)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; a</li><li class="src short"><a href="#v:-94--36-">(^$)</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:-38-">(&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:-94--38-">(^&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:view">view</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:views">views</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; s -&gt; r</li><li class="src short"><a href="#v:use">use</a> :: MonadState s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; m a</li><li class="src short"><a href="#v:uses">uses</a> :: MonadState s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; m r</li><li class="src short"><a href="#v:peruse">peruse</a> :: MonadReader s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; m a</li><li class="src short"><a href="#v:peruses">peruses</a> :: MonadReader s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; m r</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedGetter">ReifiedGetter</a> s a = <a href="#v:ReifyGetter">ReifyGetter</a> {<ul class="subs"><li><a href="#v:reflectGetter">reflectGetter</a> :: <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</li></ul>}</li><li class="src short"><span class="keyword">class</span> (Functor f, <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> f) =&gt; <a href="#t:Gettable">Gettable</a> f </li><li class="src short"><span class="keyword">data</span> <a href="#t:Accessor">Accessor</a> r a</li></ul></div><div id="interface"><h1 id="g:1">Getters
+</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Getter">Getter</a> s a = <span class="keyword">forall</span> f. <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><span class="keyword">type</span> <a href="#t:Getting">Getting</a> r s t a b = (a -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r b) -&gt; s -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r t</li><li class="src short"><a href="#v:to">to</a> :: (s -&gt; a) -&gt; <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</li><li class="src short"><a href="#v:-94-.">(^.)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; a</li><li class="src short"><a href="#v:-94--36-">(^$)</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:-38-">(&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:-94--38-">(^&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:view">view</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:views">views</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; s -&gt; r</li><li class="src short"><a href="#v:use">use</a> :: MonadState s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; m a</li><li class="src short"><a href="#v:uses">uses</a> :: MonadState s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; m r</li><li class="src short"><a href="#v:peruse">peruse</a> :: MonadReader s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; m a</li><li class="src short"><a href="#v:peruses">peruses</a> :: MonadReader s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; m r</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedGetter">ReifiedGetter</a> s a = <a href="#v:ReifyGetter">ReifyGetter</a> {<ul class="subs"><li><a href="#v:reflectGetter">reflectGetter</a> :: <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</li></ul>}</li><li class="src short"><span class="keyword">class</span> Functor f =&gt; <a href="#t:Gettable">Gettable</a> f </li><li class="src short"><span class="keyword">data</span> <a href="#t:Accessor">Accessor</a> r a</li></ul></div><div id="interface"><h1 id="g:1">Getters
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Getter" class="def">Getter</a> s a = <span class="keyword">forall</span> f. <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Getter.html#Getter" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> describes how to retrieve a single value in a way that can be
composed with other lens-like constructions.
</p><p>Unlike a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> is read-only. Since a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code>
@@ -85,7 +85,7 @@
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;hello&quot; ^&amp; length
</code></strong>5
<code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>import Data.List.Lens
-</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,&quot;world&quot;)^._1^&amp;reverse^!?_head
+</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,&quot;world&quot;)^._1^&amp;reverse^?!_head
</code></strong>'o'
</pre></div></div><div class="top"><p class="src"><a name="v:view" class="def">view</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a<a href="src/Control-Lens-Getter.html#view" class="link">Source</a></p><div class="doc"><p>View the value pointed to by a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> or
<code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> or the result of folding over all the results of a
@@ -161,23 +161,13 @@
<code><a href="Control-Lens-Getter.html#v:peruses">peruses</a></code> :: (<code>MonadReader</code> s m, <code>Monoid</code> a) =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s a -&gt; (a -&gt; r) -&gt; m r
</pre></div></div><h1 id="g:4">Storing Getters
</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedGetter" class="def">ReifiedGetter</a> s a <a href="src/Control-Lens-Getter.html#ReifiedGetter" class="link">Source</a></p><div class="doc"><p>Useful for storing getters in containers.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyGetter" class="def">ReifyGetter</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:reflectGetter" class="def">reflectGetter</a> :: <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">class</span> (Functor f, <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> f) =&gt; <a name="t:Gettable" class="def">Gettable</a> f <a href="src/Control-Lens-Classes.html#Gettable" class="link">Source</a></p><div class="doc"><p>Generalizing <code>Const</code> so we can apply simple <code>Applicative</code>
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyGetter" class="def">ReifyGetter</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:reflectGetter" class="def">reflectGetter</a> :: <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">class</span> Functor f =&gt; <a name="t:Gettable" class="def">Gettable</a> f <a href="src/Control-Lens-Classes.html#Gettable" class="link">Source</a></p><div class="doc"><p>Generalizing <code>Const</code> so we can apply simple <code>Applicative</code>
transformations to it and so we can get nicer error messages
</p><p>A <code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code> <code>Functor</code> ignores its argument, which it carries solely as a
phantom type parameter.
</p><p>To ensure this, an instance of <code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code> is required to satisfy:
</p><pre><code>id</code> = <code>fmap</code> f = <code><a href="Control-Lens-Classes.html#v:coerce">coerce</a></code></pre><p>Which is equivalent to making a <code><code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code> f</code> an &quot;anyvariant&quot; functor.
-</p><p>Due to the structure of this library, if you built an illegal <code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code>
- instance that defined <code><code><a href="Control-Lens-Classes.html#v:coerce">coerce</a></code> = <code>undefined</code></code>, it would be possible to
- produce code that would <code>unsafeCoerce</code>.
-</p><p>This would violate the promises of <code>SafeHaskell</code>.
-</p><p>That said, the existing instances are all safe. To verify that any
- additional instances that *you* provide are safe, you must
-</p><pre> import Control.Lens.Unsafe
-</pre><p>and provide an instance of <code>Trustworthy</code> for your data type. That module
- does not make <code>SafeHaskell</code> guarantees, so by doing so you've taken the
- <code>SafeHaskell</code> proof obligation into your own hands.
-</p></div><div class="subs instances"><p id="control.i:Gettable" class="caption collapser" onclick="toggleSection('i:Gettable')">Instances</p><div id="section.i:Gettable" class="show"><table><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Const r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Backwards f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Functor f, <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> g) =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Compose f g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> g =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Accessor" class="def">Accessor</a> r a <a href="src/Control-Lens-Internal.html#Accessor" class="link">Source</a></p><div class="doc"><p>Used instead of <code>Const</code> to report
+</p></div><div class="subs instances"><p id="control.i:Gettable" class="caption collapser" onclick="toggleSection('i:Gettable')">Instances</p><div id="section.i:Gettable" class="show"><table><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Const r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Backwards f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Functor f, <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> g) =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Compose f g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> g =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Accessor" class="def">Accessor</a> r a <a href="src/Control-Lens-Internal.html#Accessor" class="link">Source</a></p><div class="doc"><p>Used instead of <code>Const</code> to report
</p><pre>No instance of (<code><a href="Control-Lens-Setter.html#t:Settable">Settable</a></code> <code><a href="Control-Lens-Getter.html#t:Accessor">Accessor</a></code>)</pre><p>when the user attempts to misuse a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> as a
<code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code>, rather than a monolithic unification error.
-</p></div><div class="subs instances"><p id="control.i:Accessor" class="caption collapser" onclick="toggleSection('i:Accessor')">Instances</p><div id="section.i:Accessor" class="show"><table><tr><td class="src"><a href="Control-Lens-Classes.html#t:Effective">Effective</a> Identity r (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monoid r =&gt; Applicative (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> ((-&gt;) b) ((-&gt;) a) <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> b a</td><td class="doc"><pre><code><a href="Control-Lens-Zoom.html#v:magnify">magnify</a></code> = <code><a href="Control-Lens-Getter.html#v:views">views</a></code></pre></td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>
+</p></div><div class="subs instances"><p id="control.i:Accessor" class="caption collapser" onclick="toggleSection('i:Accessor')">Instances</p><div id="section.i:Accessor" class="show"><table><tr><td class="src"><a href="Control-Lens-Classes.html#t:Effective">Effective</a> Identity r (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monoid r =&gt; Applicative (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> ((-&gt;) b) ((-&gt;) a) <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> b a</td><td class="doc"><pre><code><a href="Control-Lens-Zoom.html#v:magnify">magnify</a></code> = <code><a href="Control-Lens-Getter.html#v:views">views</a></code></pre></td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>
View
2  Control-Lens-Indexed.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Indexed</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Indexed.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Indexed.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Indexed</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Functions
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Indexed.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Indexed</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Functions
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Combinators for working with <code><a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a></code> functions.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> <a href="#t:Indexed">Indexed</a> i k <span class="keyword">where</span><ul class="subs"><li><a href="#v:index">index</a> :: ((i -&gt; a) -&gt; b) -&gt; k a b</li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:Indexable">Indexable</a> i a b = <span class="keyword">forall</span> k. <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; k a b</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Index">Index</a> i a b = <a href="#v:Index">Index</a> {<ul class="subs"><li><a href="#v:withIndex">withIndex</a> :: (i -&gt; a) -&gt; b</li></ul>}</li><li class="src short"><a href="#v:-60-.-62-">(&lt;.&gt;)</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> (i, j) k =&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i b c -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> j a b -&gt; k a c</li><li class="src short"><a href="#v:-60-.">(&lt;.)</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i b c -&gt; (a -&gt; b) -&gt; k a c</li><li class="src short"><a href="#v:.-62-">(.&gt;)</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; (b -&gt; c) -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i a b -&gt; k a c</li><li class="src short"><a href="#v:icompose">icompose</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> k r =&gt; (i -&gt; j -&gt; k) -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i b c -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> j a b -&gt; r a c</li><li class="src short"><a href="#v:reindex">reindex</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> j k =&gt; (i -&gt; j) -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i a b -&gt; k a b</li><li class="src short"><a href="#v:indexed">indexed</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> Int k =&gt; ((a -&gt; <a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f b) -&gt; s -&gt; <a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f t) -&gt; k (a -&gt; f b) (s -&gt; f t)</li></ul></div><div id="interface"><h1 id="g:1">Indexed Functions
</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Indexed" class="def">Indexed</a> i k <span class="keyword">where</span><a href="src/Control-Lens-Indexed.html#Indexed" class="link">Source</a></p><div class="doc"><p>Permit overloading of function application for things that also admit a notion of a key or index.
View
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-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedFold</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Folds
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedFold.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedFold</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Folds
</a></li><li><a href="#g:2">Consuming Indexed Folds
</a></li><li><a href="#g:3">Converting to Folds
</a></li><li><a href="#g:4">Building Indexed Folds
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-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedGetter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Folds
+</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.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedGetter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Folds
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedGetter">IndexedGetter</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedGetting">IndexedGetting</a> i m s t a b = <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m b) (s -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m t)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedGetter">ReifiedIndexedGetter</a> i s a = <a href="#v:ReifyIndexedGetter">ReifyIndexedGetter</a> {<ul class="subs"><li><a href="#v:reflectIndexedGetter">reflectIndexedGetter</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a> i s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Indexed Folds
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedGetter" class="def">IndexedGetter</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedGetter.html#IndexedGetter" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> is a valid <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> and <code>Getter</code>.
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedGetting" class="def">IndexedGetting</a> i m s t a b = <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m b) (s -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m t)<a href="src/Control-Lens-IndexedGetter.html#IndexedGetting" class="link">Source</a></p><div class="doc"><p>Used to consume an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>.
View
2  Control-Lens-IndexedLens.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.IndexedLens</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-IndexedLens.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedLens.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.IndexedLens</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Lenses
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedLens.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.IndexedLens</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Lenses
</a></li><li><a href="#g:2">Common Indexed Lenses
</a></li><li><a href="#g:3">Indexed Lens Combinators
</a></li><li><a href="#g:4">Storing Indexed Lenses
View
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-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedSetter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Setter
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedSetter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedSetter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Setter
</a></li><li><a href="#g:2">Storing Indexed Setters
</a></li><li><a href="#g:3">Simple
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedSetter">IndexedSetter</a> i s t a b = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Classes.html#t:Settable">Settable</a> f) =&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:imapOf">imapOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:iover">iover</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:isets">isets</a> :: ((i -&gt; a -&gt; b) -&gt; s -&gt; t) -&gt; <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s t a b</li><li class="src short"><a href="#v:-37--64--126-">(%@~)</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:-37--64--61-">(%@=)</a> :: MonadState s m =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m ()</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i s t a b = <a href="#v:ReifyIndexedSetter">ReifyIndexedSetter</a> {<ul class="subs"><li><a href="#v:reflectIndexedSetter">reflectIndexedSetter</a> :: <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s t a b</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIndexedSetter">SimpleIndexedSetter</a> i s a = <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIndexedSetter">SimpleReifiedIndexedSetter</a> i s a = <a href="Control-Lens-IndexedSetter.html#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i s s a a</li></ul></div><div id="interface"><h1 id="g:1">Indexed Setter
View
30 Control-Lens-IndexedTraversal.html
@@ -1,19 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.IndexedTraversal</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-IndexedTraversal.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedTraversal.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.IndexedTraversal</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Traversals
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedTraversal.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.IndexedTraversal</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Traversals
</a></li><li><a href="#g:2">Common Indexed Traversals
</a></li><li><a href="#g:3">Indexed Traversal Combinators
</a></li><li><a href="#g:4">Storing Indexed Traversals
</a></li><li><a href="#g:5">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:IndexedTraversal">IndexedTraversal</a> i s t a b = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:traverseAt">traverseAt</a> :: <a href="Control-Lens-IndexedLens.html#t:At">At</a> k m =&gt; k -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v</li><li class="src short"><a href="#v:iwhereOf">iwhereOf</a> :: (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a a -&gt; (i -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s t a a</li><li class="src short"><a href="#v:value">value</a> :: (k -&gt; Bool) -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (k, v) v</li><li class="src short"><a href="#v:ignored">ignored</a> :: <span class="keyword">forall</span> k f i s a b. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s s a b</li><li class="src short"><span class="keyword">class</span> Ord k =&gt; <a href="#t:TraverseMin">TraverseMin</a> k m | m -&gt; k <span class="keyword">where</span><ul class="subs"><li><a href="#v:traverseMin">traverseMin</a> :: <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v</li></ul></li><li class="src short"><span class="keyword">class</span> Ord k =&gt; <a href="#t:TraverseMax">TraverseMax</a> k m | m -&gt; k <span class="keyword">where</span><ul class="subs"><li><a href="#v:traverseMax">traverseMax</a> :: <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v</li></ul></li><li class="src short"><a href="#v:traversed">traversed</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f =&gt; <a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a> Int (f a) (f b) a b</li><li class="src short"><a href="#v:itraverseOf">itraverseOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a b -&gt; (i -&gt; a -&gt; f b) -&gt; s -&gt; f t</li><li class="src short"><a href="#v:iforOf">iforOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a b -&gt; s -&gt; (i -&gt; a -&gt; f b) -&gt; f t</li><li class="src short"><a href="#v:imapMOf">imapMOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (WrappedMonad m) s t a b -&gt; (i -&gt; a -&gt; m b) -&gt; s -&gt; m t</li><li class="src short"><a href="#v:iforMOf">iforMOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (WrappedMonad m) s t a b -&gt; s -&gt; (i -&gt; a -&gt; m b) -&gt; m t</li><li class="src short"><a href="#v:imapAccumROf">imapAccumROf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (State s) s t a b -&gt; (i -&gt; s -&gt; a -&gt; (s, b)) -&gt; s -&gt; s -&gt; (s, t)</li><li class="src short"><a href="#v:imapAccumLOf">imapAccumLOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (Backwards (State s)) s t a b -&gt; (i -&gt; s -&gt; a -&gt; (s, b)) -&gt; s -&gt; s -&gt; (s, t)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedTraversal">ReifiedIndexedTraversal</a> i s t a b = <a href="#v:ReifyIndexedTraversal">ReifyIndexedTraversal</a> {<ul class="subs"><li><a href="#v:reflectIndexedTraversal">reflectIndexedTraversal</a> :: <a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a> i s t a b</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> i s a = <a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a> i s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIndexedTraversal">SimpleReifiedIndexedTraversal</a> i s a = <a href="Control-Lens-IndexedTraversal.html#t:ReifiedIndexedTraversal">ReifiedIndexedTraversal</a> i s s a a</li></ul></div><div id="interface"><h1 id="g:1">Indexed Traversals
+</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:IndexedTraversal">IndexedTraversal</a> i s t a b = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:_at">_at</a> :: <a href="Control-Lens-IndexedLens.html#t:At">At</a> k m =&gt; k -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v</li><li class="src short"><a href="#v:iwhereOf">iwhereOf</a> :: (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a a -&gt; (i -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s t a a</li><li class="src short"><a href="#v:value">value</a> :: (k -&gt; Bool) -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (k, v) v</li><li class="src short"><a href="#v:ignored">ignored</a> :: <span class="keyword">forall</span> k f i s a b. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s s a b</li><li class="src short"><span class="keyword">class</span> Ord k =&gt; <a href="#t:TraverseMin">TraverseMin</a> k m | m -&gt; k <span class="keyword">where</span><ul class="subs"><li><a href="#v:traverseMin">traverseMin</a> :: <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v</li></ul></li><li class="src short"><span class="keyword">class</span> Ord k =&gt; <a href="#t:TraverseMax">TraverseMax</a> k m | m -&gt; k <span class="keyword">where</span><ul class="subs"><li><a href="#v:traverseMax">traverseMax</a> :: <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v</li></ul></li><li class="src short"><a href="#v:traversed">traversed</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f =&gt; <a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a> Int (f a) (f b) a b</li><li class="src short"><a href="#v:elementOf">elementOf</a> :: (Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> Int k) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f) s t a a -&gt; Int -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s t a a</li><li class="src short"><a href="#v:element">element</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> t =&gt; Int -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> Int (t a) a</li><li class="src short"><a href="#v:elementsOf">elementsOf</a> :: (Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> Int k) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f) s t a a -&gt; (Int -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s t a a</li><li class="src short"><a href="#v:elements">elements</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> t =&gt; (Int -&gt; Bool) -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> Int (t a) a</li><li class="src short"><a href="#v:itraverseOf">itraverseOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a b -&gt; (i -&gt; a -&gt; f b) -&gt; s -&gt; f t</li><li class="src short"><a href="#v:iforOf">iforOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a b -&gt; s -&gt; (i -&gt; a -&gt; f b) -&gt; f t</li><li class="src short"><a href="#v:imapMOf">imapMOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (WrappedMonad m) s t a b -&gt; (i -&gt; a -&gt; m b) -&gt; s -&gt; m t</li><li class="src short"><a href="#v:iforMOf">iforMOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (WrappedMonad m) s t a b -&gt; s -&gt; (i -&gt; a -&gt; m b) -&gt; m t</li><li class="src short"><a href="#v:imapAccumROf">imapAccumROf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (State s) s t a b -&gt; (i -&gt; s -&gt; a -&gt; (s, b)) -&gt; s -&gt; s -&gt; (s, t)</li><li class="src short"><a href="#v:imapAccumLOf">imapAccumLOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (Backwards (State s)) s t a b -&gt; (i -&gt; s -&gt; a -&gt; (s, b)) -&gt; s -&gt; s -&gt; (s, t)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedTraversal">ReifiedIndexedTraversal</a> i s t a b = <a href="#v:ReifyIndexedTraversal">ReifyIndexedTraversal</a> {<ul class="subs"><li><a href="#v:reflectIndexedTraversal">reflectIndexedTraversal</a> :: <a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a> i s t a b</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> i s a = <a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a> i s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIndexedTraversal">SimpleReifiedIndexedTraversal</a> i s a = <a href="Control-Lens-IndexedTraversal.html#t:ReifiedIndexedTraversal">ReifiedIndexedTraversal</a> i s s a a</li></ul></div><div id="interface"><h1 id="g:1">Indexed Traversals
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedTraversal" class="def">IndexedTraversal</a> i s t a b = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; k (a -&gt; f b) (s -&gt; f t)<a href="src/Control-Lens-IndexedTraversal.html#IndexedTraversal" class="link">Source</a></p><div class="doc"><p>Every indexed traversal is a valid <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> or <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>.
</p><p>The <code><a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a></code> constraint is used to allow an <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> to be used directly as a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>.
</p><p>The <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> laws are still required to hold.
</p></div></div><h1 id="g:2">Common Indexed Traversals
-</h1><div class="top"><p class="src"><a name="v:traverseAt" class="def">traverseAt</a> :: <a href="Control-Lens-IndexedLens.html#t:At">At</a> k m =&gt; k -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v<a href="src/Control-Lens-IndexedTraversal.html#traverseAt" class="link">Source</a></p><div class="doc"><p>Traverse the value at a given key in a map
-</p><pre><code><a href="Control-Lens-IndexedTraversal.html#v:traverseAt">traverseAt</a></code> k = <code><a href="Control-Lens-IndexedLens.html#v:at">at</a></code> k <code><a href="Control-Lens-Indexed.html#v:-60-.">&lt;.</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:iwhereOf" class="def">iwhereOf</a> :: (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a a -&gt; (i -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s t a a<a href="src/Control-Lens-IndexedTraversal.html#iwhereOf" class="link">Source</a></p><div class="doc"><p>Access the element of an <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> where the index matches a predicate.
-</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>over (iwhereOf (indexed traverse) (&gt;0)) reverse $ [&quot;He&quot;,&quot;was&quot;,&quot;stressed&quot;,&quot;o_O&quot;]
+</h1><div class="top"><p class="src"><a name="v:_at" class="def">_at</a> :: <a href="Control-Lens-IndexedLens.html#t:At">At</a> k m =&gt; k -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v<a href="src/Control-Lens-IndexedTraversal.html#_at" class="link">Source</a></p><div class="doc"><p>This simple indexed traversal lets you <code><a href="Control-Lens-Traversal.html#v:traverse">traverse</a></code> the value at a given key in a map.
+</p><pre><code><a href="Control-Lens-IndexedTraversal.html#v:_at">_at</a></code> k = <code><a href="Control-Lens-IndexedLens.html#v:at">at</a></code> k <code><a href="Control-Lens-Indexed.html#v:-60-.">&lt;.</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:iwhereOf" class="def">iwhereOf</a> :: (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a a -&gt; (i -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s t a a<a href="src/Control-Lens-IndexedTraversal.html#iwhereOf" class="link">Source</a></p><div class="doc"><p>Access the element of an <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> where the index matches a predicate.
+</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>over (iwhereOf traversed (&gt;0)) reverse [&quot;He&quot;,&quot;was&quot;,&quot;stressed&quot;,&quot;o_O&quot;]
</code></strong>[&quot;He&quot;,&quot;saw&quot;,&quot;desserts&quot;,&quot;O_o&quot;]
</pre><pre>
<code><a href="Control-Lens-IndexedTraversal.html#v:iwhereOf">iwhereOf</a></code> :: <code>IndexedFold</code> i s a -&gt; (i -&gt; <code>Bool</code>) -&gt; <code>IndexedFold</code> i s a
@@ -29,7 +29,25 @@
</p></div></div><div class="subs instances"><p id="control.i:TraverseMin" class="caption collapser" onclick="toggleSection('i:TraverseMin')">Instances</p><div id="section.i:TraverseMin" class="show"><table><tr><td class="src"><a href="Control-Lens-IndexedTraversal.html#t:TraverseMin">TraverseMin</a> Int IntMap</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Ord k =&gt; <a href="Control-Lens-IndexedTraversal.html#t:TraverseMin">TraverseMin</a> k (Map k)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> Ord k =&gt; <a name="t:TraverseMax" class="def">TraverseMax</a> k m | m -&gt; k <span class="keyword">where</span><a href="src/Control-Lens-IndexedTraversal.html#TraverseMax" class="link">Source</a></p><div class="doc"><p>Allows <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> of the value at the largest index.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:traverseMax" class="def">traverseMax</a> :: <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v<a href="src/Control-Lens-IndexedTraversal.html#traverseMax" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> of the element at the largest index.
</p></div></div><div class="subs instances"><p id="control.i:TraverseMax" class="caption collapser" onclick="toggleSection('i:TraverseMax')">Instances</p><div id="section.i:TraverseMax" class="show"><table><tr><td class="src"><a href="Control-Lens-IndexedTraversal.html#t:TraverseMax">TraverseMax</a> Int IntMap</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Ord k =&gt; <a href="Control-Lens-IndexedTraversal.html#t:TraverseMax">TraverseMax</a> k (Map k)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:traversed" class="def">traversed</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f =&gt; <a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a> Int (f a) (f b) a b<a href="src/Control-Lens-IndexedTraversal.html#traversed" class="link">Source</a></p><div class="doc"><p>Traverse any <code><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a></code> container. This is an <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> that is indexed by ordinal position.
-</p></div></div><h1 id="g:3">Indexed Traversal Combinators
+</p></div></div><div class="top"><p class="src"><a name="v:elementOf" class="def">elementOf</a> :: (Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> Int k) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f) s t a a -&gt; Int -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s t a a<a href="src/Control-Lens-IndexedTraversal.html#elementOf" class="link">Source</a></p><div class="doc"><p>Traverse the <em>nth</em> element <code><a href="Control-Lens-IndexedTraversal.html#v:elementOf">elementOf</a></code> a <code>Traversal</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> if it exists.
+</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[[1],[3,4]] &amp; elementOf (traverse.traverse) 1 .~ 5
+</code></strong>[[1],[5,4]]
+</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[[1],[3,4]] ^? elementOf (folded.folded) 1
+</code></strong>Just 3
+</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[0..] ^?! elementOf folded 5
+</code></strong>5
+</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>take 10 $ elementOf traverse 3 .~ 16 $ [0..]
+</code></strong>[0,1,2,16,4,5,6,7,8,9]
+</pre><pre>
+ <code><a href="Control-Lens-IndexedTraversal.html#v:elementOf">elementOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code>Traversal</code> s a -&gt; Int -&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a></code> <code>Int</code> s a
+ <code><a href="Control-Lens-IndexedTraversal.html#v:elementOf">elementOf</a></code> :: <code>Fold</code> s a -&gt; Int -&gt; <code>IndexedFold</code> <code>Int</code> s a
+</pre></div></div><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; Int -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> Int (t a) a<a href="src/Control-Lens-IndexedTraversal.html#element" class="link">Source</a></p><div class="doc"><p>Traverse the <em>nth</em> element of a <code><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a></code> container.
+</p><pre><code><a href="Control-Lens-IndexedTraversal.html#v:element">element</a></code> &#8801; <code><a href="Control-Lens-IndexedTraversal.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:elementsOf" class="def">elementsOf</a> :: (Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> Int k) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f) s t a a -&gt; (Int -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s t a a<a href="src/Control-Lens-IndexedTraversal.html#elementsOf" class="link">Source</a></p><div class="doc"><p>Traverse (or fold) selected elements of a <code>Traversal</code> (or <code>Fold</code>) where their ordinal positions match a predicate.
+</p><pre>
+ <code><a href="Control-Lens-IndexedTraversal.html#v:elementsOf">elementsOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code>Traversal</code> s a -&gt; (<code>Int</code> -&gt; <code>Bool</code>) -&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a></code> <code>Int</code> s a
+ <code><a href="Control-Lens-IndexedTraversal.html#v:elementsOf">elementsOf</a></code> :: <code>Fold</code> s a -&gt; (<code>Int</code> -&gt; <code>Bool</code>) -&gt; <code>IndexedFold</code> <code>Int</code> s a
+</pre></div></div><div class="top"><p class="src"><a name="v:elements" class="def">elements</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> t =&gt; (Int -&gt; Bool) -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> Int (t a) a<a href="src/Control-Lens-IndexedTraversal.html#elements" class="link">Source</a></p><div class="doc"><p>Traverse elements of a <code><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a></code> container where their ordinal positions matches a predicate.
+</p><pre><code><a href="Control-Lens-IndexedTraversal.html#v:elements">elements</a></code> &#8801; <code><a href="Control-Lens-IndexedTraversal.html#v:elementsOf">elementsOf</a></code> <code><a href="Control-Lens-Traversal.html#v:traverse">traverse</a></code></pre></div></div><h1 id="g:3">Indexed Traversal Combinators
</h1><div class="top"><p class="src"><a name="v:itraverseOf" class="def">itraverseOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a b -&gt; (i -&gt; a -&gt; f b) -&gt; s -&gt; f t<a href="src/Control-Lens-IndexedTraversal.html#itraverseOf" class="link">Source</a></p><div class="doc"><p>Traversal with an index.
</p><p>NB: When you don't need access to the index then you can just apply your <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code>
directly as a function!
View
101 Control-Lens-Internal-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.Internal.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-Internal-Zipper.html");};
+//]]>
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Internal-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.6: 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.Internal.Zipper</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Zippers
+</a></li><li><a href="#g:2">Tapes
+</a></li><li><a href="#g:3">Tracks
+</a></li><li><a href="#g:4">Levels
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module provides internal types and functions used in the implementation
+ of Control.Lens.Zipper. You shouldn't need to import it directly, and the
+ exported types can be used to break Zipper invariants.
+</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 = <a href="#v:Zipper">Zipper</a> (<a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a> p a) !(<a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> 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">data</span> <a href="#t:Coil">Coil</a> <span class="keyword">where</span><ul class="subs"><li><a href="#v:Coil">Coil</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a> <a href="Control-Lens-Internal-Zipper.html#t:Top">Top</a> a </li><li><a href="#v:Snoc">Snoc</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a> h b -&gt; !Int -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) b a -&gt; [b] -&gt; (NonEmpty a -&gt; b) -&gt; [b] -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) a </li></ul></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-Internal-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a)) (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a) a</li><li class="src short"><a href="#v:zipper">zipper</a> :: a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Top">Top</a> <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a</li><li class="src short"><a href="#v:tooth">tooth</a> :: (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; Int</li><li class="src short"><a href="#v:up">up</a> :: ((a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> c) -&gt; a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b</li><li class="src short"><a href="#v:left">left</a> :: (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; Maybe (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b)</li><li class="src short"><a href="#v:right">right</a> :: (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; Maybe (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b)</li><li class="src short"><a href="#v:tug">tug</a> :: (a -&gt; Maybe a) -&gt; a -&gt; a</li><li class="src short"><a href="#v:tugs">tugs</a> :: (a -&gt; Maybe a) -&gt; Int -&gt; a -&gt; a</li><li class="src short"><a href="#v:farthest">farthest</a> :: (a -&gt; Maybe a) -&gt; a -&gt; a</li><li class="src short"><a href="#v:jerks">jerks</a> :: (a -&gt; Maybe a) -&gt; Int -&gt; a -&gt; Maybe a</li><li class="src short"><a href="#v:teeth">teeth</a> :: (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; Int</li><li class="src short"><a href="#v:jerkTo">jerkTo</a> :: Int -&gt; (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; Maybe (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b)</li><li class="src short"><a href="#v:tugTo">tugTo</a> :: Int -&gt; (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; a <a href="Control-Lens-Internal-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-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Internal-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-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; Maybe ((a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Internal-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-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> c</li><li class="src short"><span class="keyword">class</span> <a href="#t:Zipper">Zipper</a> h a <span class="keyword">where</span><ul class="subs"><li><a href="#v:recoil">recoil</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a> h a -&gt; NonEmpty a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a</li></ul></li><li class="src short"><a href="#v:rezip">rezip</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Zipper">Zipper</a> h a =&gt; (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Tape">Tape</a> k <span class="keyword">where</span><ul class="subs"><li><a href="#v:Tape">Tape</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> h a -&gt; !Int -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a) </li></ul></li><li class="src short"><a href="#v:saveTape">saveTape</a> :: (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a> (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b)</li><li class="src short"><a href="#v:restoreTape">restoreTape</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a -&gt; Maybe (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a)</li><li class="src short"><a href="#v:restoreNearTape">restoreNearTape</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a -&gt; Maybe (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a)</li><li class="src short"><a href="#v:unsafelyRestoreTape">unsafelyRestoreTape</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a -&gt; h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a</li><li class="src short"><a href="#v:peel">peel</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a> h a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> h a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Track">Track</a> <span class="keyword">where</span><ul class="subs"><li><a href="#v:Track">Track</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> <a href="Control-Lens-Internal-Zipper.html#t:Top">Top</a> a </li><li><a href="#v:Fork">Fork</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> h b -&gt; !Int -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) b a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) a </li></ul></li><li class="src short"><a href="#v:restoreTrack">restoreTrack</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> h a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a -&gt; Maybe (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a)</li><li class="src short"><a href="#v:restoreNearTrack">restoreNearTrack</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> h a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a -&gt; Maybe (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a)</li><li class="src short"><a href="#v:unsafelyRestoreTrack">unsafelyRestoreTrack</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> h a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a -&gt; h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Level">Level</a> a = <a href="#v:Level">Level</a> !Int [a] a [a]</li><li class="src short"><a href="#v:levelWidth">levelWidth</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a -&gt; Int</li><li class="src short"><a href="#v:leftLevel">leftLevel</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a -&gt; Maybe (<a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a)</li><li class="src short"><a href="#v:left1Level">left1Level</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:leftmostLevel">leftmostLevel</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:rightmostLevel">rightmostLevel</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:rightLevel">rightLevel</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a -&gt; Maybe (<a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a)</li><li class="src short"><a href="#v:right1Level">right1Level</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:focusLevel">focusLevel</a> :: Functor f =&gt; (a -&gt; f a) -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a -&gt; f (<a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a)</li><li class="src short"><a href="#v:rezipLevel">rezipLevel</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a -&gt; NonEmpty 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-Internal-Zipper.html#Top" class="link">Source</a></p><div class="doc"><p>This is used to represent the <code><a href="Control-Lens-Internal-Zipper.html#t:Top">Top</a></code> of the <code><a href="Control-Lens-Internal-Zipper.html#t:Zipper">Zipper</a></code>.
+</p><p>Every <code><a href="Control-Lens-Internal-Zipper.html#t:Zipper">Zipper</a></code> starts with <code><a href="Control-Lens-Internal-Zipper.html#t:Top">Top</a></code>.
+</p><p><em>e.g.</em> <code><code><a href="Control-Lens-Internal-Zipper.html#t:Top">Top</a></code> <code><a href="Control-Lens-Internal-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-Internal-Zipper.html#t:Zipper">Zipper</a> <a href="Control-Lens-Internal-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-Internal-Zipper.html#%3A%3E" class="link">Source</a></p><div class="doc"><p>This is the type of a <code><a href="Control-Lens-Internal-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 left, so you can use a type like
+</p><pre><code><a href="Control-Lens-Internal-Zipper.html#t:Top">Top</a></code> <code><a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a></code> (<code>String</code>,<code>Double</code>) <code><a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a></code> <code>String</code> <code><a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a></code> <code>Char</code></pre><p>to represent a zipper from <code>(<code>String</code>,<code>Double</code>)</code> down to <code>Char</code> that has an intermediate
+ crumb for the <code>String</code> containing the <code>Char</code>.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Zipper" class="def">Zipper</a> (<a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a> p a) !(<a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></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-Internal-Zipper.html#t:Zipper">Zipper</a> h b =&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipper">Zipper</a> (<a href="Control-Lens-Internal-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"><span class="keyword">type family</span> <a name="t:Zipped" class="def">Zipped</a> h a <a href="src/Control-Lens-Internal-Zipper.html#Zipped" class="link">Source</a></p><div class="doc"><p>This represents the type a zipper will have when it is fully <code><a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a></code> back up.
+</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Coil" class="def">Coil</a> <span class="keyword">where</span><a href="src/Control-Lens-Internal-Zipper.html#Coil" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a></code> is used internally in the definition of a <code><a href="Control-Lens-Internal-Zipper.html#t:Zipper">Zipper</a></code>.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Coil" class="def">Coil</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a> <a href="Control-Lens-Internal-Zipper.html#t:Top">Top</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Snoc" class="def">Snoc</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a> h b -&gt; !Int -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) b a -&gt; [b] -&gt; (NonEmpty a -&gt; b) -&gt; [b] -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) a</td><td class="doc empty">&nbsp;</td></tr></table></div></div><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-Internal-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a)) (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a) a<a href="src/Control-Lens-Internal-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-Internal-Zipper.html#v:zipper">zipper</a></code>.
+</p></div></div><div class="top"><p class="src"><a name="v:zipper" class="def">zipper</a> :: a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Top">Top</a> <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a<a href="src/Control-Lens-Internal-Zipper.html#zipper" class="link">Source</a></p><div class="doc"><p>Construct a <code><a href="Control-Lens-Internal-Zipper.html#v:zipper">zipper</a></code> that can explore anything.
+</p></div></div><div class="top"><p class="src"><a name="v:tooth" class="def">tooth</a> :: (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; Int<a href="src/Control-Lens-Internal-Zipper.html#tooth" class="link">Source</a></p><div class="doc"><p>Return the index into the current <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> within the current level of the zipper.
+</p><pre><code><a href="Control-Lens-Internal-Zipper.html#v:jerkTo">jerkTo</a></code> (<code><a href="Control-Lens-Internal-Zipper.html#v:tooth">tooth</a></code> l) l = Just'</pre></div></div><div class="top"><p class="src"><a name="v:up" class="def">up</a> :: ((a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> c) -&gt; a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b<a href="src/Control-Lens-Internal-Zipper.html#up" class="link">Source</a></p><div class="doc"><p>Move the <code><a href="Control-Lens-Internal-Zipper.html#v:zipper">zipper</a></code> <code><a href="Control-Lens-Internal-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:left" class="def">left</a> :: (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; Maybe (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b)<a href="src/Control-Lens-Internal-Zipper.html#left" class="link">Source</a></p><div class="doc"><p>Pull the <code><a href="Control-Lens-Internal-Zipper.html#v:zipper">zipper</a></code> <code><a href="Control-Lens-Internal-Zipper.html#v:left">left</a></code> within the current <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>.
+</p></div></div><div class="top"><p class="src"><a name="v:right" class="def">right</a> :: (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; Maybe (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b)<a href="src/Control-Lens-Internal-Zipper.html#right" class="link">Source</a></p><div class="doc"><p>Pull the entry one entry to the <code><a href="Control-Lens-Internal-Zipper.html#v:right">right</a></code>
+</p></div></div><div class="top"><p class="src"><a name="v:tug" class="def">tug</a> :: (a -&gt; Maybe a) -&gt; a -&gt; a<a href="src/Control-Lens-Internal-Zipper.html#tug" class="link">Source</a></p><div class="doc"><p>This allows you to safely 'tug left' or 'tug right' on a <code><a href="Control-Lens-Internal-Zipper.html#v:zipper">zipper</a></code>.
+</p><p>The more general signature allows its use in other circumstances, however.
+</p></div></div><div class="top"><p class="src"><a name="v:tugs" class="def">tugs</a> :: (a -&gt; Maybe a) -&gt; Int -&gt; a -&gt; a<a href="src/Control-Lens-Internal-Zipper.html#tugs" class="link">Source</a></p><div class="doc"><p>This allows you to safely 'tug left' or 'tug right' on a <code><a href="Control-Lens-Internal-Zipper.html#v:zipper">zipper</a></code>, moving multiple steps in a given direction,
+ stopping at the last place you couldn't move from.
+</p></div></div><div class="top"><p class="src"><a name="v:farthest" class="def">farthest</a> :: (a -&gt; Maybe a) -&gt; a -&gt; a<a href="src/Control-Lens-Internal-Zipper.html#farthest" class="link">Source</a></p><div class="doc"><p>Move in a direction as far as you can go, then stop.
+</p></div></div><div class="top"><p class="src"><a name="v:jerks" class="def">jerks</a> :: (a -&gt; Maybe a) -&gt; Int -&gt; a -&gt; Maybe a<a href="src/Control-Lens-Internal-Zipper.html#jerks" class="link">Source</a></p><div class="doc"><p>This allows for you to repeatedly pull a <code><a href="Control-Lens-Internal-Zipper.html#v:zipper">zipper</a></code> in a given direction, failing if it falls of the end.
+</p></div></div><div class="top"><p class="src"><a name="v:teeth" class="def">teeth</a> :: (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; Int<a href="src/Control-Lens-Internal-Zipper.html#teeth" class="link">Source</a></p><div class="doc"><p>Returns the number of siblings at the current level in the <code><a href="Control-Lens-Internal-Zipper.html#v:zipper">zipper</a></code>.
+</p><pre><code><a href="Control-Lens-Internal-Zipper.html#v:teeth">teeth</a></code> z <code>&gt;=</code> 1</pre><p><em>NB:</em> If the current <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> targets an infinite number of elements then this may not terminate.
+</p></div></div><div class="top"><p class="src"><a name="v:jerkTo" class="def">jerkTo</a> :: Int -&gt; (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; Maybe (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b)<a href="src/Control-Lens-Internal-Zipper.html#jerkTo" class="link">Source</a></p><div class="doc"><p>Move the <code><a href="Control-Lens-Internal-Zipper.html#v:zipper">zipper</a></code> horizontally to the element in the <code>n</code>th position in the current level, absolutely indexed, starting with the <code><code><a href="Control-Lens-Internal-Zipper.html#v:farthest">farthest</a></code> <code><a href="Control-Lens-Internal-Zipper.html#v:left">left</a></code></code> as <code>0</code>.
+</p><p>This returns <code>Nothing</code> if the target element doesn't exist.
+</p><pre><code><a href="Control-Lens-Internal-Zipper.html#v:jerkTo">jerkTo</a></code> n &#8801; <code><a href="Control-Lens-Internal-Zipper.html#v:jerks">jerks</a></code> <code><a href="Control-Lens-Internal-Zipper.html#v:right">right</a></code> n . <code><a href="Control-Lens-Internal-Zipper.html#v:farthest">farthest</a></code> <code><a href="Control-Lens-Internal-Zipper.html#v:left">left</a></code></pre></div></div><div class="top"><p class="src"><a name="v:tugTo" class="def">tugTo</a> :: Int -&gt; (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b<a href="src/Control-Lens-Internal-Zipper.html#tugTo" class="link">Source</a></p><div class="doc"><p>Move the <code><a href="Control-Lens-Internal-Zipper.html#v:zipper">zipper</a></code> horizontally to the element in the <code>n</code>th position of the current level, absolutely indexed, starting with the <code><code><a href="Control-Lens-Internal-Zipper.html#v:farthest">farthest</a></code> <code><a href="Control-Lens-Internal-Zipper.html#v:left">left</a></code></code> as <code>0</code>.
+</p><p>If the element at that position doesn't exist, then this will clamp to the range <code>0 &lt;= n &lt; <code><a href="Control-Lens-Internal-Zipper.html#v:teeth">teeth</a></code></code>.
+</p><pre><code><a href="Control-Lens-Internal-Zipper.html#v:tugTo">tugTo</a></code> n &#8801; <code><a href="Control-Lens-Internal-Zipper.html#v:tugs">tugs</a></code> <code><a href="Control-Lens-Internal-Zipper.html#v:right">right</a></code> n . <code><a href="Control-Lens-Internal-Zipper.html#v:farthest">farthest</a></code> <code><a href="Control-Lens-Internal-Zipper.html#v:left">left</a></code></pre></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-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> c<a href="src/Control-Lens-Internal-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-Internal-Zipper.html#v:fromWithin">fromWithin</a></code> for when you know
+ there is precisely one target.
+</p><pre>
+ <code><a href="Control-Lens-Internal-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-Internal-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-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; Maybe ((a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> c)<a href="src/Control-Lens-Internal-Zipper.html#within" class="link">Source</a></p><div class="doc"><p>Step down into the <code>leftmost</code> entry of a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>.
+</p><pre>
+ <code><a href="Control-Lens-Internal-Zipper.html#v:within">within</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> b c -&gt; (a :&gt; b) -&gt; Maybe (a :&gt; b :&gt; c)
+ <code><a href="Control-Lens-Internal-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-Internal-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> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) b c -&gt; (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> c<a href="src/Control-Lens-Internal-Zipper.html#fromWithin" class="link">Source</a></p><div class="doc"><p>Unsafely step down into a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> that is <em>assumed</em> to be non-empty.
+</p><p>If this invariant is not met then this will usually result in an error!
+</p><pre>
+ <code><a href="Control-Lens-Internal-Zipper.html#v:fromWithin">fromWithin</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> b c -&gt; (a :&gt; b) -&gt; a :&gt; b :&gt; c
+ <code><a href="Control-Lens-Internal-Zipper.html#v:fromWithin">fromWithin</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-Internal-Zipper.html#v:fromWithin">fromWithin</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><p>You can reason about this function as if the definition was:
+</p><pre><code><a href="Control-Lens-Internal-Zipper.html#v:fromWithin">fromWithin</a></code> l &#8801; <code>fromJust</code> <code>.</code> <code><a href="Control-Lens-Internal-Zipper.html#v:within">within</a></code> l</pre><p>but it is lazier in such a way that if this invariant is violated, some code
+ can still succeed if it is lazy enough in the use of the focused value.
+</p></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Zipper" class="def">Zipper</a> h a <span class="keyword">where</span><a href="src/Control-Lens-Internal-Zipper.html#Zipper" class="link">Source</a></p><div class="doc"><p>This enables us to pull the <code><a href="Control-Lens-Internal-Zipper.html#v:zipper">zipper</a></code> back up to the <code><a href="Control-Lens-Internal-Zipper.html#t:Top">Top</a></code>.
+</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:recoil" class="def">recoil</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a> h a -&gt; NonEmpty a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a<a href="src/Control-Lens-Internal-Zipper.html#recoil" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:Zipper" class="caption collapser" onclick="toggleSection('i:Zipper')">Instances</p><div id="section.i:Zipper" class="show"><table><tr><td class="src"><a href="Control-Lens-Internal-Zipper.html#t:Zipper">Zipper</a> <a href="Control-Lens-Internal-Zipper.html#t:Top">Top</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Internal-Zipper.html#t:Zipper">Zipper</a> h b =&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipper">Zipper</a> (<a href="Control-Lens-Internal-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:rezip" class="def">rezip</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Zipper">Zipper</a> h a =&gt; (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a<a href="src/Control-Lens-Internal-Zipper.html#rezip" class="link">Source</a></p><div class="doc"><p>Close something back up that you opened as a <code><a href="Control-Lens-Internal-Zipper.html#v:zipper">zipper</a></code>.
+</p></div></div><h1 id="g:2">Tapes
+</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Tape" class="def">Tape</a> k <span class="keyword">where</span><a href="src/Control-Lens-Internal-Zipper.html#Tape" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a></code> is a recorded path through the <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> chain of a <code><a href="Control-Lens-Internal-Zipper.html#t:Zipper">Zipper</a></code>.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Tape" class="def">Tape</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> h a -&gt; !Int -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><a name="v:saveTape" class="def">saveTape</a> :: (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a> (a <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b)<a href="src/Control-Lens-Internal-Zipper.html#saveTape" class="link">Source</a></p><div class="doc"><p>Save the current path as as a <code><a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a></code> we can play back later.
+</p></div></div><div class="top"><p class="src"><a name="v:restoreTape" class="def">restoreTape</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a -&gt; Maybe (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a)<a href="src/Control-Lens-Internal-Zipper.html#restoreTape" class="link">Source</a></p><div class="doc"><p>Restore ourselves to a previously recorded position precisely.
+</p><p>If the position does not exist, then fail.
+</p></div></div><div class="top"><p class="src"><a name="v:restoreNearTape" class="def">restoreNearTape</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a -&gt; Maybe (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a)<a href="src/Control-Lens-Internal-Zipper.html#restoreNearTape" class="link">Source</a></p><div class="doc"><p>Restore ourselves to a location near our previously recorded position.
+</p><p>When moving left to right through a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, if this will clamp at each level to the range <code>0 &lt;= k &lt; teeth</code>,
+ so the only failures will occur when one of the sequence of downward traversals find no targets.
+</p></div></div><div class="top"><p class="src"><a name="v:unsafelyRestoreTape" class="def">unsafelyRestoreTape</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a) -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a -&gt; h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a<a href="src/Control-Lens-Internal-Zipper.html#unsafelyRestoreTape" class="link">Source</a></p><div class="doc"><p>Restore ourselves to a previously recorded position.
+</p><p>This *assumes* that nothing has been done in the meantime to affect the existence of anything on the entire path.
+</p><p>Motions left or right are clamped, but all traversals included on the <code><a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a></code> are assumed to be non-empty.
+</p><p>Violate these assumptions at your own risk!
+</p></div></div><h1 id="g:3">Tracks
+</h1><div class="top"><p class="src"><a name="v:peel" class="def">peel</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a> h a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> h a<a href="src/Control-Lens-Internal-Zipper.html#peel" class="link">Source</a></p><div class="doc"><p>This is used to peel off the path information from a <code><a href="Control-Lens-Internal-Zipper.html#t:Coil">Coil</a></code> for use when saving the current path for later replay.
+</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Track" class="def">Track</a> <span class="keyword">where</span><a href="src/Control-Lens-Internal-Zipper.html#Track" class="link">Source</a></p><div class="doc"><p>The <code><a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a></code> forms the bulk of a <code><a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a></code>.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Track" class="def">Track</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> <a href="Control-Lens-Internal-Zipper.html#t:Top">Top</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Fork" class="def">Fork</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> h b -&gt; !Int -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) b a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> b) a</td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><a name="v:restoreTrack" class="def">restoreTrack</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> h a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a -&gt; Maybe (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a)<a href="src/Control-Lens-Internal-Zipper.html#restoreTrack" class="link">Source</a></p><div class="doc"><p>Restore ourselves to a previously recorded position precisely.
+</p><p>If the position does not exist, then fail.
+</p></div></div><div class="top"><p class="src"><a name="v:restoreNearTrack" class="def">restoreNearTrack</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> h a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a -&gt; Maybe (h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a)<a href="src/Control-Lens-Internal-Zipper.html#restoreNearTrack" class="link">Source</a></p><div class="doc"><p>Restore ourselves to a location near our previously recorded position.
+</p><p>When moving left to right through a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, if this will clamp at each level to the range <code>0 &lt;= k &lt; teeth</code>,
+ so the only failures will occur when one of the sequence of downward traversals find no targets.
+</p></div></div><div class="top"><p class="src"><a name="v:unsafelyRestoreTrack" class="def">unsafelyRestoreTrack</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Track">Track</a> h a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Zipped">Zipped</a> h a -&gt; h <a href="Control-Lens-Internal-Zipper.html#t::-62-">:&gt;</a> a<a href="src/Control-Lens-Internal-Zipper.html#unsafelyRestoreTrack" class="link">Source</a></p><div class="doc"><p>Restore ourselves to a previously recorded position.
+</p><p>This *assumes* that nothing has been done in the meantime to affect the existence of anything on the entire path.
+</p><p>Motions left or right are clamped, but all traversals included on the <code><a href="Control-Lens-Internal-Zipper.html#t:Tape">Tape</a></code> are assumed to be non-empty.
+</p><p>Violate these assumptions at your own risk!
+</p></div></div><h1 id="g:4">Levels
+</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-Zipper.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> !Int [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">Functor <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Foldable <a href="Control-Lens-Internal-Zipper.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-Zipper.html#t:Level">Level</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Comonad <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">ComonadStore Int <a href="Control-Lens-Internal-Zipper.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-Zipper.html#t:Level">Level</a> a -&gt; Int<a href="src/Control-Lens-Internal-Zipper.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-Zipper.html#t:Level">Level</a> a -&gt; Maybe (<a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a)<a href="src/Control-Lens-Internal-Zipper.html#leftLevel" class="link">Source</a></p><div class="doc"><p>Pull the non-empty 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-Zipper.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a<a href="src/Control-Lens-Internal-Zipper.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-Zipper.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a<a href="src/Control-Lens-Internal-Zipper.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:rightmostLevel" class="def">rightmostLevel</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a<a href="src/Control-Lens-Internal-Zipper.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:rightLevel" class="def">rightLevel</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a -&gt; Maybe (<a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a)<a href="src/Control-Lens-Internal-Zipper.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-Zipper.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a<a href="src/Control-Lens-Internal-Zipper.html#right1Level" class="link">Source</a></p><div class="doc"><p>Pull the non-empty list zipper right one entry, stopping at the last entry.
+</p></div></div><div class="top"><p class="src"><a name="v:focusLevel" class="def">focusLevel</a> :: Functor f =&gt; (a -&gt; f a) -&gt; <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a -&gt; f (<a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a)<a href="src/Control-Lens-Internal-Zipper.html#focusLevel" class="link">Source</a></p><div class="doc"><p>This is a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></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-Zipper.html#v:focusLevel">focusLevel</a></code> &#8801; <code>extract</code></pre><pre><code><a href="Control-Lens-Internal-Zipper.html#v:focusLevel">focusLevel</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> (<code><a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a></code> a) a</pre></div></div><div class="top"><p class="src"><a name="v:rezipLevel" class="def">rezipLevel</a> :: <a href="Control-Lens-Internal-Zipper.html#t:Level">Level</a> a -&gt; NonEmpty a<a href="src/Control-Lens-Internal-Zipper.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></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>
View
47 Control-Lens-Internal.html
@@ -1,21 +1,20 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Internal</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Internal.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Internal.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.Internal</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Internal Types
-</a></li><li><a href="#g:2">Hidden implementations
+</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.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.Internal</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Internal Types
</a></li></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">newtype</span> <a href="#t:May">May</a> a = <a href="#v:May">May</a> {<ul class="subs"><li><a href="#v:getMay">getMay</a> :: Maybe a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Folding">Folding</a> f a = <a href="#v:Folding">Folding</a> {<ul class="subs"><li><a href="#v:getFolding">getFolding</a> :: f a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Effect">Effect</a> m r a = <a href="#v:Effect">Effect</a> {<ul class="subs"><li><a href="#v:getEffect">getEffect</a> :: m r</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:EffectRWS">EffectRWS</a> w st m s a = <a href="#v:EffectRWS">EffectRWS</a> {<ul class="subs"><li><a href="#v:getEffectRWS">getEffectRWS</a> :: st -&gt; m (s, st, w)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Accessor">Accessor</a> r a = <a href="#v:Accessor">Accessor</a> {<ul class="subs"><li><a href="#v:runAccessor">runAccessor</a> :: r</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Err">Err</a> e a = <a href="#v:Err">Err</a> {<ul class="subs"><li><a href="#v:getErr">getErr</a> :: Either e a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Traversed">Traversed</a> f = <a href="#v:Traversed">Traversed</a> {<ul class="subs"><li><a href="#v:getTraversed">getTraversed</a> :: f ()</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Sequenced">Sequenced</a> m = <a href="#v:Sequenced">Sequenced</a> {<ul class="subs"><li><a href="#v:getSequenced">getSequenced</a> :: m ()</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Focusing">Focusing</a> m s a = <a href="#v:Focusing">Focusing</a> {<ul class="subs"><li><a href="#v:unfocusing">unfocusing</a> :: m (s, a)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingWith">FocusingWith</a> w m s a = <a href="#v:FocusingWith">FocusingWith</a> {<ul class="subs"><li><a href="#v:unfocusingWith">unfocusingWith</a> :: m (s, a, w)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingPlus">FocusingPlus</a> w k s a = <a href="#v:FocusingPlus">FocusingPlus</a> {<ul class="subs"><li><a href="#v:unfocusingPlus">unfocusingPlus</a> :: k (s, w) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingOn">FocusingOn</a> f k s a = <a href="#v:FocusingOn">FocusingOn</a> {<ul class="subs"><li><a href="#v:unfocusingOn">unfocusingOn</a> :: k (f s) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingMay">FocusingMay</a> k s a = <a href="#v:FocusingMay">FocusingMay</a> {<ul class="subs"><li><a href="#v:unfocusingMay">unfocusingMay</a> :: k (<a href="Control-Lens-Internal.html#t:May">May</a> s) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingErr">FocusingErr</a> e k s a = <a href="#v:FocusingErr">FocusingErr</a> {<ul class="subs"><li><a href="#v:unfocusingErr">unfocusingErr</a> :: k (<a href="Control-Lens-Internal.html#t:Err">Err</a> e s) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Mutator">Mutator</a> a = <a href="#v:Mutator">Mutator</a> {<ul class="subs"><li><a href="#v:runMutator">runMutator</a> :: a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Bazaar">Bazaar</a> a b t = <a href="#v:Bazaar">Bazaar</a> {<ul class="subs"><li><a href="#v:runBazaar">runBazaar</a> :: <span class="keyword">forall</span> f. Applicative f =&gt; (a -&gt; f b) -&gt; f t</li></ul>}</li><li class="src short"><a href="#v:bazaar">bazaar</a> :: Applicative f =&gt; (a -&gt; f b) -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b t -&gt; f t</li><li class="src short"><a href="#v:duplicateBazaar">duplicateBazaar</a> :: <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a c t -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> b c t)</li><li class="src short"><a href="#v:sell">sell</a> :: a -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b b</li><li class="src short"><span class="keyword">data</span> <a href="#t:Context">Context</a> a b t = <a href="#v:Context">Context</a> (b -&gt; t) a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Max">Max</a> a<ul class="subs"><li>= <a href="#v:NoMax">NoMax</a> </li><li>| <a href="#v:Max">Max</a> a </li></ul></li><li class="src short"><a href="#v:getMax">getMax</a> :: <a href="Control-Lens-Internal.html#t:Max">Max</a> a -&gt; Maybe a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Min">Min</a> a<ul class="subs"><li>= <a href="#v:NoMin">NoMin</a> </li><li>| <a href="#v:Min">Min</a> a </li></ul></li><li class="src short"><a href="#v:getMin">getMin</a> :: <a href="Control-Lens-Internal.html#t:Min">Min</a> a -&gt; Maybe a</li><li class="src short"><span class="keyword">data</span> <a href="#t:ElementOfResult">ElementOfResult</a> f a = <a href="#v:Searching">Searching</a> Int a (Maybe (f a))</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ElementOf">ElementOf</a> f a = <a href="#v:ElementOf">ElementOf</a> {<ul class="subs"><li><a href="#v:getElementOf">getElementOf</a> :: Int -&gt; <a href="Control-Lens-Internal.html#t:ElementOfResult">ElementOfResult</a> f a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Indexing">Indexing</a> f a = <a href="#v:Indexing">Indexing</a> {<ul class="subs"><li><a href="#v:runIndexing">runIndexing</a> :: Int -&gt; (f a, Int)</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:Level">Level</a> a = <a href="#v:Level">Level</a> !Int [a] a [a]</li><li class="src short"><a href="#v:levelWidth">levelWidth</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; Int</li><li class="src short"><a href="#v:leftLevel">leftLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; Maybe (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)</li><li class="src short"><a href="#v:left1Level">left1Level</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:leftmostLevel">leftmostLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:rightmostLevel">rightmostLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:rightLevel">rightLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; Maybe (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)</li><li class="src short"><a href="#v:right1Level">right1Level</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a</li><li class="src short"><a href="#v:focusLevel">focusLevel</a> :: Functor f =&gt; (a -&gt; f a) -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; f (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)</li><li class="src short"><a href="#v:rezipLevel">rezipLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; NonEmpty a</li><li class="src short"><span class="keyword">data</span> <a href="#t:BazaarT">BazaarT</a> a b g s</li></ul></div><div id="interface"><h1 id="g:1">Internal Types
+</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">newtype</span> <a href="#t:May">May</a> a = <a href="#v:May">May</a> {<ul class="subs"><li><a href="#v:getMay">getMay</a> :: Maybe a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Folding">Folding</a> f a = <a href="#v:Folding">Folding</a> {<ul class="subs"><li><a href="#v:getFolding">getFolding</a> :: f a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Effect">Effect</a> m r a = <a href="#v:Effect">Effect</a> {<ul class="subs"><li><a href="#v:getEffect">getEffect</a> :: m r</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:EffectRWS">EffectRWS</a> w st m s a = <a href="#v:EffectRWS">EffectRWS</a> {<ul class="subs"><li><a href="#v:getEffectRWS">getEffectRWS</a> :: st -&gt; m (s, st, w)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Accessor">Accessor</a> r a = <a href="#v:Accessor">Accessor</a> {<ul class="subs"><li><a href="#v:runAccessor">runAccessor</a> :: r</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Err">Err</a> e a = <a href="#v:Err">Err</a> {<ul class="subs"><li><a href="#v:getErr">getErr</a> :: Either e a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Traversed">Traversed</a> f = <a href="#v:Traversed">Traversed</a> {<ul class="subs"><li><a href="#v:getTraversed">getTraversed</a> :: f ()</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Sequenced">Sequenced</a> m = <a href="#v:Sequenced">Sequenced</a> {<ul class="subs"><li><a href="#v:getSequenced">getSequenced</a> :: m ()</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Focusing">Focusing</a> m s a = <a href="#v:Focusing">Focusing</a> {<ul class="subs"><li><a href="#v:unfocusing">unfocusing</a> :: m (s, a)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingWith">FocusingWith</a> w m s a = <a href="#v:FocusingWith">FocusingWith</a> {<ul class="subs"><li><a href="#v:unfocusingWith">unfocusingWith</a> :: m (s, a, w)</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingPlus">FocusingPlus</a> w k s a = <a href="#v:FocusingPlus">FocusingPlus</a> {<ul class="subs"><li><a href="#v:unfocusingPlus">unfocusingPlus</a> :: k (s, w) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingOn">FocusingOn</a> f k s a = <a href="#v:FocusingOn">FocusingOn</a> {<ul class="subs"><li><a href="#v:unfocusingOn">unfocusingOn</a> :: k (f s) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingMay">FocusingMay</a> k s a = <a href="#v:FocusingMay">FocusingMay</a> {<ul class="subs"><li><a href="#v:unfocusingMay">unfocusingMay</a> :: k (<a href="Control-Lens-Internal.html#t:May">May</a> s) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:FocusingErr">FocusingErr</a> e k s a = <a href="#v:FocusingErr">FocusingErr</a> {<ul class="subs"><li><a href="#v:unfocusingErr">unfocusingErr</a> :: k (<a href="Control-Lens-Internal.html#t:Err">Err</a> e s) a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Mutator">Mutator</a> a = <a href="#v:Mutator">Mutator</a> {<ul class="subs"><li><a href="#v:runMutator">runMutator</a> :: a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Bazaar">Bazaar</a> a b t = <a href="#v:Bazaar">Bazaar</a> {<ul class="subs"><li><a href="#v:runBazaar">runBazaar</a> :: <span class="keyword">forall</span> f. Applicative f =&gt; (a -&gt; f b) -&gt; f t</li></ul>}</li><li class="src short"><a href="#v:bazaar">bazaar</a> :: Applicative f =&gt; (a -&gt; f b) -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b t -&gt; f t</li><li class="src short"><a href="#v:duplicateBazaar">duplicateBazaar</a> :: <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a c t -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> b c t)</li><li class="src short"><a href="#v:sell">sell</a> :: a -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b b</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:BazaarT">BazaarT</a> a b g t = <a href="#v:BazaarT">BazaarT</a> {<ul class="subs"><li><a href="#v:runBazaarT">runBazaarT</a> :: <span class="keyword">forall</span> f. Applicative f =&gt; (a -&gt; f b) -&gt; f t</li></ul>}</li><li class="src short"><a href="#v:bazaarT">bazaarT</a> :: Applicative f =&gt; (a -&gt; f b) -&gt; <a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g t -&gt; f t</li><li class="src short"><a href="#v:duplicateBazaarT">duplicateBazaarT</a> :: <a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a c f t -&gt; <a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b f (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> b c f t)</li><li class="src short"><a href="#v:sellT">sellT</a> :: a -&gt; <a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b f b</li><li class="src short"><span class="keyword">data</span> <a href="#t:Context">Context</a> a b t = <a href="#v:Context">Context</a> (b -&gt; t) a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Max">Max</a> a<ul class="subs"><li>= <a href="#v:NoMax">NoMax</a> </li><li>| <a href="#v:Max">Max</a> a </li></ul></li><li class="src short"><a href="#v:getMax">getMax</a> :: <a href="Control-Lens-Internal.html#t:Max">Max</a> a -&gt; Maybe a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Min">Min</a> a<ul class="subs"><li>= <a href="#v:NoMin">NoMin</a> </li><li>| <a href="#v:Min">Min</a> a </li></ul></li><li class="src short"><a href="#v:getMin">getMin</a> :: <a href="Control-Lens-Internal.html#t:Min">Min</a> a -&gt; Maybe a</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Indexing">Indexing</a> f a = <a href="#v:Indexing">Indexing</a> {<ul class="subs"><li><a href="#v:runIndexing">runIndexing</a> :: Int -&gt; (f a, Int)</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Internal Types
</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:May" class="def">May</a> a <a href="src/Control-Lens-Internal.html#May" class="link">Source</a></p><div class="doc"><p>Make a monoid out of <code>Maybe</code> for error handling
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:May" class="def">May</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getMay" class="def">getMay</a> :: Maybe a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:May" class="caption collapser" onclick="toggleSection('i:May')">Instances</p><div id="section.i:May" class="show"><table><tr><td class="src">Monoid a =&gt; Monoid (<a href="Control-Lens-Internal.html#t:May">May</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Folding" class="def">Folding</a> f a <a href="src/Control-Lens-Internal.html#Folding" class="link">Source</a></p><div class="doc"><p>A <code>Monoid</code> for a <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> <code>Applicative</code>.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Folding" class="def">Folding</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getFolding" class="def">getFolding</a> :: f a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Folding" class="caption collapser" onclick="toggleSection('i:Folding')">Instances</p><div id="section.i:Folding" class="show"><table><tr><td class="src">(<a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Folding">Folding</a> f a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Effect" class="def">Effect</a> m r a <a href="src/Control-Lens-Internal.html#Effect" class="link">Source</a></p><div class="doc"><p>Wrap a monadic effect with a phantom type argument.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Effect" class="def">Effect</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getEffect" class="def">getEffect</a> :: m r</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Effect" class="caption collapser" onclick="toggleSection('i:Effect')">Instances</p><div id="section.i:Effect" class="show"><table><tr><td class="src">Monad m =&gt; <a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid r) =&gt; Applicative (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monad m =&gt; <a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> (ReaderT b m) (ReaderT a m) (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m) b a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid r) =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:EffectRWS" class="def">EffectRWS</a> w st m s a <a href="src/Control-Lens-Internal.html#EffectRWS" class="link">Source</a></p><div class="doc"><p>Wrap a monadic effect with a phantom type argument. Used when magnifying RWST.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:EffectRWS" class="def">EffectRWS</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getEffectRWS" class="def">getEffectRWS</a> :: st -&gt; m (s, st, w)</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:EffectRWS" class="caption collapser" onclick="toggleSection('i:EffectRWS')">Instances</p><div id="section.i:EffectRWS" class="show"><table><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monoid s, Monoid w, Monad m) =&gt; Applicative (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid w) =&gt; <a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> (RWST b w s m) (RWST a w s m) (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m) b a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid w) =&gt; <a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> (RWST b w s m) (RWST a w s m) (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m) b a</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Accessor" class="def">Accessor</a> r a <a href="src/Control-Lens-Internal.html#Accessor" class="link">Source</a></p><div class="doc"><p>Used instead of <code>Const</code> to report
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Effect" class="def">Effect</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getEffect" class="def">getEffect</a> :: m r</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Effect" class="caption collapser" onclick="toggleSection('i:Effect')">Instances</p><div id="section.i:Effect" class="show"><table><tr><td class="src">Monad m =&gt; <a href="Control-Lens-Classes.html#t:Effective">Effective</a> m r (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid r) =&gt; Applicative (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monad m =&gt; <a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> (ReaderT b m) (ReaderT a m) (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m) b a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid r) =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:EffectRWS" class="def">EffectRWS</a> w st m s a <a href="src/Control-Lens-Internal.html#EffectRWS" class="link">Source</a></p><div class="doc"><p>Wrap a monadic effect with a phantom type argument. Used when magnifying RWST.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:EffectRWS" class="def">EffectRWS</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getEffectRWS" class="def">getEffectRWS</a> :: st -&gt; m (s, st, w)</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:EffectRWS" class="caption collapser" onclick="toggleSection('i:EffectRWS')">Instances</p><div id="section.i:EffectRWS" class="show"><table><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monoid s, Monoid w, Monad m) =&gt; Applicative (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid w) =&gt; <a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> (RWST b w s m) (RWST a w s m) (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m) b a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Monad m, Monoid w) =&gt; <a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> (RWST b w s m) (RWST a w s m) (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m) b a</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Accessor" class="def">Accessor</a> r a <a href="src/Control-Lens-Internal.html#Accessor" class="link">Source</a></p><div class="doc"><p>Used instead of <code>Const</code> to report
</p><pre>No instance of (<code><a href="Control-Lens-Setter.html#t:Settable">Settable</a></code> <code><a href="Control-Lens-Internal.html#t:Accessor">Accessor</a></code>)</pre><p>when the user attempts to misuse a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> as a
<code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code>, rather than a monolithic unification error.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Accessor" class="def">Accessor</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:runAccessor" class="def">runAccessor</a> :: r</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Accessor" class="caption collapser" onclick="toggleSection('i:Accessor')">Instances</p><div id="section.i:Accessor" class="show"><table><tr><td class="src"><a href="Control-Lens-Classes.html#t:Effective">Effective</a> Identity r (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monoid r =&gt; Applicative (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> ((-&gt;) b) ((-&gt;) a) <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> b a</td><td class="doc"><pre><code><a href="Control-Lens-Zoom.html#v:magnify">magnify</a></code> = <code><a href="Control-Lens-Getter.html#v:views">views</a></code></pre></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Err" class="def">Err</a> e a <a href="src/Control-Lens-Internal.html#Err" class="link">Source</a></p><div class="doc"><p>Make a monoid out of <code>Either</code> for error handling
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Accessor" class="def">Accessor</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:runAccessor" class="def">runAccessor</a> :: r</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Accessor" class="caption collapser" onclick="toggleSection('i:Accessor')">Instances</p><div id="section.i:Accessor" class="show"><table><tr><td class="src"><a href="Control-Lens-Classes.html#t:Effective">Effective</a> Identity r (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monoid r =&gt; Applicative (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> ((-&gt;) b) ((-&gt;) a) <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> b a</td><td class="doc"><pre><code><a href="Control-Lens-Zoom.html#v:magnify">magnify</a></code> = <code><a href="Control-Lens-Getter.html#v:views">views</a></code></pre></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Err" class="def">Err</a> e a <a href="src/Control-Lens-Internal.html#Err" class="link">Source</a></p><div class="doc"><p>Make a monoid out of <code>Either</code> for error handling
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Err" class="def">Err</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getErr" class="def">getErr</a> :: Either e a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Err" class="caption collapser" onclick="toggleSection('i:Err')">Instances</p><div id="section.i:Err" class="show"><table><tr><td class="src">Monoid a =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Err">Err</a> e a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Traversed" class="def">Traversed</a> f <a href="src/Control-Lens-Internal.html#Traversed" class="link">Source</a></p><div class="doc"><p>Used internally by <code><a href="Control-Lens-Traversal.html#t:traverseOf_">traverseOf_</a></code> and the like.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Traversed" class="def">Traversed</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getTraversed" class="def">getTraversed</a> :: f ()</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Traversed" class="caption collapser" onclick="toggleSection('i:Traversed')">Instances</p><div id="section.i:Traversed" class="show"><table><tr><td class="src">Applicative f =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Sequenced" class="def">Sequenced</a> m <a href="src/Control-Lens-Internal.html#Sequenced" class="link">Source</a></p><div class="doc"><p>Used internally by <code><a href="Control-Lens-Traversal.html#t:mapM_">mapM_</a></code> and the like.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Sequenced" class="def">Sequenced</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getSequenced" class="def">getSequenced</a> :: m ()</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Sequenced" class="caption collapser" onclick="toggleSection('i:Sequenced')">Instances</p><div id="section.i:Sequenced" class="show"><table><tr><td class="src">Monad m =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Focusing" class="def">Focusing</a> m s a <a href="src/Control-Lens-Internal.html#Focusing" class="link">Source</a></p><div class="doc"><p>Used by <code><a href="Control-Lens-Type.html#t:Zoom">Zoom</a></code> to <code><a href="Control-Lens-Type.html#t:zoom">zoom</a></code> into <code><a href="Control-Monad-State.html#t:StateT">StateT</a></code>
@@ -41,6 +40,13 @@
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Bazaar" class="def">Bazaar</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:runBazaar" class="def">runBazaar</a> :: <span class="keyword">forall</span> f. Applicative f =&gt; (a -&gt; f b) -&gt; f t</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:Bazaar" class="caption collapser" onclick="toggleSection('i:Bazaar')">Instances</p><div id="section.i:Bazaar" class="show"><table><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Applicative (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">~ * a b =&gt; ComonadApply (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">~ * a b =&gt; Comonad (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:bazaar" class="def">bazaar</a> :: Applicative f =&gt; (a -&gt; f b) -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b t -&gt; f t<a href="src/Control-Lens-Internal.html#bazaar" class="link">Source</a></p><div class="doc"><p>Given an action to run for each matched pair, traverse a bazaar.
</p><pre><code><a href="Control-Lens-Internal.html#v:bazaar">bazaar</a></code> :: <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> (<code><a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a></code> a b t) t a b</pre></div></div><div class="top"><p class="src"><a name="v:duplicateBazaar" class="def">duplicateBazaar</a> :: <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a c t -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> b c t)<a href="src/Control-Lens-Internal.html#duplicateBazaar" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a></code> is an indexed <code>Comonad</code>.
</p></div></div><div class="top"><p class="src"><a name="v:sell" class="def">sell</a> :: a -&gt; <a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b b<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:BazaarT" class="def">BazaarT</a> a b g t <a href="src/Control-Lens-Internal.html#BazaarT" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a></code> is like <code><a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a></code>, except that it provides a questionable <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> instance
+ To protect this instance it relies on the soundness of another <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> type, and usage conventions.
+</p><p>For example. This lets us write a suitably polymorphic and lazy <code><a href="Control-Lens-Traversal.html#t:taking">taking</a></code>, but there
+ must be a better way!
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:BazaarT" class="def">BazaarT</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:runBazaarT" class="def">runBazaarT</a> :: <span class="keyword">forall</span> f. Applicative f =&gt; (a -&gt; f b) -&gt; f t</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:BazaarT" class="caption collapser" onclick="toggleSection('i:BazaarT')">Instances</p><div id="section.i:BazaarT" class="show"><table><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Applicative (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">~ * a b =&gt; Comonad (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:bazaarT" class="def">bazaarT</a> :: Applicative f =&gt; (a -&gt; f b) -&gt; <a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g t -&gt; f t<a href="src/Control-Lens-Internal.html#bazaarT" class="link">Source</a></p><div class="doc"><p>Extract from a <code><a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a></code>.
+</p><pre><code><a href="Control-Lens-Internal.html#v:bazaarT">bazaarT</a></code> = <code>flip</code> <code><a href="Control-Lens-Internal.html#v:runBazaarT">runBazaarT</a></code></pre></div></div><div class="top"><p class="src"><a name="v:duplicateBazaarT" class="def">duplicateBazaarT</a> :: <a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a c f t -&gt; <a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b f (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> b c f t)<a href="src/Control-Lens-Internal.html#duplicateBazaarT" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a></code> is an indexed <code>Comonad</code>.
+</p></div></div><div class="top"><p class="src"><a name="v:sellT" class="def">sellT</a> :: a -&gt; <a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b f b<a href="src/Control-Lens-Internal.html#sellT" class="link">Source</a></p><div class="doc"><p>A trivial <code><a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a></code>.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Context" class="def">Context</a> a b t <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><p><code><code><a href="Control-Lens-Internal.html#t:Context">Context</a></code> a b t</code> is isomorphic to
@@ -51,31 +57,6 @@
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NoMax" class="def">NoMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Max" class="def">Max</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Max" class="caption collapser" onclick="toggleSection('i:Max')">Instances</p><div id="section.i:Max" class="show"><table><tr><td class="src">Ord a =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Max">Max</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:getMax" class="def">getMax</a> :: <a href="Control-Lens-Internal.html#t:Max">Max</a> a -&gt; Maybe a<a href="src/Control-Lens-Internal.html#getMax" class="link">Source</a></p><div class="doc"><p>Obtain the maximum
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Min" class="def">Min</a> a <a href="src/Control-Lens-Internal.html#Min" class="link">Source</a></p><div class="doc"><p>Used for <code><a href="Control-Lens-Fold.html#t:minimumOf">minimumOf</a></code>
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NoMin" class="def">NoMin</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Min" class="def">Min</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Min" class="caption collapser" onclick="toggleSection('i:Min')">Instances</p><div id="section.i:Min" class="show"><table><tr><td class="src">Ord a =&gt; Monoid (<a href="Control-Lens-Internal.html#t:Min">Min</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:getMin" class="def">getMin</a> :: <a href="Control-Lens-Internal.html#t:Min">Min</a> a -&gt; Maybe a<a href="src/Control-Lens-Internal.html#getMin" class="link">Source</a></p><div class="doc"><p>Obtain the minimum.
-</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ElementOfResult" class="def">ElementOfResult</a> f a <a href="src/Control-Lens-Internal.html#ElementOfResult" class="link">Source</a></p><div class="doc"><p>The result of searching for a particular element in a Traversal.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Searching" class="def">Searching</a> Int a (Maybe (f a))</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ElementOfResult" class="caption collapser" onclick="toggleSection('i:ElementOfResult')">Instances</p><div id="section.i:ElementOfResult" class="show"><table><tr><td class="src">Functor f =&gt; Functor (<a href="Control-Lens-Internal.html#t:ElementOfResult">ElementOfResult</a> f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ElementOf" class="def">ElementOf</a> f a <a href="src/Control-Lens-Internal.html#ElementOf" class="link">Source</a></p><div class="doc"><p>Searches for a particular element in a Traversal.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ElementOf" class="def">ElementOf</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:getElementOf" class="def">getElementOf</a> :: Int -&gt; <a href="Control-Lens-Internal.html#t:ElementOfResult">ElementOfResult</a> f a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:ElementOf" class="caption collapser" onclick="toggleSection('i:ElementOf')">Instances</p><div id="section.i:ElementOf" class="show"><table><tr><td class="src">Functor f =&gt; Functor (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor f =&gt; Applicative (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> f =&gt; <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Indexing" class="def">Indexing</a> f a <a href="src/Control-Lens-Internal.html#Indexing" class="link">Source</a></p><div class="doc"><p>Applicative composition of <code><code><a href="Control-Monad-Trans-State-Lazy.html#t:State">State</a></code> <code>Int</code></code> with a <code>Functor</code>, used
+</p></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Indexing" class="def">Indexing</a> f a <a href="src/Control-Lens-Internal.html#Indexing" class="link">Source</a></p><div class="doc"><p>Applicative composition of <code><code><a href="Control-Monad-Trans-State-Lazy.html#t:State">State</a></code> <code>Int</code></code> with a <code>Functor</code>, used
by <code><a href="Control-Lens-Indexed.html#t:indexed">indexed</a></code>
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Indexing" class="def">Indexing</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:runIndexing" class="def">runIndexing</a> :: Int -&gt; (f a, Int)</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Indexing" class="caption collapser" onclick="toggleSection('i:Indexing')">Instances</p><div id="section.i:Indexing" class="show"><table><tr><td class="src">Functor f =&gt; Functor (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Applicative f =&gt; Applicative (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> f =&gt; <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Level" class="def">Level</a> a <a href="src/Control-Lens-Internal.html#Level" class="link">Source</a></p><div class="doc"><p>A basic non-empty list zipper
-</p><p>All combinators assume the invariant that the length stored matches the number
- of elements in list of items to the left, and the list of items to the left is
- stored reversed.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Level" class="def">Level</a> !Int [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">Functor <a href="Control-Lens-Internal.html#t:Level">Level</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Foldable <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 Int <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; Int<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; Maybe (<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: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:rightLevel" class="def">rightLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; Maybe (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)<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:focusLevel" class="def">focusLevel</a> :: Functor f =&gt; (a -&gt; f a) -&gt; <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; f (<a href="Control-Lens-Internal.html#t:Level">Level</a> a)<a href="src/Control-Lens-Internal.html#focusLevel" class="link">Source</a></p><div class="doc"><p>This is a <code>Lens</code> targeting the value that we would <code>extract</code> from the non-empty list zipper.
-</p><pre><code>view</code> <code><a href="Control-Lens-Internal.html#v:focusLevel">focusLevel</a></code> &#8801; <code>extract</code></pre><pre><code><a href="Control-Lens-Internal.html#v:focusLevel">focusLevel</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> (<code><a href="Control-Lens-Internal.html#t:Level">Level</a></code> a) a</pre></div></div><div class="top"><p class="src"><a name="v:rezipLevel" class="def">rezipLevel</a> :: <a href="Control-Lens-Internal.html#t:Level">Level</a> a -&gt; NonEmpty a<a href="src/Control-Lens-Internal.html#rezipLevel" class="link">Source</a></p><div class="doc"><p>Zip a non-empty list zipper back up, and return the result.
-</p></div></div><h1 id="g:2">Hidden implementations
-</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:BazaarT" class="def">BazaarT</a> a b g s <a href="src/Control-Lens-Internal-BazaarT.html#BazaarT" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a></code> is like <code><a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a></code>, except that it provides a questionable <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> instance
- where <code><code><a href="Control-Lens-Internal.html#t:coerce">coerce</a></code> = <code>unsafeCoerce</code></code>. To protect this instance it relies on
- a combination of the fact that we do not export the tools for working with this type, beyond its type signature
- to user code, and the fact that it borrows a proof obligation that the <code><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a></code> instance is sound from another
- <code>Getter</code>.
-</p><p>For example. This lets us write a suitably polymorphic and lazy <code><a href="Control-Lens-Traversal.html#t:taking">taking</a></code>, but there
- must be a better way!
-</p><p><code>g</code> is a phantom type used in the <code><a href="Control-Lens-Internal.html#t:Gettable">Gettable</a></code> instance.
-</p></div><div class="subs instances"><p id="control.i:BazaarT" class="caption collapser" onclick="toggleSection('i:BazaarT')">Instances</p><div id="section.i:BazaarT" class="show"><table><tr><td class="src">Functor (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Applicative (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> g =&gt; <a href="Control-Lens-Unsafe.html#t:Trustworthy">Trustworthy</a> (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> g =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:BazaarT">BazaarT</a> a b g)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Indexing" class="def">Indexing</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:runIndexing" class="def">runIndexing</a> :: Int -&gt; (f a, Int)</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Indexing" class="caption collapser" onclick="toggleSection('i:Indexing')">Instances</p><div id="section.i:Indexing" class="show"><table><tr><td class="src">Functor f =&gt; Functor (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Applicative f =&gt; Applicative (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Classes.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>
View
2  Control-Lens-Iso.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Iso</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Iso.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Iso.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Iso</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Isomorphism Lenses
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Iso.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Iso</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Isomorphism Lenses
</a></li><li><a href="#g:2">Working with isomorphisms
</a></li><li><a href="#g:3">Primitive isomorphisms
</a><ul><li><a href="#g:4">Common Isomorphisms
View
2  Control-Lens-Isomorphic.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Isomorphic</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Isomorphic.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Isomorphic.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Isomorphic</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> Category k =&gt; <a href="#t:Isomorphic">Isomorphic</a> k <span class="keyword">where</span><ul class="subs"><li><a href="#v:isomorphic">isomorphic</a> :: (a -&gt; b) -&gt; (b -&gt; a) -&gt; k a b</li><li><a href="#v:isomap">isomap</a> :: ((a -&gt; b) -&gt; c -&gt; d) -&gt; ((b -&gt; a) -&gt; d -&gt; c) -&gt; k a b -&gt; k c d</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Isomorphism">Isomorphism</a> a b = <a href="#v:Isomorphism">Isomorphism</a> (a -&gt; b) (b -&gt; a)</li><li class="src short"><a href="#v:from">from</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphism">Isomorphism</a> a b -&gt; k b a</li><li class="src short"><a href="#v:via">via</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphism">Isomorphism</a> a b -&gt; k a b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">class</span> Category k =&gt; <a name="t:Isomorphic" class="def">Isomorphic</a> k <span class="keyword">where</span><a href="src/Control-Lens-Isomorphic.html#Isomorphic" class="link">Source</a></p><div class="doc"><p>Used to provide overloading of isomorphism application
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Isomorphic.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Isomorphic</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> Category k =&gt; <a href="#t:Isomorphic">Isomorphic</a> k <span class="keyword">where</span><ul class="subs"><li><a href="#v:isomorphic">isomorphic</a> :: (a -&gt; b) -&gt; (b -&gt; a) -&gt; k a b</li><li><a href="#v:isomap">isomap</a> :: ((a -&gt; b) -&gt; c -&gt; d) -&gt; ((b -&gt; a) -&gt; d -&gt; c) -&gt; k a b -&gt; k c d</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Isomorphism">Isomorphism</a> a b = <a href="#v:Isomorphism">Isomorphism</a> (a -&gt; b) (b -&gt; a)</li><li class="src short"><a href="#v:from">from</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphism">Isomorphism</a> a b -&gt; k b a</li><li class="src short"><a href="#v:via">via</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphism">Isomorphism</a> a b -&gt; k a b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">class</span> Category k =&gt; <a name="t:Isomorphic" class="def">Isomorphic</a> k <span class="keyword">where</span><a href="src/Control-Lens-Isomorphic.html#Isomorphic" class="link">Source</a></p><div class="doc"><p>Used to provide overloading of isomorphism application
</p><p>This is a <code>Category</code> with a canonical mapping to it from the
category of isomorphisms over Haskell types.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:isomorphic" class="def">isomorphic</a> :: (a -&gt; b) -&gt; (b -&gt; a) -&gt; k a b<a href="src/Control-Lens-Isomorphic.html#isomorphic" class="link">Source</a></p><div class="doc"><p>Build this morphism out of an isomorphism
View
2  Control-Lens-Loupe.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Loupe</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Loupe.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Loupe.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Loupe</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Lenses
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Loupe.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Loupe</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Lenses
</a></li><li><a href="#g:2">Simplified
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A <code><a href="Control-Lens-Loupe.html#t:Loupe">Loupe</a></code> is a minimalist <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> suitable for storing in containers
or returning monadically that can still be composed with other lenses.
View
4 Control-Lens-Plated.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Plated</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Plated.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Plated.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.5.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Plated</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Uniplate
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Plated.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info