Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

3.3 docs

  • Loading branch information...
commit edf37c04c82aed73ab7cd325edcb0324f2f92c99 1 parent ca85f6a
@ekmett authored
Showing with 1,886 additions and 1,834 deletions.
  1. +5 −5 Control-Exception-Lens.html
  2. +16 −16 Control-Lens-Action.html
  3. +3 −3 Control-Lens-Combinators.html
  4. +328 −321 Control-Lens-Fold.html
  5. +74 −75 Control-Lens-Getter.html
  6. +10 −10 Control-Lens-Indexed.html
  7. +163 −119 Control-Lens-IndexedFold.html
  8. +6 −6 Control-Lens-IndexedGetter.html
  9. +29 −25 Control-Lens-IndexedLens.html
  10. +31 −31 Control-Lens-IndexedSetter.html
  11. +42 −42 Control-Lens-IndexedTraversal.html
  12. +54 −56 Control-Lens-Internal.html
  13. +33 −32 Control-Lens-Iso.html
  14. +7 −7 Control-Lens-Isomorphic.html
  15. +27 −0 Control-Lens-Loupe.html
  16. +132 −136 Control-Lens-Plated.html
  17. +9 −9 Control-Lens-Projection.html
  18. +50 −50 Control-Lens-Representable.html
  19. +218 −211 Control-Lens-Setter.html
  20. +8 −0 Control-Lens-Simple.html
  21. +28 −28 Control-Lens-TH.html
  22. +90 −115 Control-Lens-Traversal.html
  23. +24 −24 Control-Lens-Tuple.html
  24. +136 −142 Control-Lens-Type.html
  25. +61 −61 Control-Lens-WithIndex.html
  26. +27 −27 Control-Lens-Zipper.html
  27. +16 −16 Control-Lens-Zoom.html
  28. +5 −5 Control-Lens.html
  29. +13 −13 Control-Parallel-Strategies-Lens.html
  30. +3 −3 Control-Seq-Lens.html
  31. +14 −14 Data-Array-Lens.html
  32. +39 −39 Data-Bits-Lens.html
  33. +8 −8 Data-ByteString-Lazy-Lens.html
  34. +8 −8 Data-ByteString-Lens.html
  35. +7 −7 Data-ByteString-Strict-Lens.html
  36. +7 −7 Data-Complex-Lens.html
  37. +12 −14 Data-Data-Lens.html
  38. +3 −3 Data-Dynamic-Lens.html
  39. +9 −9 Data-HashSet-Lens.html
  40. +9 −9 Data-IntSet-Lens.html
  41. +17 −77 Data-List-Lens.html
  42. +54 −0 Data-List-Split-Lens.html
  43. +21 −21 Data-Monoid-Lens.html
  44. +11 −11 Data-Sequence-Lens.html
  45. +9 −9 Data-Set-Lens.html
  46. +3 −3 Data-Text-Lazy-Lens.html
  47. +4 −4 Data-Text-Lens.html
  48. +3 −3 Data-Text-Strict-Lens.html
Sorry, we could not display the entire diff because it was too big.
View
10 Control-Exception-Lens.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.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.0.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Control.Exception</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Control.Exception.Lens</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:exception">exception</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a> b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> a b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:exception" class="def">exception</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a> b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a> a b<a href="src/Control-Exception-Lens.html#exception" class="link">Source</a></p><div class="doc"><p>Traverse the strongly typed <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a></code> contained in <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a></code> where the type of your function matches
- the desired <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a></code>.
+</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.3: 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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a></code> a, <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:Exception">Exception</a></code> b)
- =&gt; (a -&gt; f b) -&gt; <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a></code> -&gt; f <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Exception-Base.html#t:SomeException">SomeException</a></code>
-</pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.12.0</p></div></body></html>
+ exception :: (<code>Applicative</code> f, <code>Exception</code> a, <code>Exception</code> b)
+ =&gt; (a -&gt; f b) -&gt; <code>SomeException</code> -&gt; f <code>SomeException</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
32 Control-Lens-Action.html
@@ -1,29 +1,29 @@
<!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.0.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>MTPCs, FDs, Rank2</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Control.Lens.Action</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Composable Actions
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Action.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.3: 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 a c = <span class="keyword">forall</span> f r. <a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f =&gt; (c -&gt; f c) -&gt; a -&gt; f a</li><li class="src short"><a href="#v:act">act</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m c) -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> m a c</li><li class="src short"><a href="#v:acts">acts</a> :: <a href="Control-Lens-Action.html#t:Action">Action</a> m (m a) a</li><li class="src short"><a href="#v:perform">perform</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m c a b c d -&gt; a -&gt; m c</li><li class="src short"><a href="#v:performs">performs</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m e a b c d -&gt; (c -&gt; e) -&gt; a -&gt; m e</li><li class="src short"><a href="#v:liftAct">liftAct</a> :: (MonadTrans t, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m c a b c d -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> (t m) a c</li><li class="src short"><a href="#v:-94--33-">(^!)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; a -&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m c a b c d -&gt; m c</li><li class="src short"><span class="keyword">type</span> <a href="#t:MonadicFold">MonadicFold</a> m a c = <span class="keyword">forall</span> f r. (<a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f) =&gt; (c -&gt; f c) -&gt; a -&gt; f a</li><li class="src short"><span class="keyword">type</span> <a href="#t:Acting">Acting</a> m r a b c d = (c -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r d) -&gt; a -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r b</li></ul></div><div id="interface"><h1 id="g:1">Composable Actions
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Action" class="def">Action</a> m a c = <span class="keyword">forall</span> f r. <a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f =&gt; (c -&gt; f c) -&gt; a -&gt; f a<a href="src/Control-Lens-Action.html#Action" class="link">Source</a></p><div class="doc"><p>An <code><a href="Control-Lens-Action.html#t:Action">Action</a></code> is a <code>Getter</code> enriched with access to a <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a></code> for side-effects.
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Action">Action</a> m s a = <span class="keyword">forall</span> f r. <a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><a href="#v:act">act</a> :: Monad m =&gt; (s -&gt; m a) -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> m s a</li><li class="src short"><a href="#v:acts">acts</a> :: <a href="Control-Lens-Action.html#t:Action">Action</a> m (m a) a</li><li class="src short"><a href="#v:perform">perform</a> :: Monad m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; s -&gt; m a</li><li class="src short"><a href="#v:performs">performs</a> :: Monad m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m e s t a b -&gt; (a -&gt; e) -&gt; s -&gt; m e</li><li class="src short"><a href="#v:liftAct">liftAct</a> :: (MonadTrans trans, Monad m) =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> (trans m) s a</li><li class="src short"><a href="#v:-94--33-">(^!)</a> :: Monad m =&gt; s -&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; m a</li><li class="src short"><span class="keyword">type</span> <a href="#t:MonadicFold">MonadicFold</a> m s a = <span class="keyword">forall</span> f r. (<a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><span class="keyword">type</span> <a href="#t:Acting">Acting</a> m r s t a b = (a -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r b) -&gt; s -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r t</li></ul></div><div id="interface"><h1 id="g:1">Composable Actions
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Action" class="def">Action</a> m s a = <span class="keyword">forall</span> f r. <a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Action.html#Action" class="link">Source</a></p><div class="doc"><p>An <code><a href="Control-Lens-Action.html#t:Action">Action</a></code> is a <code>Getter</code> enriched with access to a <code>Monad</code> for side-effects.
</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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:.">.</a></code>) from the <code>Prelude</code>.
-</p></div></div><div class="top"><p class="src"><a name="v:act" class="def">act</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m c) -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> m a c<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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:id">id</a></code></pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(1,&quot;hello&quot;)^!_2.acts.to succ
+</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><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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m c a b c d -&gt; a -&gt; m c<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>.
+</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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m e a b c d -&gt; (c -&gt; e) -&gt; a -&gt; m e<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 t, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m c a b c d -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> (t m) a c<a href="src/Control-Lens-Action.html#liftAct" class="link">Source</a></p><div class="doc"><p>Apply a <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a></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> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; a -&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m c a b c d -&gt; m c<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>
+</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
</code></strong>hello
world
</pre></div></div><h1 id="g:2">Folds with Effecs
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:MonadicFold" class="def">MonadicFold</a> m a c = <span class="keyword">forall</span> f r. (<a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f) =&gt; (c -&gt; f c) -&gt; a -&gt; f a<a href="src/Control-Lens-Action.html#MonadicFold" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Action.html#t:MonadicFold">MonadicFold</a></code> is a <code>Fold</code> enriched with access to a <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a></code> for side-effects.
-</p><p>Every <code>Fold</code> can be used as a <code><a href="Control-Lens-Action.html#t:MonadicFold">MonadicFold</a></code>, that simply ignores the access to the <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a></code>.
-</p><p>You can compose a <code><a href="Control-Lens-Action.html#t:MonadicFold">MonadicFold</a></code> with another <code><a href="Control-Lens-Action.html#t:MonadicFold">MonadicFold</a></code> using (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:.">.</a></code>) from the <code>Prelude</code>.
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:MonadicFold" class="def">MonadicFold</a> m s a = <span class="keyword">forall</span> f r. (<a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Action.html#MonadicFold" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Action.html#t:MonadicFold">MonadicFold</a></code> is a <code>Fold</code> enriched with access to a <code>Monad</code> for side-effects.
+</p><p>Every <code>Fold</code> can be used as a <code><a href="Control-Lens-Action.html#t:MonadicFold">MonadicFold</a></code>, that simply ignores the access to the <code>Monad</code>.
+</p><p>You can compose a <code><a href="Control-Lens-Action.html#t:MonadicFold">MonadicFold</a></code> with another <code><a href="Control-Lens-Action.html#t:MonadicFold">MonadicFold</a></code> using (<code>.</code>) from the <code>Prelude</code>.
</p></div></div><h1 id="g:3">Implementation Details
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Acting" class="def">Acting</a> m r a b c d = (c -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r d) -&gt; a -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r b<a href="src/Control-Lens-Action.html#Acting" class="link">Source</a></p><div class="doc"><p>Used to evaluate an <code><a href="Control-Lens-Action.html#t:Action">Action</a></code>.
-</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.12.0</p></div></body></html>
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Acting" class="def">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<a href="src/Control-Lens-Action.html#Acting" class="link">Source</a></p><div class="doc"><p>Used to evaluate an <code><a href="Control-Lens-Action.html#t:Action">Action</a></code>.
+</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
6 Control-Lens-Combinators.html
@@ -1,10 +1,10 @@
<!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.0.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Combinators</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:-60--36--33--62-">(&lt;$!&gt;)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; b) -&gt; m a -&gt; m b</li><li class="src short"><a href="#v:-60--36--33-">(&lt;$!)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; b -&gt; m a -&gt; m b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:-60--36--33--62-" class="def">(&lt;$!&gt;)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; b) -&gt; m a -&gt; m b<a href="src/Control-Lens-Combinators.html#%3C%24%21%3E" class="link">Source</a></p><div class="doc"><p>A strict version of (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Functor.html#t:-60--36--62-">&lt;$&gt;</a></code>) for monads.
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Combinators.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.3: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Combinators</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:-60--36--33--62-">(&lt;$!&gt;)</a> :: Monad m =&gt; (a -&gt; b) -&gt; m a -&gt; m b</li><li class="src short"><a href="#v:-60--36--33-">(&lt;$!)</a> :: Monad m =&gt; b -&gt; m a -&gt; m b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:-60--36--33--62-" class="def">(&lt;$!&gt;)</a> :: Monad m =&gt; (a -&gt; b) -&gt; m a -&gt; m b<a href="src/Control-Lens-Combinators.html#%3C%24%21%3E" class="link">Source</a></p><div class="doc"><p>A strict version of (<code><a href="Data-Functor.html#t:-60--36--62-">&lt;$&gt;</a></code>) for monads.
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(+1) &lt;$!&gt; [1,2,3,4]
</code></strong>[2,3,4,5]
-</pre></div></div><div class="top"><p class="src"><a name="v:-60--36--33-" class="def">(&lt;$!)</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; b -&gt; m a -&gt; m b<a href="src/Control-Lens-Combinators.html#%3C%24%21" class="link">Source</a></p><div class="doc"><p>A strict version of (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Functor.html#t:-60--36-">&lt;$</a></code>) for monads.
+</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.
</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.12.0</p></div></body></html>
+</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
649 Control-Lens-Fold.html
328 additions, 321 deletions not shown
View
149 Control-Lens-Getter.html
@@ -1,43 +1,43 @@
<!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.0.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Control.Lens.Getter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Getters
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Getter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.3: 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
-</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A <code><code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> a c</code> is just any function <code>(a -&gt; c)</code>, which we've flipped
- into continuation passing style, <code>(c -&gt; r) -&gt; a -&gt; r</code> and decorated
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A <code><code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a</code> is just any function <code>(s -&gt; a)</code>, which we've flipped
+ into continuation passing style, <code>(a -&gt; r) -&gt; s -&gt; r</code> and decorated
with <code><a href="Control-Lens-Getter.html#t:Accessor">Accessor</a></code> to obtain:
-</p><pre>type <code><a href="Control-Lens-Getter.html#t:Getting">Getting</a></code> r a b c d = (c -&gt; <code><a href="Control-Lens-Getter.html#t:Accessor">Accessor</a></code> r d) -&gt; a -&gt; <code><a href="Control-Lens-Getter.html#t:Accessor">Accessor</a></code> r b</pre><p>If we restrict access to knowledge about the type <code>r</code> and can work for
- any d and b, we could get:
-</p><pre>type <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> a c = forall r. <code><a href="Control-Lens-Getter.html#t:Getting">Getting</a></code> r a a c c</pre><p>But we actually hide the use of <code><a href="Control-Lens-Getter.html#t:Accessor">Accessor</a></code> behind a class <code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code>
+</p><pre>type <code><a href="Control-Lens-Getter.html#t:Getting">Getting</a></code> r s t a b = (a -&gt; <code><a href="Control-Lens-Getter.html#t:Accessor">Accessor</a></code> r b) -&gt; s -&gt; <code><a href="Control-Lens-Getter.html#t:Accessor">Accessor</a></code> r t</pre><p>If we restrict access to knowledge about the type <code>r</code> and can work for
+ any b and t, we could get:
+</p><pre>type <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a = forall r. <code><a href="Control-Lens-Getter.html#t:Getting">Getting</a></code> r s s a a</pre><p>But we actually hide the use of <code><a href="Control-Lens-Getter.html#t:Accessor">Accessor</a></code> behind a class <code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code>
to error messages from type class resolution rather than at unification
time, where they are much uglier.
-</p><pre>type <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> a c = forall f. <code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code> f =&gt; (c -&gt; f c) -&gt; a -&gt; f a</pre><p>Everything you can do with a function, you can do with a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code>, but
- note that because of the continuation passing style (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:.">.</a></code>) composes them
+</p><pre>type <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a = forall f. <code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code> f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</pre><p>Everything you can do with a function, you can do with a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code>, but
+ note that because of the continuation passing style (<code>.</code>) composes them
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> a c = <span class="keyword">forall</span> f. <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; (c -&gt; f c) -&gt; a -&gt; f a</li><li class="src short"><span class="keyword">type</span> <a href="#t:Getting">Getting</a> r a b c d = (c -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r d) -&gt; a -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r b</li><li class="src short"><a href="#v:to">to</a> :: (a -&gt; c) -&gt; <a href="Control-Lens-Getter.html#t:Getter">Getter</a> a c</li><li class="src short"><a href="#v:-94-.">(^.)</a> :: a -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> c a b c d -&gt; c</li><li class="src short"><a href="#v:-94--36-">(^$)</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> c a b c d -&gt; a -&gt; c</li><li class="src short"><a href="#v:-37-">(%)</a> :: a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:-94--37-">(^%)</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> c a b c d -&gt; a -&gt; c</li><li class="src short"><a href="#v:views">views</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> m a b c d -&gt; (c -&gt; m) -&gt; a -&gt; m</li><li class="src short"><a href="#v:use">use</a> :: MonadState a m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> c a b c d -&gt; m c</li><li class="src short"><a href="#v:uses">uses</a> :: MonadState a m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> e a b c d -&gt; (c -&gt; e) -&gt; m e</li><li class="src short"><a href="#v:query">query</a> :: MonadReader a m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> c a b c d -&gt; m c</li><li class="src short"><a href="#v:queries">queries</a> :: MonadReader a m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> e a b c d -&gt; (c -&gt; e) -&gt; m e</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedGetter">ReifiedGetter</a> a c = <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> a c</li></ul>}</li><li class="src short"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; <a href="#t:Gettable">Gettable</a> f </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> a c = <span class="keyword">forall</span> f. <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; (c -&gt; f c) -&gt; a -&gt; f a<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
+</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:-37-">(%)</a> :: a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:-94--37-">(^%)</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:query">query</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:queries">queries</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>
cannot be used to write back there are no lens laws that can be applied to
- it. In fact, it is isomorphic to an arbitrary function from <code>(a -&gt; c)</code>.
+ it. In fact, it is isomorphic to an arbitrary function from <code>(a -&gt; s)</code>.
</p><p>Moreover, a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> can be used directly as a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>,
since it just ignores the <code>Applicative</code>.
-</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Getting" class="def">Getting</a> r a b c d = (c -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r d) -&gt; a -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r b<a href="src/Control-Lens-Getter.html#Getting" class="link">Source</a></p><div class="doc"><p>Most <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> combinators are able to be used with both a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> or a
+</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Getting" class="def">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<a href="src/Control-Lens-Getter.html#Getting" class="link">Source</a></p><div class="doc"><p>Most <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> combinators are able to be used with both a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> or a
<code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> in limited situations, to do so, they need to be
monomorphic in what we are going to extract with <code>Const</code>. To be compatible
with <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> and
- <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> we also restricted choices of the irrelevant <code>b</code> and
- <code>d</code> parameters.
-</p><p>If a function accepts a <code><code><a href="Control-Lens-Getter.html#t:Getting">Getting</a></code> r a b c d</code>, then when <code>r</code> is a <code>Monoid</code>, then
+ <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> we also restricted choices of the irrelevant <code>t</code> and
+ <code>b</code> parameters.
+</p><p>If a function accepts a <code><code><a href="Control-Lens-Getter.html#t:Getting">Getting</a></code> r s t a b</code>, then when <code>r</code> is a <code>Monoid</code>, then
you can pass 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>), otherwise you can only pass this a
<code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> or <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>.
</p></div></div><h1 id="g:2">Building Getters
-</h1><div class="top"><p class="src"><a name="v:to" class="def">to</a> :: (a -&gt; c) -&gt; <a href="Control-Lens-Getter.html#t:Getter">Getter</a> a c<a href="src/Control-Lens-Getter.html#to" class="link">Source</a></p><div class="doc"><p>Build a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> from an arbitrary Haskell function.
+</h1><div class="top"><p class="src"><a name="v:to" class="def">to</a> :: (s -&gt; a) -&gt; <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a<a href="src/Control-Lens-Getter.html#to" class="link">Source</a></p><div class="doc"><p>Build a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> from an arbitrary Haskell function.
</p><pre><code><a href="Control-Lens-Getter.html#v:to">to</a></code> f . <code><a href="Control-Lens-Getter.html#v:to">to</a></code> g = <code><a href="Control-Lens-Getter.html#v:to">to</a></code> (g . f)</pre><pre>a <code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code> <code><a href="Control-Lens-Getter.html#v:to">to</a></code> f = f a</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,&quot;world&quot;)^.to snd
</code></strong>&quot;world&quot;
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>5^.to succ
@@ -45,24 +45,24 @@
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(0, -5)^._2.to abs
</code></strong>5
</pre></div></div><h1 id="g:3">Combinators for Getters and Folds
-</h1><div class="top"><p class="src"><a name="v:-94-." class="def">(^.)</a> :: a -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> c a b c d -&gt; c<a href="src/Control-Lens-Getter.html#%5E." 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> or <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> or the
+</h1><div class="top"><p class="src"><a name="v:-94-." class="def">(^.)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; a<a href="src/Control-Lens-Getter.html#%5E." 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> or <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> or the
result of folding over all the results 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> that points at a monoidal values.
</p><p>This is the same operation as <code><a href="Control-Lens-Getter.html#v:view">view</a></code> with the arguments flipped.
</p><p>The fixity and semantics are such that subsequent field accesses can be
- performed with (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:.">.</a></code>)
+ performed with (<code>.</code>)
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,&quot;world&quot;)^._2
</code></strong>&quot;world&quot;
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>import Data.Complex
</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>((0, 1 :+ 2), 3)^._1._2.to magnitude
</code></strong>2.23606797749979
</pre><pre>
- (<code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code>) :: a -&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> a c -&gt; c
- (<code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code>) :: <code>Monoid</code> m =&gt; a -&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a m -&gt; m
- (<code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code>) :: a -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a c -&gt; c
- (<code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code>) :: a -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a c -&gt; c
- (<code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code>) :: <code>Monoid</code> m =&gt; 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> a m -&gt; m
-</pre></div></div><div class="top"><p class="src"><a name="v:-94--36-" class="def">(^$)</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> c a b c d -&gt; a -&gt; c<a href="src/Control-Lens-Getter.html#%5E%24" 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-Getter.html#v:-94-.">^.</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-Getter.html#v:-94-.">^.</a></code>) :: <code>Monoid</code> m =&gt; s -&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s m -&gt; m
+ (<code><a href="Control-Lens-Getter.html#v:-94-.">^.</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-Getter.html#v:-94-.">^.</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-Getter.html#v:-94-.">^.</a></code>) :: <code>Monoid</code> m =&gt; 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 m -&gt; m
+</pre></div></div><div class="top"><p class="src"><a name="v:-94--36-" class="def">(^$)</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#%5E%24" 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
<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> that points
at a monoidal values.
@@ -70,15 +70,15 @@
</p><pre><code><a href="Control-Lens-Getter.html#v:to">to</a></code> f <code><a href="Control-Lens-Getter.html#v:-94--36-">^$</a></code> x = f x</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>_2 ^$ (1, &quot;hello&quot;)
</code></strong>&quot;hello&quot;
</pre><pre>
- (<code><a href="Control-Lens-Getter.html#v:-94--36-">^$</a></code>) :: <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> a c -&gt; a -&gt; c
- (<code><a href="Control-Lens-Getter.html#v:-94--36-">^$</a></code>) :: <code>Monoid</code> m =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a m -&gt; a -&gt; m
- (<code><a href="Control-Lens-Getter.html#v:-94--36-">^$</a></code>) :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a c -&gt; a -&gt; c
- (<code><a href="Control-Lens-Getter.html#v:-94--36-">^$</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> a c -&gt; a -&gt; c
- (<code><a href="Control-Lens-Getter.html#v:-94--36-">^$</a></code>) :: <code>Monoid</code> m =&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> a m -&gt; a -&gt; m
+ (<code><a href="Control-Lens-Getter.html#v:-94--36-">^$</a></code>) :: <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a -&gt; s -&gt; a
+ (<code><a href="Control-Lens-Getter.html#v:-94--36-">^$</a></code>) :: <code>Monoid</code> m =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s m -&gt; s -&gt; m
+ (<code><a href="Control-Lens-Getter.html#v:-94--36-">^$</a></code>) :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; s -&gt; a
+ (<code><a href="Control-Lens-Getter.html#v:-94--36-">^$</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> s a -&gt; s -&gt; a
+ (<code><a href="Control-Lens-Getter.html#v:-94--36-">^$</a></code>) :: <code>Monoid</code> m =&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 m -&gt; s -&gt; m
</pre></div></div><div class="top"><p class="src"><a name="v:-37-" class="def">(%)</a> :: a -&gt; (a -&gt; b) -&gt; b<a href="src/Control-Lens-Getter.html#%25" class="link">Source</a></p><div class="doc"><p>Passes the result of the left side to the function on the right side (forward pipe operator).
-</p><p>This is the flipped version of (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:-36-">$</a></code>), which is more common in languages like F# as (<code>|&gt;</code>) where it is needed
+</p><p>This is the flipped version of (<code>$</code>), which is more common in languages like F# as (<code>|&gt;</code>) where it is needed
for inference. Here it is supplied for notational convenience and given a precedence that allows it
- to be nested inside uses of (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:-36-">$</a></code>).
+ to be nested inside uses of (<code>$</code>).
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;hello&quot; % length % succ
</code></strong>6
</pre></div></div><div class="top"><p class="src"><a name="v:-94--37-" class="def">(^%)</a> :: a -&gt; (a -&gt; b) -&gt; b<a href="src/Control-Lens-Getter.html#%5E%25" class="link">Source</a></p><div class="doc"><p>A version of (<code><a href="Control-Lens-Combinators.html#t:-37-">%</a></code>) with much tighter precedence that can be interleaved with (<code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code>)
@@ -87,11 +87,11 @@
<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^%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> c a b c d -&gt; a -&gt; c<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
+</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
<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> that points
at a monoidal values.
-</p><pre><code><a href="Control-Lens-Getter.html#v:view">view</a></code> . <code><a href="Control-Lens-Getter.html#v:to">to</a></code> = <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:id">id</a></code></pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>view _2 (1,&quot;hello&quot;)
+</p><pre><code><a href="Control-Lens-Getter.html#v:view">view</a></code> . <code><a href="Control-Lens-Getter.html#v:to">to</a></code> = <code>id</code></pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>view _2 (1,&quot;hello&quot;)
</code></strong>&quot;hello&quot;
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>view (to succ) 5
</code></strong>6
@@ -100,74 +100,73 @@
</pre><p>It may be useful to think of <code><a href="Control-Lens-Getter.html#v:view">view</a></code> as having one of these more restrictive
signatures:
</p><pre>
- <code><a href="Control-Lens-Getter.html#v:view">view</a></code> :: <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> a c -&gt; a -&gt; c
- <code><a href="Control-Lens-Getter.html#v:view">view</a></code> :: <code>Monoid</code> m =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a m -&gt; a -&gt; m
- <code><a href="Control-Lens-Getter.html#v:view">view</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a c -&gt; a -&gt; c
- <code><a href="Control-Lens-Getter.html#v:view">view</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> a c -&gt; a -&gt; c
- <code><a href="Control-Lens-Getter.html#v:view">view</a></code> :: <code>Monoid</code> m =&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> a m -&gt; a -&gt; m
-</pre></div></div><div class="top"><p class="src"><a name="v:views" class="def">views</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> m a b c d -&gt; (c -&gt; m) -&gt; a -&gt; m<a href="src/Control-Lens-Getter.html#views" class="link">Source</a></p><div class="doc"><p>View the value of 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>,
+ <code><a href="Control-Lens-Getter.html#v:view">view</a></code> :: <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a -&gt; s -&gt; a
+ <code><a href="Control-Lens-Getter.html#v:view">view</a></code> :: <code>Monoid</code> m =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s m -&gt; s -&gt; m
+ <code><a href="Control-Lens-Getter.html#v:view">view</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; s -&gt; a
+ <code><a href="Control-Lens-Getter.html#v:view">view</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> s a -&gt; s -&gt; a
+ <code><a href="Control-Lens-Getter.html#v:view">view</a></code> :: <code>Monoid</code> m =&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 m -&gt; s -&gt; m
+</pre></div></div><div class="top"><p class="src"><a name="v:views" class="def">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<a href="src/Control-Lens-Getter.html#views" class="link">Source</a></p><div class="doc"><p>View the value of 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>,
<code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> or the result of folding over the result of mapping
the targets 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>.
</p><p>It may be useful to think of <code><a href="Control-Lens-Getter.html#v:views">views</a></code> as having these more restrictive
signatures:
-</p><pre><code><a href="Control-Lens-Getter.html#v:views">views</a></code> l f = <code><a href="Control-Lens-Getter.html#v:view">view</a></code> (l <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:.">.</a></code> <code><a href="Control-Lens-Getter.html#v:to">to</a></code> f)</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>views _2 length (1,&quot;hello&quot;)
+</p><pre><code><a href="Control-Lens-Getter.html#v:views">views</a></code> l f = <code><a href="Control-Lens-Getter.html#v:view">view</a></code> (l <code>.</code> <code><a href="Control-Lens-Getter.html#v:to">to</a></code> f)</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>views _2 length (1,&quot;hello&quot;)
</code></strong>5
</pre><pre>
- <code><a href="Control-Lens-Getter.html#v:views">views</a></code> :: <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> a c -&gt; (c -&gt; d) -&gt; a -&gt; d
- <code><a href="Control-Lens-Getter.html#v:views">views</a></code> :: <code>Monoid</code> m =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a c -&gt; (c -&gt; m) -&gt; a -&gt; m
- <code><a href="Control-Lens-Getter.html#v:views">views</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a c -&gt; (c -&gt; d) -&gt; a -&gt; d
- <code><a href="Control-Lens-Getter.html#v:views">views</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> a c -&gt; (c -&gt; d) -&gt; a -&gt; d
- <code><a href="Control-Lens-Getter.html#v:views">views</a></code> :: <code>Monoid</code> m =&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> a c -&gt; (c -&gt; m) -&gt; a -&gt; m
-</pre></div></div><div class="top"><p class="src"><a name="v:use" class="def">use</a> :: MonadState a m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> c a b c d -&gt; m c<a href="src/Control-Lens-Getter.html#use" class="link">Source</a></p><div class="doc"><p>Use the target of a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code>, or
+ <code><a href="Control-Lens-Getter.html#v:views">views</a></code> :: <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a -&gt; (a -&gt; r) -&gt; s -&gt; r
+ <code><a href="Control-Lens-Getter.html#v:views">views</a></code> :: <code>Monoid</code> m =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s a -&gt; (a -&gt; m) -&gt; s -&gt; m
+ <code><a href="Control-Lens-Getter.html#v:views">views</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; (a -&gt; r) -&gt; s -&gt; r
+ <code><a href="Control-Lens-Getter.html#v:views">views</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> s a -&gt; (a -&gt; r) -&gt; s -&gt; r
+ <code><a href="Control-Lens-Getter.html#v:views">views</a></code> :: <code>Monoid</code> m =&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; m) -&gt; s -&gt; m
+</pre></div></div><div class="top"><p class="src"><a name="v:use" class="def">use</a> :: MonadState s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; m a<a href="src/Control-Lens-Getter.html#use" class="link">Source</a></p><div class="doc"><p>Use the target of a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code>, or
<code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> in the current state, or use a summary 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> that points
to a monoidal value.
</p><pre>
- <code><a href="Control-Lens-Getter.html#v:use">use</a></code> :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> a c -&gt; m c
- <code><a href="Control-Lens-Getter.html#v:use">use</a></code> :: (<code>MonadState</code> a m, <code>Monoid</code> r) =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a r -&gt; m r
- <code><a href="Control-Lens-Getter.html#v:use">use</a></code> :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a c -&gt; m c
- <code><a href="Control-Lens-Getter.html#v:use">use</a></code> :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a c -&gt; m c
- <code><a href="Control-Lens-Getter.html#v:use">use</a></code> :: (<code>MonadState</code> a m, <code>Monoid</code> r) =&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> a r -&gt; m r
-</pre></div></div><div class="top"><p class="src"><a name="v:uses" class="def">uses</a> :: MonadState a m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> e a b c d -&gt; (c -&gt; e) -&gt; m e<a href="src/Control-Lens-Getter.html#uses" class="link">Source</a></p><div class="doc"><p>Use the target of a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> or
+ <code><a href="Control-Lens-Getter.html#v:use">use</a></code> :: <code>MonadState</code> s m =&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a -&gt; m a
+ <code><a href="Control-Lens-Getter.html#v:use">use</a></code> :: (<code>MonadState</code> s m, <code>Monoid</code> r) =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s r -&gt; m r
+ <code><a href="Control-Lens-Getter.html#v:use">use</a></code> :: <code>MonadState</code> s m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; m a
+ <code><a href="Control-Lens-Getter.html#v:use">use</a></code> :: <code>MonadState</code> s m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> s a -&gt; m a
+ <code><a href="Control-Lens-Getter.html#v:use">use</a></code> :: (<code>MonadState</code> s m, <code>Monoid</code> r) =&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 r -&gt; m r
+</pre></div></div><div class="top"><p class="src"><a name="v:uses" class="def">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<a href="src/Control-Lens-Getter.html#uses" class="link">Source</a></p><div class="doc"><p>Use the target of a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> or
<code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> in the current state, or use a summary 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> that
points to a monoidal value.
</p><pre>
- <code><a href="Control-Lens-Getter.html#v:uses">uses</a></code> :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> a c -&gt; (c -&gt; e) -&gt; m e
- <code><a href="Control-Lens-Getter.html#v:uses">uses</a></code> :: (<code>MonadState</code> a m, <code>Monoid</code> r) =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a c -&gt; (c -&gt; r) -&gt; m r
- <code><a href="Control-Lens-Getter.html#v:uses">uses</a></code> :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a c -&gt; (c -&gt; e) -&gt; m e
- <code><a href="Control-Lens-Getter.html#v:uses">uses</a></code> :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a c -&gt; (c -&gt; e) -&gt; m e
- <code><a href="Control-Lens-Getter.html#v:uses">uses</a></code> :: (<code>MonadState</code> a m, <code>Monoid</code> r) =&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> a c -&gt; (c -&gt; r) -&gt; m r
-</pre></div></div><div class="top"><p class="src"><a name="v:query" class="def">query</a> :: MonadReader a m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> c a b c d -&gt; m c<a href="src/Control-Lens-Getter.html#query" class="link">Source</a></p><div class="doc"><p>Query the target of a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> or
+ <code><a href="Control-Lens-Getter.html#v:uses">uses</a></code> :: <code>MonadState</code> s m =&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a -&gt; (a -&gt; r) -&gt; m r
+ <code><a href="Control-Lens-Getter.html#v:uses">uses</a></code> :: (<code>MonadState</code> s m, <code>Monoid</code> r) =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s a -&gt; (a -&gt; r) -&gt; m r
+ <code><a href="Control-Lens-Getter.html#v:uses">uses</a></code> :: <code>MonadState</code> s m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> s a -&gt; (a -&gt; r) -&gt; m r
+ <code><a href="Control-Lens-Getter.html#v:uses">uses</a></code> :: <code>MonadState</code> s m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; (a -&gt; r) -&gt; m r
+ <code><a href="Control-Lens-Getter.html#v:uses">uses</a></code> :: (<code>MonadState</code> s m, <code>Monoid</code> r) =&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><div class="top"><p class="src"><a name="v:query" class="def">query</a> :: MonadReader s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; m a<a href="src/Control-Lens-Getter.html#query" class="link">Source</a></p><div class="doc"><p>Query the target of a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> or
<code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> in the current state, or use a summary 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> that points
to a monoidal value.
</p><pre>
- <code><a href="Control-Lens-Getter.html#v:query">query</a></code> :: <code>MonadReader</code> a m =&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> a c -&gt; m c
- <code><a href="Control-Lens-Getter.html#v:query">query</a></code> :: (<code>MonadReader</code> a m, <code>Monoid</code> c) =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a c -&gt; m c
- <code><a href="Control-Lens-Getter.html#v:query">query</a></code> :: <code>MonadReader</code> a m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a c -&gt; m c
- <code><a href="Control-Lens-Getter.html#v:query">query</a></code> :: <code>MonadReader</code> a m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a c -&gt; m c
- <code><a href="Control-Lens-Getter.html#v:query">query</a></code> :: (<code>MonadReader</code> a m, <code>Monoid</code> c) =&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> a c -&gt; m c
-</pre></div></div><div class="top"><p class="src"><a name="v:queries" class="def">queries</a> :: MonadReader a m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> e a b c d -&gt; (c -&gt; e) -&gt; m e<a href="src/Control-Lens-Getter.html#queries" class="link">Source</a></p><div class="doc"><p>Use the target of a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> or
+ <code><a href="Control-Lens-Getter.html#v:query">query</a></code> :: <code>MonadReader</code> s m =&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a -&gt; m a
+ <code><a href="Control-Lens-Getter.html#v:query">query</a></code> :: (<code>MonadReader</code> s m, <code>Monoid</code> a) =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s a -&gt; m a
+ <code><a href="Control-Lens-Getter.html#v:query">query</a></code> :: <code>MonadReader</code> s m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; m a
+ <code><a href="Control-Lens-Getter.html#v:query">query</a></code> :: <code>MonadReader</code> s m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> s a -&gt; m a
+ <code><a href="Control-Lens-Getter.html#v:query">query</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; m a
+</pre></div></div><div class="top"><p class="src"><a name="v:queries" class="def">queries</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<a href="src/Control-Lens-Getter.html#queries" class="link">Source</a></p><div class="doc"><p>Use the target of a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> or
<code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> in the current state, or use a summary 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> that points
to a monoidal value.
</p><pre>
- <code><a href="Control-Lens-Getter.html#v:queries">queries</a></code> :: <code>MonadReader</code> a m =&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> a c -&gt; (c -&gt; e) -&gt; m e
- <code><a href="Control-Lens-Getter.html#v:queries">queries</a></code> :: (<code>MonadReader</code> a m, <code>Monoid</code> c) =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a c -&gt; (c -&gt; e) -&gt; m e
- <code><a href="Control-Lens-Getter.html#v:queries">queries</a></code> :: <code>MonadReader</code> a m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a c -&gt; (c -&gt; e) -&gt; m e
- <code><a href="Control-Lens-Getter.html#v:queries">queries</a></code> :: <code>MonadReader</code> a m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a c -&gt; (c -&gt; e) -&gt; m e
- <code><a href="Control-Lens-Getter.html#v:queries">queries</a></code> :: (<code>MonadReader</code> a m, <code>Monoid</code> c) =&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> a c -&gt; (c -&gt; e) -&gt; m e
+ <code><a href="Control-Lens-Getter.html#v:queries">queries</a></code> :: <code>MonadReader</code> s m =&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a -&gt; (a -&gt; r) -&gt; m r
+ <code><a href="Control-Lens-Getter.html#v:queries">queries</a></code> :: (<code>MonadReader</code> s m, <code>Monoid</code> a) =&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s a -&gt; (a -&gt; r) -&gt; m r
+ <code><a href="Control-Lens-Getter.html#v:queries">queries</a></code> :: <code>MonadReader</code> s m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; (a -&gt; r) -&gt; m r
+ <code><a href="Control-Lens-Getter.html#v:queries">queries</a></code> :: <code>MonadReader</code> s m =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> s a -&gt; (a -&gt; r) -&gt; m r
+ <code><a href="Control-Lens-Getter.html#v:queries">queries</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> a c <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> a c</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> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f =&gt; <a name="t:Gettable" class="def">Gettable</a> f <a href="src/Control-Lens-Internal.html#Gettable" class="link">Source</a></p><div class="doc"><p>Generalizing <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Const">Const</a></code> so we can apply simple <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code>
+</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedGetter" class="def">ReifiedGetter</a> s a <a href="src/Control-Lens-Getter.html#ReifiedGetter" class="link">Source</a></p><div class="doc"><p>Useful for storing getters in containers.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyGetter" class="def">ReifyGetter</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:reflectGetter" class="def">reflectGetter</a> :: <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">class</span> Functor f =&gt; <a name="t:Gettable" class="def">Gettable</a> f <a href="src/Control-Lens-Internal.html#Gettable" class="link">Source</a></p><div class="doc"><p>Generalizing <code>Const</code> so we can apply simple <code>Applicative</code>
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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a></code> ignores its argument, which it carries solely as a
+</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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Category.html#v:id">id</a></code> = <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#v:fmap">fmap</a></code> f = <code><a href="Control-Lens-Internal.html#v:coerce">coerce</a></code></pre></div><div class="subs instances"><p id="control.i:Gettable" class="caption collapser" onclick="toggleSection('i:Gettable')">Instances</p><div id="section.i:Gettable" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Const">Const</a> r) =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Const">Const</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (Backwards f), <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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r) =&gt; <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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f), <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"><p>This instance is a lie, but it is a useful lie.
-</p></td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f), <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">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (Compose f g), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> 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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r) =&gt; <a href="Control-Lens-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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m c) =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w s m c)</td><td class="doc empty">&nbsp;</td></tr></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><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Const">Const</a></code> to report
+</p><pre><code>id</code> = <code>fmap</code> f = <code><a href="Control-Lens-Internal.html#v:coerce">coerce</a></code></pre></div><div class="subs instances"><p id="control.i:Gettable" class="caption collapser" onclick="toggleSection('i:Gettable')">Instances</p><div id="section.i:Gettable" class="show"><table><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Const r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Backwards f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<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> (<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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> Identity, <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)) =&gt; <a href="Control-Lens-Internal.html#t:Effective">Effective</a> Identity r (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</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="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r), <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Monoid.html#t:Monoid">Monoid</a> r) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r) =&gt; <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">(MonadReader b ((-&gt;) b), MonadReader a ((-&gt;) a)) =&gt; <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.12.0</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-Internal.html#t:Effective">Effective</a> Identity r (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monoid r =&gt; Applicative (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> ((-&gt;) b) ((-&gt;) a) <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> b a</td><td class="doc"><pre><code><a href="Control-Lens-Zoom.html#v:magnify">magnify</a></code> = <code><a href="Control-Lens-Getter.html#v:views">views</a></code></pre></td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>
View
20 Control-Lens-Indexed.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.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.0.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Control.Lens.Indexed</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Functions
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Indexed.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.3: 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> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> k =&gt; ((c -&gt; <a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f d) -&gt; a -&gt; <a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f b) -&gt; k (c -&gt; f d) (a -&gt; f b)</li></ul></div><div id="interface"><h1 id="g:1">Indexed Functions
+</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.
</p><p>Provides overloading for <code><a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a></code> functions.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:index" class="def">index</a> :: ((i -&gt; a) -&gt; b) -&gt; k a b<a href="src/Control-Lens-Indexed.html#index" class="link">Source</a></p><div class="doc"><p>Build a function from an <code><a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a></code> function
@@ -16,18 +16,18 @@
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Index" class="def">Index</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:withIndex" class="def">withIndex</a> :: (i -&gt; a) -&gt; b</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:Index" class="caption collapser" onclick="toggleSection('i:Index')">Instances</p><div id="section.i:Index" class="show"><table><tr><td class="src">~ * i j =&gt; <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i (<a href="Control-Lens-Indexed.html#t:Index">Index</a> j)</td><td class="doc"><p>Using an equality witness to avoid potential overlapping instances
and aid dispatch.
</p></td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:-60-.-62-" class="def">(&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<a href="src/Control-Lens-Indexed.html#%3C.%3E" class="link">Source</a></p><div class="doc"><p>Composition of <code><a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a></code> functions
-</p><p>Mnemonically, the <code><a href="@">and @</a></code> points to the fact that we want to preserve the indices.
+</p><p>Mnemonically, the <code>&lt;</code> and <code>&gt;</code> points to the fact that we want to preserve the indices.
</p></div></div><div class="top"><p class="src"><a name="v:-60-." class="def">(&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<a href="src/Control-Lens-Indexed.html#%3C." class="link">Source</a></p><div class="doc"><p>Compose an <code><a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a></code> function with a non-indexed function.
</p><p>Mnemonically, the <code>&lt;</code> points to the index we want to preserve.
</p></div></div><div class="top"><p class="src"><a name="v:.-62-" class="def">(.&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<a href="src/Control-Lens-Indexed.html#.%3E" class="link">Source</a></p><div class="doc"><p>Compose a non-indexed function with an <code><a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a></code> function.
</p><p>Mnemonically, the <code>&gt;</code> points to the index we want to preserve.
</p></div></div><div class="top"><p class="src"><a name="v:icompose" class="def">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<a href="src/Control-Lens-Indexed.html#icompose" class="link">Source</a></p><div class="doc"><p>Composition of <code><a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a></code> functions with a user supplied function for combining indexs
</p></div></div><div class="top"><p class="src"><a name="v:reindex" class="def">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<a href="src/Control-Lens-Indexed.html#reindex" class="link">Source</a></p><div class="doc"><p>Remap the index.
-</p></div></div><div class="top"><p class="src"><a name="v:indexed" class="def">indexed</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> k =&gt; ((c -&gt; <a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f d) -&gt; a -&gt; <a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f b) -&gt; k (c -&gt; f d) (a -&gt; f b)<a href="src/Control-Lens-Indexed.html#indexed" class="link">Source</a></p><div class="doc"><p>Transform an Traversal into an IndexedTraversal, a Fold into an IndexedFold, etc.
+</p></div></div><div class="top"><p class="src"><a name="v:indexed" class="def">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)<a href="src/Control-Lens-Indexed.html#indexed" class="link">Source</a></p><div class="doc"><p>Transform an Traversal into an IndexedTraversal, a Fold into an IndexedFold, etc.
</p><pre>
- <code><a href="Control-Lens-Indexed.html#v:indexed">indexed</a></code> :: <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b c d -&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a></code> a b c d
- <code><a href="Control-Lens-Indexed.html#v:indexed">indexed</a></code> :: <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a b c d -&gt; <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a></code> a b c d
- <code><a href="Control-Lens-Indexed.html#v:indexed">indexed</a></code> :: <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a b -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a></code> a b
- <code><a href="Control-Lens-Indexed.html#v:indexed">indexed</a></code> :: <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a b c d -&gt; <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a></code> a b c d
- <code><a href="Control-Lens-Indexed.html#v:indexed">indexed</a></code> :: <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> a b -&gt; <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a></code> a b c d
-</pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.12.0</p></div></body></html>
+ <code><a href="Control-Lens-Indexed.html#v:indexed">indexed</a></code> :: <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s t a b -&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> <code>Int</code> s t a b
+ <code><a href="Control-Lens-Indexed.html#v:indexed">indexed</a></code> :: <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> s t a b -&gt; <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> <code>Int</code> s t a b
+ <code><a href="Control-Lens-Indexed.html#v:indexed">indexed</a></code> :: <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s t -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> <code>Int</code> s t
+ <code><a href="Control-Lens-Indexed.html#v:indexed">indexed</a></code> :: <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s t a b -&gt; <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> <code>Int</code> s t a b
+ <code><a href="Control-Lens-Indexed.html#v:indexed">indexed</a></code> :: <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s t -&gt; <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> <code>Int</code> s t a b
+</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
282 Control-Lens-IndexedFold.html
163 additions, 119 deletions not shown
View
12 Control-Lens-IndexedGetter.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.IndexedGetter</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-IndexedGetter.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedGetter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.0.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Control.Lens.IndexedGetter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Folds
-</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedGetter">IndexedGetter</a> i a c = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; k (c -&gt; f c) (a -&gt; f a)</li><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedGetting">IndexedGetting</a> i m a b c d = <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (c -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m d) (a -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m b)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedGetter">ReifiedIndexedGetter</a> i a c = <a href="#v:ReifyIndexedGetter">ReifyIndexedGetter</a> {<ul class="subs"><li><a href="#v:reflectIndexedGetter">reflectIndexedGetter</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a> i a c</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Indexed Folds
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedGetter" class="def">IndexedGetter</a> i a c = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; k (c -&gt; f c) (a -&gt; f a)<a href="src/Control-Lens-IndexedGetter.html#IndexedGetter" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> is a valid <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> and <code>Getter</code>.
-</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedGetting" class="def">IndexedGetting</a> i m a b c d = <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (c -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m d) (a -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m b)<a href="src/Control-Lens-IndexedGetter.html#IndexedGetting" class="link">Source</a></p><div class="doc"><p>Used to consume an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>.
-</p></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedIndexedGetter" class="def">ReifiedIndexedGetter</a> i a c <a href="src/Control-Lens-IndexedGetter.html#ReifiedIndexedGetter" class="link">Source</a></p><div class="doc"><p>Useful for storage.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyIndexedGetter" class="def">ReifyIndexedGetter</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:reflectIndexedGetter" class="def">reflectIndexedGetter</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a> i a c</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.12.0</p></div></body></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.3: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedGetter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Folds
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedGetter">IndexedGetter</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedGetting">IndexedGetting</a> i m s t a b = <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m b) (s -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m t)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedGetter">ReifiedIndexedGetter</a> i s a = <a href="#v:ReifyIndexedGetter">ReifyIndexedGetter</a> {<ul class="subs"><li><a href="#v:reflectIndexedGetter">reflectIndexedGetter</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a> i s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Indexed Folds
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedGetter" class="def">IndexedGetter</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedGetter.html#IndexedGetter" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> is a valid <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> and <code>Getter</code>.
+</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedGetting" class="def">IndexedGetting</a> i m s t a b = <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m b) (s -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m t)<a href="src/Control-Lens-IndexedGetter.html#IndexedGetting" class="link">Source</a></p><div class="doc"><p>Used to consume an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>.
+</p></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedIndexedGetter" class="def">ReifiedIndexedGetter</a> i s a <a href="src/Control-Lens-IndexedGetter.html#ReifiedIndexedGetter" class="link">Source</a></p><div class="doc"><p>Useful for storage.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyIndexedGetter" class="def">ReifyIndexedGetter</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:reflectIndexedGetter" class="def">reflectIndexedGetter</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a> i s a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>
View
54 Control-Lens-IndexedLens.html
@@ -1,55 +1,59 @@
<!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.0.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Control.Lens.IndexedLens</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Lenses
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedLens.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.3: 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
</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:IndexedLens">IndexedLens</a> i a b c d = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f) =&gt; k (c -&gt; f d) (a -&gt; f b)</li><li class="src short"><span class="keyword">class</span> <a href="#t:At">At</a> k m | m -&gt; k <span class="keyword">where</span><ul class="subs"><li><a href="#v:at">at</a> :: k -&gt; <a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a> k (m v) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> v)</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:Contains">Contains</a> k m | m -&gt; k <span class="keyword">where</span><ul class="subs"><li><a href="#v:contains">contains</a> :: k -&gt; <a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a> k m <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></li></ul></li><li class="src short"><a href="#v:-37--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) f a b c d -&gt; (i -&gt; c -&gt; f d) -&gt; a -&gt; f b</li><li class="src short"><a href="#v:-60--37--64--126-">(&lt;%@~)</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> d) a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; (d, b)</li><li class="src short"><a href="#v:-37--37--64--61-">(%%@=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> e) a a c d -&gt; (i -&gt; c -&gt; (e, d)) -&gt; m e</li><li class="src short"><a href="#v:-60--37--64--61-">(&lt;%@=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> d) a a c d -&gt; (i -&gt; c -&gt; d) -&gt; m d</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedLens">ReifiedIndexedLens</a> i a b c d = <a href="#v:ReifyIndexedLens">ReifyIndexedLens</a> {<ul class="subs"><li><a href="#v:reflectIndexedLens">reflectIndexedLens</a> :: <a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a> i a b c d</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIndexedLens">SimpleIndexedLens</a> i a b = <a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a> i a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIndexedLens">SimpleReifiedIndexedLens</a> i a b = <a href="Control-Lens-IndexedLens.html#t:ReifiedIndexedLens">ReifiedIndexedLens</a> i a a b b</li></ul></div><div id="interface"><h1 id="g:1">Indexed Lenses
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedLens" class="def">IndexedLens</a> i a b c d = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a> f) =&gt; k (c -&gt; f d) (a -&gt; f b)<a href="src/Control-Lens-IndexedLens.html#IndexedLens" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> is a valid <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> and a valid <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code>.
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedLens">IndexedLens</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, Functor f) =&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><span class="keyword">class</span> <a href="#t:At">At</a> k m | m -&gt; k <span class="keyword">where</span><ul class="subs"><li><a href="#v:at">at</a> :: k -&gt; <a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a> k (m v) (Maybe v)</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:Contains">Contains</a> k m | m -&gt; k <span class="keyword">where</span><ul class="subs"><li><a href="#v:contains">contains</a> :: k -&gt; <a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a> k m Bool</li></ul></li><li class="src short"><a href="#v:resultAt">resultAt</a> :: Eq e =&gt; e -&gt; <a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a> e (e -&gt; a) a</li><li class="src short"><a href="#v:-37--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) 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:-60--37--64--126-">(&lt;%@~)</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) ((,) b) s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; (b, t)</li><li class="src short"><a href="#v:-37--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) ((,) r) s s a b -&gt; (i -&gt; a -&gt; (r, b)) -&gt; m r</li><li class="src short"><a href="#v:-60--37--64--61-">(&lt;%@=)</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) ((,) b) s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m b</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedLens">ReifiedIndexedLens</a> i s t a b = <a href="#v:ReifyIndexedLens">ReifyIndexedLens</a> {<ul class="subs"><li><a href="#v:reflectIndexedLens">reflectIndexedLens</a> :: <a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a> i s t a b</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIndexedLens">SimpleIndexedLens</a> i s a = <a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a> i s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIndexedLens">SimpleReifiedIndexedLens</a> i s a = <a href="Control-Lens-IndexedLens.html#t:ReifiedIndexedLens">ReifiedIndexedLens</a> i s s a a</li></ul></div><div id="interface"><h1 id="g:1">Indexed Lenses
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedLens" class="def">IndexedLens</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, Functor f) =&gt; k (a -&gt; f b) (s -&gt; f t)<a href="src/Control-Lens-IndexedLens.html#IndexedLens" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> is a valid <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> and a valid <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code>.
</p></div></div><h1 id="g:2">Common Indexed Lenses
</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:At" class="def">At</a> k m | m -&gt; k <span class="keyword">where</span><a href="src/Control-Lens-IndexedLens.html#At" class="link">Source</a></p><div class="doc"><p>Provides an <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> that can be used to read, write or delete the value associated with a key in a map-like container.
-</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:at" class="def">at</a> :: k -&gt; <a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a> k (m v) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Maybe.html#t:Maybe">Maybe</a> v)<a href="src/Control-Lens-IndexedLens.html#at" class="link">Source</a></p><div class="doc"><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Map.fromList [(1,&quot;hello&quot;)] ^.at 1
+</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:at" class="def">at</a> :: k -&gt; <a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a> k (m v) (Maybe v)<a href="src/Control-Lens-IndexedLens.html#at" class="link">Source</a></p><div class="doc"><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Map.fromList [(1,&quot;hello&quot;)] ^.at 1
</code></strong>Just &quot;hello&quot;
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>at 1 ?~ &quot;hello&quot; $ Map.empty
</code></strong>fromList [(1,&quot;hello&quot;)]
-</pre></div></div><div class="subs instances"><p id="control.i:At" class="caption collapser" onclick="toggleSection('i:At')">Instances</p><div id="section.i:At" class="show"><table><tr><td class="src"><a href="Control-Lens-IndexedLens.html#t:At">At</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> <a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-IntMap-Strict.html#t:IntMap">IntMap</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Eq.html#t:Eq">Eq</a> k, Hashable k) =&gt; <a href="Control-Lens-IndexedLens.html#t:At">At</a> k (HashMap k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Ord.html#t:Ord">Ord</a> k =&gt; <a href="Control-Lens-IndexedLens.html#t:At">At</a> k (<a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Map-Lazy.html#t:Map">Map</a> k)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Contains" class="def">Contains</a> k m | m -&gt; k <span class="keyword">where</span><a href="src/Control-Lens-IndexedLens.html#Contains" class="link">Source</a></p><div class="doc"><p>Provides an <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> that can be used to read, write or delete a member of a set-like container
-</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:contains" class="def">contains</a> :: k -&gt; <a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a> k m <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Control-Lens-IndexedLens.html#contains" class="link">Source</a></p><div class="doc"><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>contains 3 .~ False $ IntSet.fromList [1,2,3,4]
+</pre></div></div><div class="subs instances"><p id="control.i:At" class="caption collapser" onclick="toggleSection('i:At')">Instances</p><div id="section.i:At" class="show"><table><tr><td class="src"><a href="Control-Lens-IndexedLens.html#t:At">At</a> Int IntMap</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Eq k, Hashable k) =&gt; <a href="Control-Lens-IndexedLens.html#t:At">At</a> k (HashMap k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Ord k =&gt; <a href="Control-Lens-IndexedLens.html#t:At">At</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> <a name="t:Contains" class="def">Contains</a> k m | m -&gt; k <span class="keyword">where</span><a href="src/Control-Lens-IndexedLens.html#Contains" class="link">Source</a></p><div class="doc"><p>Provides an <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> that can be used to read, write or delete a member of a set-like container
+</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:contains" class="def">contains</a> :: k -&gt; <a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a> k m Bool<a href="src/Control-Lens-IndexedLens.html#contains" class="link">Source</a></p><div class="doc"><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>contains 3 .~ False $ IntSet.fromList [1,2,3,4]
</code></strong>fromList [1,2,4]
-</pre></div></div><div class="subs instances"><p id="control.i:Contains" class="caption collapser" onclick="toggleSection('i:Contains')">Instances</p><div id="section.i:Contains" class="show"><table><tr><td class="src"><a href="Control-Lens-IndexedLens.html#t:Contains">Contains</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> <a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-IntSet.html#t:IntSet">IntSet</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Eq.html#t:Eq">Eq</a> k, Hashable k) =&gt; <a href="Control-Lens-IndexedLens.html#t:Contains">Contains</a> k (HashSet k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Ord.html#t:Ord">Ord</a> k =&gt; <a href="Control-Lens-IndexedLens.html#t:Contains">Contains</a> k (<a href="/usr/share/doc/ghc/html/libraries/containers-0.5.0.0/Data-Set.html#t:Set">Set</a> k)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:3">Indexed Lens Combinators
-</h1><div class="top"><p class="src"><a name="v:-37--37--64--126-" class="def">(%%@~)</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f a b c d -&gt; (i -&gt; c -&gt; f d) -&gt; a -&gt; f b<a href="src/Control-Lens-IndexedLens.html#%25%25%40~" class="link">Source</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> returning a supplementary result, or
+</pre></div></div><div class="subs instances"><p id="control.i:Contains" class="caption collapser" onclick="toggleSection('i:Contains')">Instances</p><div id="section.i:Contains" class="show"><table><tr><td class="src"><a href="Control-Lens-IndexedLens.html#t:Contains">Contains</a> Int IntSet</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Eq k, Hashable k) =&gt; <a href="Control-Lens-IndexedLens.html#t:Contains">Contains</a> k (HashSet k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Ord k =&gt; <a href="Control-Lens-IndexedLens.html#t:Contains">Contains</a> k (Set k)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:resultAt" class="def">resultAt</a> :: Eq e =&gt; e -&gt; <a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a> e (e -&gt; a) a<a href="src/Control-Lens-IndexedLens.html#resultAt" class="link">Source</a></p><div class="doc"><p>This lens can be used to change the result of a function but only where
+ the arguments match the key given.
+</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>let f = (+1) % resultAt 3 .~ 8 in (f 2, f 3)
+</code></strong>(3,8)
+</pre></div></div><h1 id="g:3">Indexed Lens Combinators
+</h1><div class="top"><p class="src"><a name="v:-37--37--64--126-" class="def">(%%@~)</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-IndexedLens.html#%25%25%40~" class="link">Source</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> returning a supplementary result, or
adjust all of the targets of an <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> and return a monoidal summary
of the supplementary results and the answer.
</p><pre>(<code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--126-">%%@~</a></code>) = <code><a href="Control-Lens-Indexed.html#v:withIndex">withIndex</a></code></pre><pre>
- (<code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--126-">%%@~</a></code>) :: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a></code> f =&gt; <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i a b c d -&gt; (i -&gt; c -&gt; f d) -&gt; a -&gt; f b
- (<code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--126-">%%@~</a></code>) :: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Functor">Functor</a></code> f =&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i a b c d -&gt; (i -&gt; c -&gt; f d) -&gt; a -&gt; f b
+ (<code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--126-">%%@~</a></code>) :: <code>Functor</code> f =&gt; <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i s t a b -&gt; (i -&gt; a -&gt; f b) -&gt; s -&gt; f t
+ (<code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--126-">%%@~</a></code>) :: <code>Functor</code> f =&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i s t a b -&gt; (i -&gt; a -&gt; f b) -&gt; s -&gt; f t
</pre><p>In particular, it is often useful to think of this function as having one of these even more
restrictive type signatures
</p><pre>
- (<code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--126-">%%@~</a></code>) :: <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i a b c d -&gt; (i -&gt; c -&gt; (e, d)) -&gt; a -&gt; (e, b)
- (<code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--126-">%%@~</a></code>) :: <code>Monoid</code> e =&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i a b c d -&gt; (i -&gt; c -&gt; (e, d)) -&gt; a -&gt; (e, b)
-</pre></div></div><div class="top"><p class="src"><a name="v:-60--37--64--126-" class="def">(&lt;%@~)</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> d) a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; (d, b)<a href="src/Control-Lens-IndexedLens.html#%3C%25%40~" class="link">Source</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> returning the intermediate result, or
+ (<code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--126-">%%@~</a></code>) :: <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i s t a b -&gt; (i -&gt; a -&gt; (r, b)) -&gt; s -&gt; (r, t)
+ (<code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--126-">%%@~</a></code>) :: <code>Monoid</code> r =&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i s t a b -&gt; (i -&gt; a -&gt; (r, b)) -&gt; s -&gt; (r, t)
+</pre></div></div><div class="top"><p class="src"><a name="v:-60--37--64--126-" class="def">(&lt;%@~)</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) ((,) b) s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; (b, t)<a href="src/Control-Lens-IndexedLens.html#%3C%25%40~" class="link">Source</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> returning the intermediate result, or
adjust all of the targets of an <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> and return a monoidal summary
along with the answer.
-</p><pre>l <code><a href="Control-Lens-Type.html#v:-60--37--126-">&lt;%~</a></code> f = l <code><a href="Control-Lens-IndexedLens.html#v:-60--37--64--126-">&lt;%@~</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:const">const</a></code> f</pre><p>When you do not need access to the index then (<code><a href="Control-Lens-Type.html#v:-60--37--126-">&lt;%~</a></code>) is more liberal in what it can accept.
+</p><pre>l <code><a href="Control-Lens-Type.html#v:-60--37--126-">&lt;%~</a></code> f = l <code><a href="Control-Lens-IndexedLens.html#v:-60--37--64--126-">&lt;%@~</a></code> <code>const</code> f</pre><p>When you do not need access to the index then (<code><a href="Control-Lens-Type.html#v:-60--37--126-">&lt;%~</a></code>) is more liberal in what it can accept.
</p><p>If you do not need the intermediate result, you can use (<code><a href="Control-Lens-Type.html#t:-37--64--126-">%@~</a></code>) or even (<code><a href="Control-Lens-Type.html#t:-37--126-">%~</a></code>).
</p><pre>
- (<code><a href="Control-Lens-IndexedLens.html#v:-60--37--64--126-">&lt;%@~</a></code>) :: <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; (d, b)
- (<code><a href="Control-Lens-IndexedLens.html#v:-60--37--64--126-">&lt;%@~</a></code>) :: <code>Monoid</code> d =&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; (d, b)
-</pre></div></div><div class="top"><p class="src"><a name="v:-37--37--64--61-" class="def">(%%@=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> e) a a c d -&gt; (i -&gt; c -&gt; (e, d)) -&gt; m e<a href="src/Control-Lens-IndexedLens.html#%25%25%40%3D" class="link">Source</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> returning a supplementary result, or
+ (<code><a href="Control-Lens-IndexedLens.html#v:-60--37--64--126-">&lt;%@~</a></code>) :: <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; (b, t)
+ (<code><a href="Control-Lens-IndexedLens.html#v:-60--37--64--126-">&lt;%@~</a></code>) :: <code>Monoid</code> b =&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; (b, t)
+</pre></div></div><div class="top"><p class="src"><a name="v:-37--37--64--61-" class="def">(%%@=)</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) ((,) r) s s a b -&gt; (i -&gt; a -&gt; (r, b)) -&gt; m r<a href="src/Control-Lens-IndexedLens.html#%25%25%40%3D" class="link">Source</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> returning a supplementary result, or
adjust all of the targets of an <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> within the current state, and
return a monoidal summary of the supplementary results.
</p><pre>l <code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--61-">%%@=</a></code> f = <code>state</code> (l <code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--126-">%%@~</a></code> f)</pre><pre>
- (<code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--61-">%%@=</a></code>) :: <code>MonadState</code> a m <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i a a c d -&gt; (i -&gt; c -&gt; (e, d)) -&gt; a -&gt; m e
- (<code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--61-">%%@=</a></code>) :: (<code>MonadState</code> a m, <code>Monoid</code> e) =&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i a a c d -&gt; (i -&gt; c -&gt; (e, d)) -&gt; a -&gt; m e
-</pre></div></div><div class="top"><p class="src"><a name="v:-60--37--64--61-" class="def">(&lt;%@=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> d) a a c d -&gt; (i -&gt; c -&gt; d) -&gt; m d<a href="src/Control-Lens-IndexedLens.html#%3C%25%40%3D" class="link">Source</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> returning the intermediate result, or
+ (<code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--61-">%%@=</a></code>) :: <code>MonadState</code> s m <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i s s a b -&gt; (i -&gt; a -&gt; (r, b)) -&gt; s -&gt; m r
+ (<code><a href="Control-Lens-IndexedLens.html#v:-37--37--64--61-">%%@=</a></code>) :: (<code>MonadState</code> s m, <code>Monoid</code> r) =&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i s s a b -&gt; (i -&gt; a -&gt; (r, b)) -&gt; s -&gt; m r
+</pre></div></div><div class="top"><p class="src"><a name="v:-60--37--64--61-" class="def">(&lt;%@=)</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) ((,) b) s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m b<a href="src/Control-Lens-IndexedLens.html#%3C%25%40%3D" class="link">Source</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> returning the intermediate result, or
adjust all of the targets of an <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> within the current state, and
return a monoidal summary of the intermediate results.
</p><pre>
- (<code><a href="Control-Lens-IndexedLens.html#v:-60--37--64--61-">&lt;%@=</a></code>) :: <code>MonadState</code> a m <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i a a c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; m d
- (<code><a href="Control-Lens-IndexedLens.html#v:-60--37--64--61-">&lt;%@=</a></code>) :: (<code>MonadState</code> a m, <code>Monoid</code> e) =&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i a a c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; m d
+ (<code><a href="Control-Lens-IndexedLens.html#v:-60--37--64--61-">&lt;%@=</a></code>) :: <code>MonadState</code> s m <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m b
+ (<code><a href="Control-Lens-IndexedLens.html#v:-60--37--64--61-">&lt;%@=</a></code>) :: (<code>MonadState</code> s m, <code>Monoid</code> b) =&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m b
</pre></div></div><h1 id="g:4">Storing Indexed Lenses
-</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedIndexedLens" class="def">ReifiedIndexedLens</a> i a b c d <a href="src/Control-Lens-IndexedLens.html#ReifiedIndexedLens" class="link">Source</a></p><div class="doc"><p>Useful for storage.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyIndexedLens" class="def">ReifyIndexedLens</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:reflectIndexedLens" class="def">reflectIndexedLens</a> :: <a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a> i a b c d</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><h1 id="g:5">Simple
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleIndexedLens" class="def">SimpleIndexedLens</a> i a b = <a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a> i a a b b<a href="src/Control-Lens-IndexedLens.html#SimpleIndexedLens" class="link">Source</a></p><div class="doc"><pre>type <code><a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a></code> i = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> (<code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i)</pre></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleReifiedIndexedLens" class="def">SimpleReifiedIndexedLens</a> i a b = <a href="Control-Lens-IndexedLens.html#t:ReifiedIndexedLens">ReifiedIndexedLens</a> i a a b b<a href="src/Control-Lens-IndexedLens.html#SimpleReifiedIndexedLens" class="link">Source</a></p><div class="doc"><pre>type <code><a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a></code> i = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> (<code><a href="Control-Lens-IndexedLens.html#t:ReifiedIndexedLens">ReifiedIndexedLens</a></code> i)</pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.12.0</p></div></body></html>
+</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedIndexedLens" class="def">ReifiedIndexedLens</a> i s t a b <a href="src/Control-Lens-IndexedLens.html#ReifiedIndexedLens" class="link">Source</a></p><div class="doc"><p>Useful for storage.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyIndexedLens" class="def">ReifyIndexedLens</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:reflectIndexedLens" class="def">reflectIndexedLens</a> :: <a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a> i s t a b</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><h1 id="g:5">Simple
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleIndexedLens" class="def">SimpleIndexedLens</a> i s a = <a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a> i s s a a<a href="src/Control-Lens-IndexedLens.html#SimpleIndexedLens" class="link">Source</a></p><div class="doc"><pre>type <code><a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a></code> i = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> (<code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i)</pre></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleReifiedIndexedLens" class="def">SimpleReifiedIndexedLens</a> i s a = <a href="Control-Lens-IndexedLens.html#t:ReifiedIndexedLens">ReifiedIndexedLens</a> i s s a a<a href="src/Control-Lens-IndexedLens.html#SimpleReifiedIndexedLens" class="link">Source</a></p><div class="doc"><pre>type <code><a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a></code> i = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> (<code><a href="Control-Lens-IndexedLens.html#t:ReifiedIndexedLens">ReifiedIndexedLens</a></code> i)</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
62 Control-Lens-IndexedSetter.html
@@ -1,50 +1,50 @@
<!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.0.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Control.Lens.IndexedSetter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Setter
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedSetter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.3: 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 a b c d = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Settable">Settable</a> f) =&gt; k (c -&gt; f d) (a -&gt; f b)</li><li class="src short"><a href="#v:imapOf">imapOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b</li><li class="src short"><a href="#v:iover">iover</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b</li><li class="src short"><a href="#v:isets">isets</a> :: ((i -&gt; c -&gt; d) -&gt; a -&gt; b) -&gt; <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i a b c d</li><li class="src short"><a href="#v:-37--64--126-">(%@~)</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b</li><li class="src short"><a href="#v:-37--64--61-">(%@=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> a a c d -&gt; (i -&gt; c -&gt; d) -&gt; m ()</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i a b c d = <a href="#v:ReifyIndexedSetter">ReifyIndexedSetter</a> {<ul class="subs"><li><a href="#v:reflectIndexedSetter">reflectIndexedSetter</a> :: <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i a b c d</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIndexedSetter">SimpleIndexedSetter</a> i a b = <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIndexedSetter">SimpleReifiedIndexedSetter</a> i a b = <a href="Control-Lens-IndexedSetter.html#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i a a b b</li></ul></div><div id="interface"><h1 id="g:1">Indexed Setter
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedSetter" class="def">IndexedSetter</a> i a b c d = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Settable">Settable</a> f) =&gt; k (c -&gt; f d) (a -&gt; f b)<a href="src/Control-Lens-IndexedSetter.html#IndexedSetter" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> is a valid <code>Setter</code>
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedSetter">IndexedSetter</a> i s t a b = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Settable">Settable</a> f) =&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:imapOf">imapOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:iover">iover</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:isets">isets</a> :: ((i -&gt; a -&gt; b) -&gt; s -&gt; t) -&gt; <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s t a b</li><li class="src short"><a href="#v:-37--64--126-">(%@~)</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:-37--64--61-">(%@=)</a> :: MonadState s m =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m ()</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i s t a b = <a href="#v:ReifyIndexedSetter">ReifyIndexedSetter</a> {<ul class="subs"><li><a href="#v:reflectIndexedSetter">reflectIndexedSetter</a> :: <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s t a b</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIndexedSetter">SimpleIndexedSetter</a> i s a = <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIndexedSetter">SimpleReifiedIndexedSetter</a> i s a = <a href="Control-Lens-IndexedSetter.html#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i s s a a</li></ul></div><div id="interface"><h1 id="g:1">Indexed Setter
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedSetter" class="def">IndexedSetter</a> i s t a b = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Settable">Settable</a> f) =&gt; k (a -&gt; f b) (s -&gt; f t)<a href="src/Control-Lens-IndexedSetter.html#IndexedSetter" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> is a valid <code>Setter</code>
</p><p>The <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> laws are still required to hold.
-</p></div></div><div class="top"><p class="src"><a name="v:imapOf" class="def">imapOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b<a href="src/Control-Lens-IndexedSetter.html#imapOf" class="link">Source</a></p><div class="doc"><p>Map with index.
+</p></div></div><div class="top"><p class="src"><a name="v:imapOf" class="def">imapOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t<a href="src/Control-Lens-IndexedSetter.html#imapOf" class="link">Source</a></p><div class="doc"><p>Map with index.
</p><p>When you do not need access to the index, then <code>mapOf</code> is more liberal in what it can accept.
-</p><pre><code><a href="Control-Lens-Setter.html#t:mapOf">mapOf</a></code> l &#8801; <code><a href="Control-Lens-IndexedSetter.html#v:imapOf">imapOf</a></code> l <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:.">.</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:const">const</a></code></pre><pre>
- <code><a href="Control-Lens-IndexedSetter.html#v:imapOf">imapOf</a></code> :: <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> i a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b
- <code><a href="Control-Lens-IndexedSetter.html#v:imapOf">imapOf</a></code> :: <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b
- <code><a href="Control-Lens-IndexedSetter.html#v:imapOf">imapOf</a></code> :: <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b
-</pre></div></div><div class="top"><p class="src"><a name="v:iover" class="def">iover</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b<a href="src/Control-Lens-IndexedSetter.html#iover" class="link">Source</a></p><div class="doc"><p>Map with index. This is an alias for <code><a href="Control-Lens-IndexedSetter.html#v:imapOf">imapOf</a></code>.
+</p><pre><code><a href="Control-Lens-Setter.html#t:mapOf">mapOf</a></code> l &#8801; <code><a href="Control-Lens-IndexedSetter.html#v:imapOf">imapOf</a></code> l <code>.</code> <code>const</code></pre><pre>
+ <code><a href="Control-Lens-IndexedSetter.html#v:imapOf">imapOf</a></code> :: <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t
+ <code><a href="Control-Lens-IndexedSetter.html#v:imapOf">imapOf</a></code> :: <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t
+ <code><a href="Control-Lens-IndexedSetter.html#v:imapOf">imapOf</a></code> :: <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t
+</pre></div></div><div class="top"><p class="src"><a name="v:iover" class="def">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<a href="src/Control-Lens-IndexedSetter.html#iover" class="link">Source</a></p><div class="doc"><p>Map with index. This is an alias for <code><a href="Control-Lens-IndexedSetter.html#v:imapOf">imapOf</a></code>.
</p><p>When you do not need access to the index, then <code>over</code> is more liberal in what it can accept.
-</p><pre><code><a href="Control-Lens-Setter.html#t:over">over</a></code> l &#8801; <code><a href="Control-Lens-IndexedSetter.html#v:iover">iover</a></code> l <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:.">.</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:const">const</a></code></pre><pre>
- <code><a href="Control-Lens-IndexedSetter.html#v:iover">iover</a></code> :: <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> i a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b
- <code><a href="Control-Lens-IndexedSetter.html#v:iover">iover</a></code> :: <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b
- <code><a href="Control-Lens-IndexedSetter.html#v:iover">iover</a></code> :: <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b
-</pre></div></div><div class="top"><p class="src"><a name="v:isets" class="def">isets</a> :: ((i -&gt; c -&gt; d) -&gt; a -&gt; b) -&gt; <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i a b c d<a href="src/Control-Lens-IndexedSetter.html#isets" class="link">Source</a></p><div class="doc"><p>Build an <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> from an <code>imap</code>-like function.
+</p><pre><code><a href="Control-Lens-Setter.html#t:over">over</a></code> l &#8801; <code><a href="Control-Lens-IndexedSetter.html#v:iover">iover</a></code> l <code>.</code> <code>const</code></pre><pre>
+ <code><a href="Control-Lens-IndexedSetter.html#v:iover">iover</a></code> :: <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t
+ <code><a href="Control-Lens-IndexedSetter.html#v:iover">iover</a></code> :: <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t
+ <code><a href="Control-Lens-IndexedSetter.html#v:iover">iover</a></code> :: <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t
+</pre></div></div><div class="top"><p class="src"><a name="v:isets" class="def">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<a href="src/Control-Lens-IndexedSetter.html#isets" class="link">Source</a></p><div class="doc"><p>Build an <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> from an <code>imap</code>-like function.
</p><p>Your supplied function <code>f</code> is required to satisfy:
</p><pre>
- f <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:id">id</a></code> &#8801; <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:id">id</a></code>
- f g <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:.">.</a></code> f h &#8801; f (g <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:.">.</a></code> h)
+ f <code>id</code> &#8801; <code>id</code>
+ f g <code>.</code> f h &#8801; f (g <code>.</code> h)
</pre><p>Equational reasoning:
</p><pre>
- <code><a href="Control-Lens-IndexedSetter.html#v:isets">isets</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:.">.</a></code> <code><a href="Control-Lens-IndexedSetter.html#v:iover">iover</a></code> &#8801; <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:id">id</a></code>
- <code><a href="Control-Lens-IndexedSetter.html#v:iover">iover</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:.">.</a></code> <code><a href="Control-Lens-IndexedSetter.html#v:isets">isets</a></code> &#8801; <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:id">id</a></code>
+ <code><a href="Control-Lens-IndexedSetter.html#v:isets">isets</a></code> <code>.</code> <code><a href="Control-Lens-IndexedSetter.html#v:iover">iover</a></code> &#8801; <code>id</code>
+ <code><a href="Control-Lens-IndexedSetter.html#v:iover">iover</a></code> <code>.</code> <code><a href="Control-Lens-IndexedSetter.html#v:isets">isets</a></code> &#8801; <code>id</code>
</pre><p>Another way to view <code>sets</code> is that it takes a &quot;semantic editor combinator&quot;
and transforms it into a <code>Setter</code>.
-</p></div></div><div class="top"><p class="src"><a name="v:-37--64--126-" class="def">(%@~)</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b<a href="src/Control-Lens-IndexedSetter.html#%25%40~" class="link">Source</a></p><div class="doc"><p>Adjust every target of an <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code>
+</p></div></div><div class="top"><p class="src"><a name="v:-37--64--126-" class="def">(%@~)</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t<a href="src/Control-Lens-IndexedSetter.html#%25%40~" class="link">Source</a></p><div class="doc"><p>Adjust every target of an <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code>
with access to the index.
</p><pre>(<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--126-">%@~</a></code>) &#8801; <code><a href="Control-Lens-IndexedSetter.html#v:imapOf">imapOf</a></code></pre><p>When you do not need access to the index then (<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--126-">%@~</a></code>) is more liberal in what it can accept.
-</p><pre>l <code><a href="Control-Lens-Setter.html#t:-37--126-">%~</a></code> f &#8801; l <code><a href="Control-Lens-IndexedSetter.html#v:-37--64--126-">%@~</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:const">const</a></code> f</pre><pre>
- (<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--126-">%@~</a></code>) :: <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> i a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b
- (<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--126-">%@~</a></code>) :: <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b
- (<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--126-">%@~</a></code>) :: <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i a b c d -&gt; (i -&gt; c -&gt; d) -&gt; a -&gt; b
-</pre></div></div><div class="top"><p class="src"><a name="v:-37--64--61-" class="def">(%@=)</a> :: MonadState a m =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> a a c d -&gt; (i -&gt; c -&gt; d) -&gt; m ()<a href="src/Control-Lens-IndexedSetter.html#%25%40%3D" class="link">Source</a></p><div class="doc"><p>Adjust every target in the current state of an <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code>
+</p><pre>l <code><a href="Control-Lens-Setter.html#t:-37--126-">%~</a></code> f &#8801; l <code><a href="Control-Lens-IndexedSetter.html#v:-37--64--126-">%@~</a></code> <code>const</code> f</pre><pre>
+ (<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--126-">%@~</a></code>) :: <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t
+ (<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--126-">%@~</a></code>) :: <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t
+ (<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--126-">%@~</a></code>) :: <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t
+</pre></div></div><div class="top"><p class="src"><a name="v:-37--64--61-" class="def">(%@=)</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 ()<a href="src/Control-Lens-IndexedSetter.html#%25%40%3D" class="link">Source</a></p><div class="doc"><p>Adjust every target in the current state of an <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code>
with access to the index.
</p><p>When you do not need access to the index then (<code><a href="Control-Lens-Setter.html#t:-37--61-">%=</a></code>) is more liberal in what it can accept.
-</p><pre>l <code><a href="Control-Lens-Setter.html#t:-37--61-">%=</a></code> f &#8801; l <code><a href="Control-Lens-IndexedSetter.html#v:-37--64--61-">%@=</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Prelude.html#v:const">const</a></code> f</pre><pre>
- (<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--61-">%@=</a></code>) :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> i a a c d -&gt; (i -&gt; c -&gt; d) -&gt; m ()
- (<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--61-">%@=</a></code>) :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i a a c d -&gt; (i -&gt; c -&gt; d) -&gt; m ()
- (<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--61-">%@=</a></code>) :: <code>MonadState</code> a m =&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i a b c d -&gt; (i -&gt; c -&gt; d) -&gt; m ()
+</p><pre>l <code><a href="Control-Lens-Setter.html#t:-37--61-">%=</a></code> f &#8801; l <code><a href="Control-Lens-IndexedSetter.html#v:-37--64--61-">%@=</a></code> <code>const</code> f</pre><pre>
+ (<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--61-">%@=</a></code>) :: <code>MonadState</code> s m =&gt; <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> i s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m ()
+ (<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--61-">%@=</a></code>) :: <code>MonadState</code> s m =&gt; <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code> i s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m ()
+ (<code><a href="Control-Lens-IndexedSetter.html#v:-37--64--61-">%@=</a></code>) :: <code>MonadState</code> s m =&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; m ()
</pre></div></div><h1 id="g:2">Storing Indexed Setters
-</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedIndexedSetter" class="def">ReifiedIndexedSetter</a> i a b c d <a href="src/Control-Lens-IndexedSetter.html#ReifiedIndexedSetter" class="link">Source</a></p><div class="doc"><p>Useful for storage.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyIndexedSetter" class="def">ReifyIndexedSetter</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:reflectIndexedSetter" class="def">reflectIndexedSetter</a> :: <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i a b c d</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><h1 id="g:3">Simple
-</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleIndexedSetter" class="def">SimpleIndexedSetter</a> i a b = <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i a a b b<a href="src/Control-Lens-IndexedSetter.html#SimpleIndexedSetter" class="link">Source</a></p><div class="doc"><pre>type <code><a href="Control-Lens-IndexedSetter.html#t:SimpleIndexedSetter">SimpleIndexedSetter</a></code> i = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> (<code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> i)</pre></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleReifiedIndexedSetter" class="def">SimpleReifiedIndexedSetter</a> i a b = <a href="Control-Lens-IndexedSetter.html#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i a a b b<a href="src/Control-Lens-IndexedSetter.html#SimpleReifiedIndexedSetter" class="link">Source</a></p><div class="doc"><pre>type <code><a href="Control-Lens-IndexedSetter.html#t:SimpleIndexedSetter">SimpleIndexedSetter</a></code> i = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> (<code><a href="Control-Lens-IndexedSetter.html#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a></code> i)</pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.12.0</p></div></body></html>
+</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedIndexedSetter" class="def">ReifiedIndexedSetter</a> i s t a b <a href="src/Control-Lens-IndexedSetter.html#ReifiedIndexedSetter" class="link">Source</a></p><div class="doc"><p>Useful for storage.
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyIndexedSetter" class="def">ReifyIndexedSetter</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:reflectIndexedSetter" class="def">reflectIndexedSetter</a> :: <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s t a b</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><h1 id="g:3">Simple
+</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleIndexedSetter" class="def">SimpleIndexedSetter</a> i s a = <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s s a a<a href="src/Control-Lens-IndexedSetter.html#SimpleIndexedSetter" class="link">Source</a></p><div class="doc"><pre>type <code><a href="Control-Lens-IndexedSetter.html#t:SimpleIndexedSetter">SimpleIndexedSetter</a></code> i = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> (<code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code> i)</pre></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleReifiedIndexedSetter" class="def">SimpleReifiedIndexedSetter</a> i s a = <a href="Control-Lens-IndexedSetter.html#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i s s a a<a href="src/Control-Lens-IndexedSetter.html#SimpleReifiedIndexedSetter" class="link">Source</a></p><div class="doc"><pre>type <code><a href="Control-Lens-IndexedSetter.html#t:SimpleIndexedSetter">SimpleIndexedSetter</a></code> i = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> (<code><a href="Control-Lens-IndexedSetter.html#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a></code> i)</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
84 Control-Lens-IndexedTraversal.html
@@ -1,76 +1,76 @@
<!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.0.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Control.Lens.IndexedTraversal</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Traversals
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedTraversal.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.3: 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 a b c d = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f) =&gt; k (c -&gt; f d) (a -&gt; f b)</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, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f) =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f a b c c -&gt; (i -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f a b c c</li><li class="src short"><a href="#v:value">value</a> :: (k -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (k, v) v</li><li class="src short"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Ord.html#t:Ord">Ord</a> 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> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Ord.html#t:Ord">Ord</a> 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: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 a b c d -&gt; (i -&gt; c -&gt; f d) -&gt; a -&gt; f b</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 a b c d -&gt; a -&gt; (i -&gt; c -&gt; f d) -&gt; f b</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) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c d -&gt; (i -&gt; c -&gt; m d) -&gt; a -&gt; m b</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) (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c d -&gt; a -&gt; (i -&gt; c -&gt; m d) -&gt; m b</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) a b c d -&gt; (i -&gt; s -&gt; c -&gt; (s, d)) -&gt; s -&gt; a -&gt; (s, b)</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)) a b c d -&gt; (i -&gt; s -&gt; c -&gt; (s, d)) -&gt; s -&gt; a -&gt; (s, b)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedTraversal">ReifiedIndexedTraversal</a> i a b c d = <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 a b c d</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> i a b = <a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a> i a a b b</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIndexedTraversal">SimpleReifiedIndexedTraversal</a> i a b = <a href="Control-Lens-IndexedTraversal.html#t:ReifiedIndexedTraversal">ReifiedIndexedTraversal</a> i a a b b</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 a b c d = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f) =&gt; k (c -&gt; f d) (a -&gt; f b)<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>.
+</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> s a b k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> Void 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: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, <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f) =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f a b c c -&gt; (i -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f a b c c<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><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;]
</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 a b -&gt; (i -&gt; <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></code>) -&gt; <code>IndexedFold</code> i a b
- <code><a href="Control-Lens-IndexedTraversal.html#v:iwhereOf">iwhereOf</a></code> :: <code>IndexedGetter</code> i a b -&gt; (i -&gt; <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></code>) -&gt; <code>IndexedFold</code> i a b
- <code><a href="Control-Lens-IndexedTraversal.html#v:iwhereOf">iwhereOf</a></code> :: <code><a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a></code> i a b -&gt; (i -&gt; <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></code>) -&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a></code> i a b
- <code><a