Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

evil

  • Loading branch information...
commit 51c05abe8a34a0b0691fa7db80aa095934e6e82e 1 parent edf37c0
@ekmett authored
Showing with 438 additions and 449 deletions.
  1. +1 −1  Control-Exception-Lens.html
  2. +1 −1  Control-Lens-Action.html
  3. +1 −1  Control-Lens-Combinators.html
  4. +29 −14 Control-Lens-Fold.html
  5. +20 −20 Control-Lens-Getter.html
  6. +2 −2 Control-Lens-Indexed.html
  7. +5 −45 Control-Lens-IndexedFold.html
  8. +1 −1  Control-Lens-IndexedGetter.html
  9. +2 −2 Control-Lens-IndexedLens.html
  10. +1 −1  Control-Lens-IndexedSetter.html
  11. +6 −4 Control-Lens-IndexedTraversal.html
  12. +58 −46 Control-Lens-Internal.html
  13. +49 −15 Control-Lens-Iso.html
  14. +1 −1  Control-Lens-Isomorphic.html
  15. +1 −1  Control-Lens-Loupe.html
  16. +13 −79 Control-Lens-Plated.html
  17. +1 −1  Control-Lens-Projection.html
  18. +1 −1  Control-Lens-Representable.html
  19. +1 −1  Control-Lens-Setter.html
  20. +1 −1  Control-Lens-Simple.html
  21. +1 −1  Control-Lens-TH.html
  22. +73 −12 Control-Lens-Traversal.html
  23. +1 −1  Control-Lens-Tuple.html
  24. +1 −1  Control-Lens-Type.html
  25. +1 −1  Control-Lens-WithIndex.html
  26. +17 −17 Control-Lens-Zipper.html
  27. +1 −1  Control-Lens-Zoom.html
  28. +2 −2 Control-Lens.html
  29. +1 −1  Control-Parallel-Strategies-Lens.html
  30. +2 −2 Control-Seq-Lens.html
  31. +1 −1  Data-Array-Lens.html
  32. +1 −1  Data-Bits-Lens.html
  33. +1 −1  Data-ByteString-Lazy-Lens.html
  34. +1 −1  Data-ByteString-Lens.html
  35. +1 −1  Data-ByteString-Strict-Lens.html
  36. +1 −1  Data-Complex-Lens.html
  37. +1 −1  Data-Data-Lens.html
  38. +1 −1  Data-Dynamic-Lens.html
  39. +1 −1  Data-HashSet-Lens.html
  40. +1 −1  Data-IntSet-Lens.html
  41. +10 −32 Data-List-Lens.html
  42. +13 −13 Data-List-Split-Lens.html
  43. +8 −15 Data-Monoid-Lens.html
  44. +5 −5 Data-Sequence-Lens.html
  45. +1 −1  Data-Set-Lens.html
  46. +1 −1  Data-Text-Lazy-Lens.html
  47. +1 −1  Data-Text-Lens.html
  48. +1 −1  Data-Text-Strict-Lens.html
  49. +1 −1  Data-Tree-Lens.html
  50. +1 −1  Data-Typeable-Lens.html
  51. +3 −3 Data-Vector-Generic-Lens.html
  52. +3 −3 Data-Vector-Lens.html
  53. +1 −1  GHC-Generics-Lens.html
  54. +1 −1  Language-Haskell-TH-Lens.html
  55. +1 −1  System-FilePath-Lens.html
  56. +2 −2 doc-index-124.html
  57. +2 −2 doc-index-35.html
  58. +2 −2 doc-index-37.html
  59. +2 −2 doc-index-38.html
  60. +2 −2 doc-index-42.html
  61. +2 −2 doc-index-43.html
  62. +2 −2 doc-index-45.html
  63. +2 −2 doc-index-46.html
  64. +2 −2 doc-index-47.html
  65. +2 −2 doc-index-58.html
  66. +2 −2 doc-index-60.html
  67. +2 −2 doc-index-63.html
  68. +2 −2 doc-index-94.html
  69. +2 −2 doc-index-95.html
  70. +2 −2 doc-index-A.html
  71. +2 −2 doc-index-All.html
  72. +2 −2 doc-index-B.html
  73. +2 −2 doc-index-C.html
  74. +2 −2 doc-index-D.html
  75. +2 −2 doc-index-E.html
  76. +2 −2 doc-index-F.html
  77. +2 −2 doc-index-G.html
  78. +2 −2 doc-index-H.html
  79. +2 −2 doc-index-I.html
  80. +2 −2 doc-index-K.html
  81. +2 −2 doc-index-L.html
  82. +2 −2 doc-index-M.html
  83. +2 −2 doc-index-N.html
  84. +2 −2 doc-index-O.html
  85. +2 −2 doc-index-P.html
  86. +2 −2 doc-index-Q.html
  87. +2 −2 doc-index-R.html
  88. +2 −2 doc-index-S.html
  89. +2 −2 doc-index-T.html
  90. +2 −2 doc-index-U.html
  91. +2 −2 doc-index-V.html
  92. +2 −2 doc-index-W.html
  93. +2 −2 doc-index-Z.html
  94. +2 −2 doc-index.html
  95. +1 −1  index-frames.html
  96. +2 −2 index.html
  97. BIN  lens.haddock
  98. +1 −1  mini_Control-Lens-Fold.html
Sorry, we could not display the entire diff because it was too big.
View
2  Control-Exception-Lens.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Exception.Lens</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Exception-Lens.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Exception-Lens.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.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
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Exception-Lens.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Control.Exception</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Exception.Lens</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:exception">exception</a> :: (Exception a, Exception b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> SomeException SomeException a b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:exception" class="def">exception</a> :: (Exception a, Exception b) =&gt; <a href="Control-Lens-Projection.html#t:Projection">Projection</a> SomeException SomeException a b<a href="src/Control-Exception-Lens.html#exception" class="link">Source</a></p><div class="doc"><p>Traverse the strongly typed <code>Exception</code> contained in <code>SomeException</code> where the type of your function matches
the desired <code>Exception</code>.
</p><pre>
exception :: (<code>Applicative</code> f, <code>Exception</code> a, <code>Exception</code> b)
View
2  Control-Lens-Action.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Action</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Action.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Action.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-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
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Action.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>MTPCs, FDs, Rank2</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Action</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Composable Actions
</a></li><li><a href="#g:2">Folds with Effecs
</a></li><li><a href="#g:3">Implementation Details
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Action">Action</a> m s a = <span class="keyword">forall</span> f r. <a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><a href="#v:act">act</a> :: Monad m =&gt; (s -&gt; m a) -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> m s a</li><li class="src short"><a href="#v:acts">acts</a> :: <a href="Control-Lens-Action.html#t:Action">Action</a> m (m a) a</li><li class="src short"><a href="#v:perform">perform</a> :: Monad m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; s -&gt; m a</li><li class="src short"><a href="#v:performs">performs</a> :: Monad m =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m e s t a b -&gt; (a -&gt; e) -&gt; s -&gt; m e</li><li class="src short"><a href="#v:liftAct">liftAct</a> :: (MonadTrans trans, Monad m) =&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; <a href="Control-Lens-Action.html#t:Action">Action</a> (trans m) s a</li><li class="src short"><a href="#v:-94--33-">(^!)</a> :: Monad m =&gt; s -&gt; <a href="Control-Lens-Action.html#t:Acting">Acting</a> m a s t a b -&gt; m a</li><li class="src short"><span class="keyword">type</span> <a href="#t:MonadicFold">MonadicFold</a> m s a = <span class="keyword">forall</span> f r. (<a href="Control-Lens-Internal.html#t:Effective">Effective</a> m r f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><span class="keyword">type</span> <a href="#t:Acting">Acting</a> m r s t a b = (a -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r b) -&gt; s -&gt; <a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r t</li></ul></div><div id="interface"><h1 id="g:1">Composable Actions
View
2  Control-Lens-Combinators.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Combinators</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Combinators.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Combinators.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.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.
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Combinators.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Combinators</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:-60--36--33--62-">(&lt;$!&gt;)</a> :: Monad m =&gt; (a -&gt; b) -&gt; m a -&gt; m b</li><li class="src short"><a href="#v:-60--36--33-">(&lt;$!)</a> :: Monad m =&gt; b -&gt; m a -&gt; m b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:-60--36--33--62-" class="def">(&lt;$!&gt;)</a> :: Monad m =&gt; (a -&gt; b) -&gt; m a -&gt; m b<a href="src/Control-Lens-Combinators.html#%3C%24%21%3E" class="link">Source</a></p><div class="doc"><p>A strict version of (<code><a href="Data-Functor.html#t:-60--36--62-">&lt;$&gt;</a></code>) for monads.
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(+1) &lt;$!&gt; [1,2,3,4]
</code></strong>[2,3,4,5]
</pre></div></div><div class="top"><p class="src"><a name="v:-60--36--33-" class="def">(&lt;$!)</a> :: Monad m =&gt; b -&gt; m a -&gt; m b<a href="src/Control-Lens-Combinators.html#%3C%24%21" class="link">Source</a></p><div class="doc"><p>A strict version of (<code><a href="Data-Functor.html#t:-60--36-">&lt;$</a></code>) for monads.
View
43 Control-Lens-Fold.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Fold</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Fold.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Fold.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.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>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Fold</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Folds
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Fold.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Fold</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Folds
</a><ul><li><a href="#g:2">Building Folds
</a></li><li><a href="#g:3">Folding
</a></li></ul></li><li><a href="#g:4">Storing Folds
@@ -19,7 +19,7 @@
<code>Applicative</code> transformers.
</p><p>Everything you can do with a <code>Foldable</code> container, you can with with a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> and there are
combinators that generalize the usual <code>Foldable</code> operations here.
-</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Fold">Fold</a> s a = <span class="keyword">forall</span> f. (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><a href="#v:-94--63-">(^?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; Maybe a</li><li class="src short"><a href="#v:-94-..">(^..)</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:folding">folding</a> :: (Foldable f, Applicative g, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> g) =&gt; (s -&gt; f a) -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g s t a b</li><li class="src short"><a href="#v:folded">folded</a> :: Foldable f =&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> (f a) a</li><li class="src short"><a href="#v:unfolded">unfolded</a> :: (b -&gt; Maybe (a, b)) -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> b a</li><li class="src short"><a href="#v:iterated">iterated</a> :: (a -&gt; a) -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:filtered">filtered</a> :: Applicative f =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> f a a</li><li class="src short"><a href="#v:backwards">backwards</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (Backwards f) s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b</li><li class="src short"><a href="#v:repeated">repeated</a> :: <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:replicated">replicated</a> :: Int -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:cycled">cycled</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b</li><li class="src short"><a href="#v:takingWhile">takingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a</li><li class="src short"><a href="#v:droppingWhile">droppingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s, f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a</li><li class="src short"><a href="#v:foldMapOf">foldMapOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldOf">foldOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldrOf">foldrOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo r) s t a b -&gt; (a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldlOf">foldlOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo r)) s t a b -&gt; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:toListOf">toListOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] s t a b -&gt; s -&gt; [a]</li><li class="src short"><a href="#v:anyOf">anyOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:allOf">allOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:andOf">andOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t Bool b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:orOf">orOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t Bool b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:productOf">productOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Product a) s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:sumOf">sumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Sum a) s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:traverseOf_">traverseOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; (a -&gt; f r) -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:forOf_">forOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; s -&gt; (a -&gt; f r) -&gt; f ()</li><li class="src short"><a href="#v:sequenceAOf_">sequenceAOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t (f ()) b -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:mapMOf_">mapMOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; (a -&gt; m r) -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:forMOf_">forMOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; s -&gt; (a -&gt; m r) -&gt; m ()</li><li class="src short"><a href="#v:sequenceOf_">sequenceOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t (m a) b -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:asumOf">asumOf</a> :: Alternative f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f a)) s t (f a) b -&gt; s -&gt; f a</li><li class="src short"><a href="#v:msumOf">msumOf</a> :: MonadPlus m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (m a)) s t (m a) b -&gt; s -&gt; m a</li><li class="src short"><a href="#v:concatMapOf">concatMapOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [r] s t a b -&gt; (a -&gt; [r]) -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:concatOf">concatOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [r] s t [r] b -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:elemOf">elemOf</a> :: Eq a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t a b -&gt; a -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:notElemOf">notElemOf</a> :: Eq a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; a -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:lengthOf">lengthOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Sum Int) s t a b -&gt; s -&gt; Int</li><li class="src short"><a href="#v:nullOf">nullOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:headOf">headOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:lastOf">lastOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Last a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:maximumOf">maximumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Max">Max</a> a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:minimumOf">minimumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Min">Min</a> a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:maximumByOf">maximumByOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; Ordering) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:minimumByOf">minimumByOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; Ordering) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:findOf">findOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:foldrOf-39-">foldrOf'</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (r -&gt; r))) s t a b -&gt; (a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldlOf-39-">foldlOf'</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (r -&gt; r)) s t a b -&gt; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldr1Of">foldr1Of</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; a) -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldl1Of">foldl1Of</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (Maybe a))) s t a b -&gt; (a -&gt; a -&gt; a) -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldrMOf">foldrMOf</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (r -&gt; m r))) s t a b -&gt; (a -&gt; r -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:foldlMOf">foldlMOf</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (r -&gt; m r)) s t a b -&gt; (r -&gt; a -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedFold">ReifiedFold</a> s a = <a href="#v:ReifyFold">ReifyFold</a> {<ul class="subs"><li><a href="#v:reflectFold">reflectFold</a> :: <a href="Control-Lens-Fold.html#t:Fold">Fold</a> s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Folds
+</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Fold">Fold</a> s a = <span class="keyword">forall</span> f. (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><a href="#v:-94-..">(^..)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] s t a b -&gt; [a]</li><li class="src short"><a href="#v:-94--63-">(^?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; Maybe a</li><li class="src short"><a href="#v:-94--63--33-">(^?!)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; a</li><li class="src short"><a href="#v:-94--33--63-">(^!?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; a</li><li class="src short"><a href="#v:folding">folding</a> :: (Foldable f, Applicative g, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> g) =&gt; (s -&gt; f a) -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g s t a b</li><li class="src short"><a href="#v:folded">folded</a> :: Foldable f =&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> (f a) a</li><li class="src short"><a href="#v:unfolded">unfolded</a> :: (b -&gt; Maybe (a, b)) -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> b a</li><li class="src short"><a href="#v:iterated">iterated</a> :: (a -&gt; a) -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:filtered">filtered</a> :: Applicative f =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> f a a</li><li class="src short"><a href="#v:backwards">backwards</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (Backwards f) s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b</li><li class="src short"><a href="#v:repeated">repeated</a> :: <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:replicated">replicated</a> :: Int -&gt; <a href="Control-Lens-Fold.html#t:Fold">Fold</a> a a</li><li class="src short"><a href="#v:cycled">cycled</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b</li><li class="src short"><a href="#v:takingWhile">takingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a</li><li class="src short"><a href="#v:droppingWhile">droppingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; Bool) -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f s, f s)) s s a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s s a a</li><li class="src short"><a href="#v:foldMapOf">foldMapOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldOf">foldOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldrOf">foldrOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo r) s t a b -&gt; (a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldlOf">foldlOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo r)) s t a b -&gt; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:toListOf">toListOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo [a]) s t a b -&gt; s -&gt; [a]</li><li class="src short"><a href="#v:anyOf">anyOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:allOf">allOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:andOf">andOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t Bool b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:orOf">orOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t Bool b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:productOf">productOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Product a) s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:sumOf">sumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Sum a) s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:traverseOf_">traverseOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; (a -&gt; f r) -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:forOf_">forOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; s -&gt; (a -&gt; f r) -&gt; f ()</li><li class="src short"><a href="#v:sequenceAOf_">sequenceAOf_</a> :: Functor f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t (f ()) b -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:mapMOf_">mapMOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; (a -&gt; m r) -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:forMOf_">forMOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; s -&gt; (a -&gt; m r) -&gt; m ()</li><li class="src short"><a href="#v:sequenceOf_">sequenceOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t (m a) b -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:asumOf">asumOf</a> :: Alternative f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (f a)) s t (f a) b -&gt; s -&gt; f a</li><li class="src short"><a href="#v:msumOf">msumOf</a> :: MonadPlus m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (m a)) s t (m a) b -&gt; s -&gt; m a</li><li class="src short"><a href="#v:concatMapOf">concatMapOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [r] s t a b -&gt; (a -&gt; [r]) -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:concatOf">concatOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [r] s t [r] b -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:elemOf">elemOf</a> :: Eq a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> Any s t a b -&gt; a -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:notElemOf">notElemOf</a> :: Eq a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; a -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:lengthOf">lengthOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Sum Int) s t a b -&gt; s -&gt; Int</li><li class="src short"><a href="#v:nullOf">nullOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> All s t a b -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:headOf">headOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:lastOf">lastOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Last a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:maximumOf">maximumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Max">Max</a> a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:minimumOf">minimumOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Min">Min</a> a) s t a b -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:maximumByOf">maximumByOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; Ordering) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:minimumByOf">minimumByOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; Ordering) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:findOf">findOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; (a -&gt; Bool) -&gt; s -&gt; Maybe a</li><li class="src short"><a href="#v:foldrOf-39-">foldrOf'</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (r -&gt; r))) s t a b -&gt; (a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldlOf-39-">foldlOf'</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (r -&gt; r)) s t a b -&gt; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:foldr1Of">foldr1Of</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (Maybe a)) s t a b -&gt; (a -&gt; a -&gt; a) -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldl1Of">foldl1Of</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (Maybe a))) s t a b -&gt; (a -&gt; a -&gt; a) -&gt; s -&gt; a</li><li class="src short"><a href="#v:foldrMOf">foldrMOf</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Dual (Endo (r -&gt; m r))) s t a b -&gt; (a -&gt; r -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:foldlMOf">foldlMOf</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo (r -&gt; m r)) s t a b -&gt; (r -&gt; a -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedFold">ReifiedFold</a> s a = <a href="#v:ReifyFold">ReifyFold</a> {<ul class="subs"><li><a href="#v:reflectFold">reflectFold</a> :: <a href="Control-Lens-Fold.html#t:Fold">Fold</a> s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Folds
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Fold" class="def">Fold</a> s a = <span class="keyword">forall</span> f. (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Fold.html#Fold" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> describes how to retrieve multiple values in a way that can be composed
with other lens-like constructions.
</p><p>A <code><code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s a</code> provides a structure with operations very similar to those of the <code>Foldable</code>
@@ -29,17 +29,7 @@
</p><p>A <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> is a legal <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> that just ignores the supplied <code>Monoid</code>
</p><p>Unlike a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> is read-only. Since a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> cannot be used to write back
there are no lens laws that apply.
-</p></div></div><div class="top"><p class="src"><a name="v:-94--63-" class="def">(^?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; Maybe a<a href="src/Control-Lens-Fold.html#%5E%3F" class="link">Source</a></p><div class="doc"><p>Perform a safe <code>head</code> of a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> or <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> or retrieve <code>Just</code> the result
- from 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><p>When using a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> as a partial <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, or a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> as a partial <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> this can be a convenient
- way to extract the optional value.
-</p><pre>(<code><a href="Control-Lens-Fold.html#v:-94--63-">^?</a></code>) &#8801; <code>flip</code> <code><a href="Control-Lens-Fold.html#v:headOf">headOf</a></code></pre><pre>
- (<code><a href="Control-Lens-Fold.html#v:-94--63-">^?</a></code>) :: s -&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a -&gt; <code>Maybe</code> a
- (<code><a href="Control-Lens-Fold.html#v:-94--63-">^?</a></code>) :: s -&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s a -&gt; <code>Maybe</code> a
- (<code><a href="Control-Lens-Fold.html#v:-94--63-">^?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> s a -&gt; <code>Maybe</code> a
- (<code><a href="Control-Lens-Fold.html#v:-94--63-">^?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; <code>Maybe</code> a
- (<code><a href="Control-Lens-Fold.html#v:-94--63-">^?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s a -&gt; <code>Maybe</code> a
-</pre></div></div><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-Fold.html#%5E.." class="link">Source</a></p><div class="doc"><p>A convenient infix (flipped) version of <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code>.
+</p></div></div><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-Fold.html#%5E.." class="link">Source</a></p><div class="doc"><p>A convenient infix (flipped) version of <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code>.
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[[1,2],[3]]^..traverse.traverse
</code></strong>[1,2,3]
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(1,2)^..both
@@ -53,6 +43,31 @@
(<code><a href="Control-Lens-Fold.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-Fold.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-Fold.html#v:-94-..">^..</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s a -&gt; [a]
+</pre></div></div><div class="top"><p class="src"><a name="v:-94--63-" class="def">(^?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; Maybe a<a href="src/Control-Lens-Fold.html#%5E%3F" class="link">Source</a></p><div class="doc"><p>Perform a safe <code>head</code> of a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> or <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> or retrieve <code>Just</code> the result
+ from 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><p>When using a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> as a partial <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, or a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> as a partial <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> this can be a convenient
+ way to extract the optional value.
+</p><pre>(<code><a href="Control-Lens-Fold.html#v:-94--63-">^?</a></code>) &#8801; <code>flip</code> <code><a href="Control-Lens-Fold.html#v:headOf">headOf</a></code></pre><pre>
+ (<code><a href="Control-Lens-Fold.html#v:-94--63-">^?</a></code>) :: s -&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a -&gt; <code>Maybe</code> a
+ (<code><a href="Control-Lens-Fold.html#v:-94--63-">^?</a></code>) :: s -&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s a -&gt; <code>Maybe</code> a
+ (<code><a href="Control-Lens-Fold.html#v:-94--63-">^?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> s a -&gt; <code>Maybe</code> a
+ (<code><a href="Control-Lens-Fold.html#v:-94--63-">^?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; <code>Maybe</code> a
+ (<code><a href="Control-Lens-Fold.html#v:-94--63-">^?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s a -&gt; <code>Maybe</code> a
+</pre></div></div><div class="top"><p class="src"><a name="v:-94--63--33-" class="def">(^?!)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; a<a href="src/Control-Lens-Fold.html#%5E%3F%21" class="link">Source</a></p><div class="doc"><p>Perform an *UNSAFE* <code>head</code> of a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> or <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> assuming that it is there.
+</p><pre>
+ (<code><a href="Control-Lens-Fold.html#v:-94--63--33-">^?!</a></code>) :: s -&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a -&gt; a
+ (<code><a href="Control-Lens-Fold.html#v:-94--63--33-">^?!</a></code>) :: s -&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s a -&gt; a
+ (<code><a href="Control-Lens-Fold.html#v:-94--63--33-">^?!</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> s a -&gt; a
+ (<code><a href="Control-Lens-Fold.html#v:-94--63--33-">^?!</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; a
+ (<code><a href="Control-Lens-Fold.html#v:-94--63--33-">^?!</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s a -&gt; a
+</pre></div></div><div class="top"><p class="src"><a name="v:-94--33--63-" class="def">(^!?)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (First a) s t a b -&gt; a<a href="src/Control-Lens-Fold.html#%5E%21%3F" class="link">Source</a></p><div class="doc"><p>Perform an *UNSAFE* <code>head</code> of a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> or <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> assuming that it is there.
+</p><p>This is an alias for (<code><a href="Control-Lens-Fold.html#v:-94--63--33-">^?!</a></code>).
+</p><pre>
+ (<code><a href="Control-Lens-Fold.html#v:-94--33--63-">^!?</a></code>) :: s -&gt; <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> s a -&gt; a
+ (<code><a href="Control-Lens-Fold.html#v:-94--33--63-">^!?</a></code>) :: s -&gt; <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s a -&gt; a
+ (<code><a href="Control-Lens-Fold.html#v:-94--33--63-">^!?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> s a -&gt; a
+ (<code><a href="Control-Lens-Fold.html#v:-94--33--63-">^!?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s a -&gt; a
+ (<code><a href="Control-Lens-Fold.html#v:-94--33--63-">^!?</a></code>) :: s -&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s a -&gt; a
</pre></div></div><h2 id="g:2">Building Folds
</h2><div class="top"><p class="src"><a name="v:folding" class="def">folding</a> :: (Foldable f, Applicative g, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> g) =&gt; (s -&gt; f a) -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g s t a b<a href="src/Control-Lens-Fold.html#folding" class="link">Source</a></p><div class="doc"><p>Obtain a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> by lifting an operation that returns a foldable result.
</p><p>This can be useful to lift operations from <code>Data.List</code> and elsewhere into a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>.
@@ -108,7 +123,7 @@
<code><a href="Control-Lens-Fold.html#v:foldlOf">foldlOf</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; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r
<code><a href="Control-Lens-Fold.html#v:foldlOf">foldlOf</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; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r
<code><a href="Control-Lens-Fold.html#v:foldlOf">foldlOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s a -&gt; (r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r
-</pre></div></div><div class="top"><p class="src"><a name="v:toListOf" class="def">toListOf</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-Fold.html#toListOf" class="link">Source</a></p><div class="doc"><p>Extract a list of the targets of a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>. See also (<code><a href="Control-Lens-Fold.html#v:-94-..">^..</a></code>).
+</pre></div></div><div class="top"><p class="src"><a name="v:toListOf" class="def">toListOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo [a]) s t a b -&gt; s -&gt; [a]<a href="src/Control-Lens-Fold.html#toListOf" class="link">Source</a></p><div class="doc"><p>Extract a list of the targets of a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>. See also (<code><a href="Control-Lens-Fold.html#v:-94-..">^..</a></code>).
</p><pre>
<code><a href="Data-Foldable.html#t:toList">toList</a></code> &#8801; <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code> <code><a href="Control-Lens-Fold.html#v:folded">folded</a></code>
(<code><a href="Control-Lens-Fold.html#v:-94-..">^..</a></code>) &#8801; <code>flip</code> <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code>
View
40 Control-Lens-Getter.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Getter</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Getter.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Getter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.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
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Getter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.Getter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Getters
</a></li><li><a href="#g:2">Building Getters
</a></li><li><a href="#g:3">Combinators for Getters and Folds
</a></li><li><a href="#g:4">Storing Getters
@@ -18,7 +18,7 @@
in the opposite order.
</p><p>Since it is only a function, every <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> obviously only retrieves a
single value for a given input.
-</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Getter">Getter</a> s a = <span class="keyword">forall</span> f. <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><span class="keyword">type</span> <a href="#t:Getting">Getting</a> r s t a b = (a -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r b) -&gt; s -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r t</li><li class="src short"><a href="#v:to">to</a> :: (s -&gt; a) -&gt; <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</li><li class="src short"><a href="#v:-94-.">(^.)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; a</li><li class="src short"><a href="#v:-94--36-">(^$)</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:-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
+</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Getter">Getter</a> s a = <span class="keyword">forall</span> f. <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; (a -&gt; f a) -&gt; s -&gt; f s</li><li class="src short"><span class="keyword">type</span> <a href="#t:Getting">Getting</a> r s t a b = (a -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r b) -&gt; s -&gt; <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r t</li><li class="src short"><a href="#v:to">to</a> :: (s -&gt; a) -&gt; <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</li><li class="src short"><a href="#v:-94-.">(^.)</a> :: s -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; a</li><li class="src short"><a href="#v:-94--36-">(^$)</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:-38-">(&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:-94--38-">(^&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:view">view</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a</li><li class="src short"><a href="#v:views">views</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; s -&gt; r</li><li class="src short"><a href="#v:use">use</a> :: MonadState s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; m a</li><li class="src short"><a href="#v:uses">uses</a> :: MonadState s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; m r</li><li class="src short"><a href="#v:peruse">peruse</a> :: MonadReader s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; m a</li><li class="src short"><a href="#v:peruses">peruses</a> :: MonadReader s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; m r</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedGetter">ReifiedGetter</a> s a = <a href="#v:ReifyGetter">ReifyGetter</a> {<ul class="subs"><li><a href="#v:reflectGetter">reflectGetter</a> :: <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</li></ul>}</li><li class="src short"><span class="keyword">class</span> Functor f =&gt; <a href="#t:Gettable">Gettable</a> f </li><li class="src short"><span class="keyword">data</span> <a href="#t:Accessor">Accessor</a> r a</li></ul></div><div id="interface"><h1 id="g:1">Getters
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Getter" class="def">Getter</a> s a = <span class="keyword">forall</span> f. <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; (a -&gt; f a) -&gt; s -&gt; f s<a href="src/Control-Lens-Getter.html#Getter" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> describes how to retrieve a single value in a way that can be
composed with other lens-like constructions.
</p><p>Unlike a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code> is read-only. Since a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code>
@@ -75,17 +75,17 @@
(<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).
+</pre></div></div><div class="top"><p class="src"><a name="v:-38-" class="def">(&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b<a href="src/Control-Lens-Getter.html#%26" 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>$</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>$</code>).
-</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;hello&quot; % length % succ
+</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;hello&quot; &amp; length &amp; 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>)
-</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;hello&quot;^%length
+</pre></div></div><div class="top"><p class="src"><a name="v:-94--38-" class="def">(^&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b<a href="src/Control-Lens-Getter.html#%5E%26" class="link">Source</a></p><div class="doc"><p>A version of (<code><a href="Control-Lens-Getter.html#v:-38-">&amp;</a></code>) with much tighter precedence that can be interleaved with (<code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code>)
+</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;hello&quot; ^&amp; length
</code></strong>5
<code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>import Data.List.Lens
-</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,&quot;world&quot;)^._1^%reverse^._head
+</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,&quot;world&quot;)^._1^&amp;reverse^!?_head
</code></strong>'o'
</pre></div></div><div class="top"><p class="src"><a name="v:view" class="def">view</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> a s t a b -&gt; s -&gt; a<a href="src/Control-Lens-Getter.html#view" class="link">Source</a></p><div class="doc"><p>View the value pointed to by a <code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> or
<code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> or the result of folding over all the results of a
@@ -139,26 +139,26 @@
<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
+</pre></div></div><div class="top"><p class="src"><a name="v:peruse" class="def">peruse</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#peruse" 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> 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#v:peruse">peruse</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:peruse">peruse</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:peruse">peruse</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:peruse">peruse</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:peruse">peruse</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:peruses" class="def">peruses</a> :: MonadReader s m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> r s t a b -&gt; (a -&gt; r) -&gt; m r<a href="src/Control-Lens-Getter.html#peruses" 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> 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
+ <code><a href="Control-Lens-Getter.html#v:peruses">peruses</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:peruses">peruses</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:peruses">peruses</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:peruses">peruses</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:peruses">peruses</a></code> :: (<code>MonadReader</code> s m, <code>Monoid</code> a) =&gt; <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s a -&gt; (a -&gt; r) -&gt; m r
</pre></div></div><h1 id="g:4">Storing Getters
</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedGetter" class="def">ReifiedGetter</a> s a <a href="src/Control-Lens-Getter.html#ReifiedGetter" class="link">Source</a></p><div class="doc"><p>Useful for storing getters in containers.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyGetter" class="def">ReifyGetter</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:reflectGetter" class="def">reflectGetter</a> :: <a href="Control-Lens-Getter.html#t:Getter">Getter</a> s a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">class</span> Functor f =&gt; <a name="t:Gettable" class="def">Gettable</a> f <a href="src/Control-Lens-Internal.html#Gettable" class="link">Source</a></p><div class="doc"><p>Generalizing <code>Const</code> so we can apply simple <code>Applicative</code>
@@ -166,7 +166,7 @@
</p><p>A <code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code> <code>Functor</code> ignores its argument, which it carries solely as a
phantom type parameter.
</p><p>To ensure this, an instance of <code><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a></code> is required to satisfy:
-</p><pre><code>id</code> = <code>fmap</code> f = <code><a href="Control-Lens-Internal.html#v:coerce">coerce</a></code></pre></div><div class="subs instances"><p id="control.i:Gettable" class="caption collapser" onclick="toggleSection('i:Gettable')">Instances</p><div id="section.i:Gettable" class="show"><table><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Const r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Backwards f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<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><code>id</code> = <code>fmap</code> f = <code><a href="Control-Lens-Internal.html#v:coerce">coerce</a></code></pre></div><div class="subs instances"><p id="control.i:Gettable" class="caption collapser" onclick="toggleSection('i:Gettable')">Instances</p><div id="section.i:Gettable" class="show"><table><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Const r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Backwards f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:ElementOf">ElementOf</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(Functor f, <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> g) =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (Compose f g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:Effect">Effect</a> m r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> g =&gt; <a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EvilBazaar">EvilBazaar</a> g a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Internal.html#t:EffectRWS">EffectRWS</a> w st m s)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Accessor" class="def">Accessor</a> r a <a href="src/Control-Lens-Internal.html#Accessor" class="link">Source</a></p><div class="doc"><p>Used instead of <code>Const</code> to report
</p><pre>No instance of (<code><a href="Control-Lens-Setter.html#t:Settable">Settable</a></code> <code><a href="Control-Lens-Getter.html#t:Accessor">Accessor</a></code>)</pre><p>when the user attempts to misuse a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> as a
<code><a href="Control-Lens-Getter.html#t:Getter">Getter</a></code>, rather than a monolithic unification error.
</p></div><div class="subs instances"><p id="control.i:Accessor" class="caption collapser" onclick="toggleSection('i:Accessor')">Instances</p><div id="section.i:Accessor" class="show"><table><tr><td class="src"><a href="Control-Lens-Internal.html#t:Effective">Effective</a> Identity r (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Functor (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Monoid r =&gt; Applicative (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Getter.html#t:Gettable">Gettable</a> (<a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Zoom.html#t:Magnify">Magnify</a> ((-&gt;) b) ((-&gt;) a) <a href="Control-Lens-Getter.html#t:Accessor">Accessor</a> b a</td><td class="doc"><pre><code><a href="Control-Lens-Zoom.html#v:magnify">magnify</a></code> = <code><a href="Control-Lens-Getter.html#v:views">views</a></code></pre></td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>
View
4 Control-Lens-Indexed.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Indexed</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Indexed.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Indexed.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.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
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Indexed.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Indexed</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Functions
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Combinators for working with <code><a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a></code> functions.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> <a href="#t:Indexed">Indexed</a> i k <span class="keyword">where</span><ul class="subs"><li><a href="#v:index">index</a> :: ((i -&gt; a) -&gt; b) -&gt; k a b</li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:Indexable">Indexable</a> i a b = <span class="keyword">forall</span> k. <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; k a b</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Index">Index</a> i a b = <a href="#v:Index">Index</a> {<ul class="subs"><li><a href="#v:withIndex">withIndex</a> :: (i -&gt; a) -&gt; b</li></ul>}</li><li class="src short"><a href="#v:-60-.-62-">(&lt;.&gt;)</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> (i, j) k =&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i b c -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> j a b -&gt; k a c</li><li class="src short"><a href="#v:-60-.">(&lt;.)</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i b c -&gt; (a -&gt; b) -&gt; k a c</li><li class="src short"><a href="#v:.-62-">(.&gt;)</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; (b -&gt; c) -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i a b -&gt; k a c</li><li class="src short"><a href="#v:icompose">icompose</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> k r =&gt; (i -&gt; j -&gt; k) -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i b c -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> j a b -&gt; r a c</li><li class="src short"><a href="#v:reindex">reindex</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> j k =&gt; (i -&gt; j) -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i a b -&gt; k a b</li><li class="src short"><a href="#v:indexed">indexed</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> Int k =&gt; ((a -&gt; <a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f b) -&gt; s -&gt; <a href="Control-Lens-Internal.html#t:Indexing">Indexing</a> f t) -&gt; k (a -&gt; f b) (s -&gt; f t)</li></ul></div><div id="interface"><h1 id="g:1">Indexed Functions
</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Indexed" class="def">Indexed</a> i k <span class="keyword">where</span><a href="src/Control-Lens-Indexed.html#Indexed" class="link">Source</a></p><div class="doc"><p>Permit overloading of function application for things that also admit a notion of a key or index.
@@ -23,7 +23,7 @@
</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> 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></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 <code>Traversal</code> into an <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code>, a <code>Fold</code> into an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, 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> 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
View
50 Control-Lens-IndexedFold.html
@@ -1,12 +1,12 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.IndexedFold</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-IndexedFold.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedFold.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.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.IndexedFold</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Folds
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedFold.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedFold</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Folds
</a></li><li><a href="#g:2">Consuming Indexed Folds
</a></li><li><a href="#g:3">Converting to Folds
</a></li><li><a href="#g:4">Building Indexed Folds
</a></li><li><a href="#g:5">Storing Indexed Folds
-</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedFold">IndexedFold</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><a href="#v:ifoldMapOf">ifoldMapOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i m s t a b -&gt; (i -&gt; a -&gt; m) -&gt; s -&gt; m</li><li class="src short"><a href="#v:ifoldrOf">ifoldrOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo r) s t a b -&gt; (i -&gt; a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ifoldlOf">ifoldlOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Dual (Endo r)) s t a b -&gt; (i -&gt; r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ianyOf">ianyOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i Any s t a b -&gt; (i -&gt; a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:iallOf">iallOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i All s t a b -&gt; (i -&gt; a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:itraverseOf_">itraverseOf_</a> :: Functor f =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; (i -&gt; a -&gt; f r) -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:iforOf_">iforOf_</a> :: Functor f =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; s -&gt; (i -&gt; a -&gt; f r) -&gt; f ()</li><li class="src short"><a href="#v:imapMOf_">imapMOf_</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; (i -&gt; a -&gt; m r) -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:iforMOf_">iforMOf_</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; s -&gt; (i -&gt; a -&gt; m r) -&gt; m ()</li><li class="src short"><a href="#v:iconcatMapOf">iconcatMapOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [r] s t a b -&gt; (i -&gt; a -&gt; [r]) -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:ifindOf">ifindOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (First (i, a)) s t a b -&gt; (i -&gt; a -&gt; Bool) -&gt; s -&gt; Maybe (i, a)</li><li class="src short"><a href="#v:ifoldrOf-39-">ifoldrOf'</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Dual (Endo (r -&gt; r))) s t a b -&gt; (i -&gt; a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ifoldlOf-39-">ifoldlOf'</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (r -&gt; r)) s t a b -&gt; (i -&gt; r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ifoldrMOf">ifoldrMOf</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Dual (Endo (r -&gt; m r))) s t a b -&gt; (i -&gt; a -&gt; r -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:ifoldlMOf">ifoldlMOf</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (r -&gt; m r)) s t a b -&gt; (i -&gt; r -&gt; a -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:itoListOf">itoListOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s t a b -&gt; s -&gt; [(i, a)]</li><li class="src short"><a href="#v:withIndicesOf">withIndicesOf</a> :: Functor f =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t (i, a) (j, b)</li><li class="src short"><a href="#v:indicesOf">indicesOf</a> :: <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t i j</li><li class="src short"><a href="#v:ifiltering">ifiltering</a> :: (Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; f a) (s -&gt; f t) -&gt; k (a -&gt; f a) (s -&gt; f t)</li><li class="src short"><a href="#v:ibackwards">ibackwards</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; Backwards f b) (s -&gt; Backwards f t) -&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:itakingWhile">itakingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><a href="#v:idroppingWhile">idroppingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s, f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><a href="#v:isplitting">isplitting</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k) =&gt; Splitter (i, a) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)</li><li class="src short"><a href="#v:isplittingOn">isplittingOn</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k, Eq i, Eq a) =&gt; [(i, a)] -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)</li><li class="src short"><a href="#v:isplittingOneOf">isplittingOneOf</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k, Eq i, Eq a) =&gt; [(i, a)] -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)</li><li class="src short"><a href="#v:isplittingWhen">isplittingWhen</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)</li><li class="src short"><a href="#v:iendingBy">iendingBy</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k, Eq i, Eq a) =&gt; [(i, a)] -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)</li><li class="src short"><a href="#v:iendingByOneOf">iendingByOneOf</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k, Eq i, Eq a) =&gt; [(i, a)] -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)</li><li class="src short"><a href="#v:iwordingBy">iwordingBy</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)</li><li class="src short"><a href="#v:iliningBy">iliningBy</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)</li><li class="src short"><a href="#v:ichunkingOf">ichunkingOf</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k) =&gt; Int -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)</li><li class="src short"><a href="#v:isplittingPlaces">isplittingPlaces</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k, Integral n) =&gt; [n] -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)</li><li class="src short"><a href="#v:isplittingPlacesBlanks">isplittingPlacesBlanks</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k, Integral n) =&gt; [n] -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedFold">ReifiedIndexedFold</a> i s a = <a href="#v:ReifyIndexedFold">ReifyIndexedFold</a> {<ul class="subs"><li><a href="#v:reflectIndexedFold">reflectIndexedFold</a> :: <a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a> i s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Indexed Folds
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedFold">IndexedFold</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><a href="#v:ifoldMapOf">ifoldMapOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i m s t a b -&gt; (i -&gt; a -&gt; m) -&gt; s -&gt; m</li><li class="src short"><a href="#v:ifoldrOf">ifoldrOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo r) s t a b -&gt; (i -&gt; a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ifoldlOf">ifoldlOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Dual (Endo r)) s t a b -&gt; (i -&gt; r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ianyOf">ianyOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i Any s t a b -&gt; (i -&gt; a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:iallOf">iallOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i All s t a b -&gt; (i -&gt; a -&gt; Bool) -&gt; s -&gt; Bool</li><li class="src short"><a href="#v:itraverseOf_">itraverseOf_</a> :: Functor f =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; (i -&gt; a -&gt; f r) -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:iforOf_">iforOf_</a> :: Functor f =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; s -&gt; (i -&gt; a -&gt; f r) -&gt; f ()</li><li class="src short"><a href="#v:imapMOf_">imapMOf_</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; (i -&gt; a -&gt; m r) -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:iforMOf_">iforMOf_</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; s -&gt; (i -&gt; a -&gt; m r) -&gt; m ()</li><li class="src short"><a href="#v:iconcatMapOf">iconcatMapOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [r] s t a b -&gt; (i -&gt; a -&gt; [r]) -&gt; s -&gt; [r]</li><li class="src short"><a href="#v:ifindOf">ifindOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (First (i, a)) s t a b -&gt; (i -&gt; a -&gt; Bool) -&gt; s -&gt; Maybe (i, a)</li><li class="src short"><a href="#v:ifoldrOf-39-">ifoldrOf'</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Dual (Endo (r -&gt; r))) s t a b -&gt; (i -&gt; a -&gt; r -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ifoldlOf-39-">ifoldlOf'</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (r -&gt; r)) s t a b -&gt; (i -&gt; r -&gt; a -&gt; r) -&gt; r -&gt; s -&gt; r</li><li class="src short"><a href="#v:ifoldrMOf">ifoldrMOf</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Dual (Endo (r -&gt; m r))) s t a b -&gt; (i -&gt; a -&gt; r -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:ifoldlMOf">ifoldlMOf</a> :: Monad m =&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (r -&gt; m r)) s t a b -&gt; (i -&gt; r -&gt; a -&gt; m r) -&gt; r -&gt; s -&gt; m r</li><li class="src short"><a href="#v:itoListOf">itoListOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s t a b -&gt; s -&gt; [(i, a)]</li><li class="src short"><a href="#v:withIndicesOf">withIndicesOf</a> :: Functor f =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t (i, a) (j, b)</li><li class="src short"><a href="#v:indicesOf">indicesOf</a> :: <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a a -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t i j</li><li class="src short"><a href="#v:ifiltering">ifiltering</a> :: (Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; f a) (s -&gt; f t) -&gt; k (a -&gt; f a) (s -&gt; f t)</li><li class="src short"><a href="#v:ibackwards">ibackwards</a> :: <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k =&gt; <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; Backwards f b) (s -&gt; Backwards f t) -&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:itakingWhile">itakingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><a href="#v:idroppingWhile">idroppingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s, f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedFold">ReifiedIndexedFold</a> i s a = <a href="#v:ReifyIndexedFold">ReifyIndexedFold</a> {<ul class="subs"><li><a href="#v:reflectIndexedFold">reflectIndexedFold</a> :: <a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a> i s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Indexed Folds
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedFold" class="def">IndexedFold</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#IndexedFold" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> is a valid <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>.
</p></div></div><h1 id="g:2">Consuming Indexed Folds
</h1><div class="top"><p class="src"><a name="v:ifoldMapOf" class="def">ifoldMapOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i m s t a b -&gt; (i -&gt; a -&gt; m) -&gt; s -&gt; m<a href="src/Control-Lens-IndexedFold.html#ifoldMapOf" class="link">Source</a></p><div class="doc"><p>Fold an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> by mapping indices and values to an arbitrary <code>Monoid</code> with access
@@ -129,8 +129,8 @@
<code><a href="Control-Lens-IndexedFold.html#v:ifoldlOf-39-">ifoldlOf'</a></code> :: <code>Monad</code> m =&gt; <code><a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a></code> i s a -&gt; (i -&gt; r -&gt; a -&gt; m r) -&gt; r -&gt; s -&gt; r
<code><a href="Control-Lens-IndexedFold.html#v:ifoldlOf-39-">ifoldlOf'</a></code> :: <code>Monad</code> m =&gt; <code><a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a></code> i s a -&gt; (i -&gt; r -&gt; a -&gt; m r) -&gt; r -&gt; s -&gt; r
</pre></div></div><div class="top"><p class="src"><a name="v:itoListOf" class="def">itoListOf</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s t a b -&gt; s -&gt; [(i, a)]<a href="src/Control-Lens-IndexedFold.html#itoListOf" class="link">Source</a></p><div class="doc"><p>Extract the key-value pairs from a structure.
-</p><p>When you don't need access to the indices in the result, then <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code> is more flexible in what it accepts.
-</p><pre><code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code> l &#8801; <code>map</code> <code>fst</code> <code>.</code> <code><a href="Control-Lens-IndexedFold.html#v:itoListOf">itoListOf</a></code> l</pre><pre>
+</p><p>When you don't need access to the indices in the result, then <code><a href="Control-Lens-Fold.html#t:toListOf">toListOf</a></code> is more flexible in what it accepts.
+</p><pre><code><a href="Control-Lens-Fold.html#t:toListOf">toListOf</a></code> l &#8801; <code>map</code> <code>fst</code> <code>.</code> <code><a href="Control-Lens-IndexedFold.html#v:itoListOf">itoListOf</a></code> l</pre><pre>
<code><a href="Control-Lens-IndexedFold.html#v:itoListOf">itoListOf</a></code> :: <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> i s a -&gt; s -&gt; [(i,a)]
<code><a href="Control-Lens-IndexedFold.html#v:itoListOf">itoListOf</a></code> :: <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> i s a -&gt; s -&gt; [(i,a)]
<code><a href="Control-Lens-IndexedFold.html#v:itoListOf">itoListOf</a></code> :: <code><a href="Control-Lens-IndexedLens.html#t:SimpleIndexedLens">SimpleIndexedLens</a></code> i s a -&gt; s -&gt; [(i,a)]
@@ -161,46 +161,6 @@
This has no effect on an <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code>, or <code><a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:itakingWhile" class="def">itakingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#itakingWhile" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by taking elements from another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> while a predicate holds.
</p></div></div><div class="top"><p class="src"><a name="v:idroppingWhile" class="def">idroppingWhile</a> :: (<a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, Applicative f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i (Endo (f s, f s)) s s a a -&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#idroppingWhile" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by dropping elements from another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> while a predicate holds.
-</p></div></div><div class="top"><p class="src"><a name="v:isplitting" class="def">isplitting</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k) =&gt; Splitter (i, a) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#isplitting" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by splitting another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> according to the given splitting strategy.
-</p><pre>
- <code><a href="Control-Lens-IndexedFold.html#v:isplitting">isplitting</a></code> :: <code>Splitter</code> (i, a) -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> i s a -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> [i] s [a]
-</pre></div></div><div class="top"><p class="src"><a name="v:isplittingOn" class="def">isplittingOn</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k, Eq i, Eq a) =&gt; [(i, a)] -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#isplittingOn" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by splitting another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> on the given delimiter.
-</p><p>Equivalent to <code><code><a href="Control-Lens-IndexedFold.html#v:isplitting">isplitting</a></code> <code>.</code> <code>dropDelims</code> <code>.</code> <code>onSublist</code></code>.
-</p><pre>
- <code><a href="Control-Lens-IndexedFold.html#v:isplittingOn">isplittingOn</a></code> :: (<code>Eq</code> i, <code>Eq</code> a) =&gt; [(i, a)] -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> i s a -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> [i] s [a]
-</pre></div></div><div class="top"><p class="src"><a name="v:isplittingOneOf" class="def">isplittingOneOf</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k, Eq i, Eq a) =&gt; [(i, a)] -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#isplittingOneOf" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by splitting another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> on any of the given elements.
-</p><p>Equivalent to <code><code><a href="Control-Lens-IndexedFold.html#v:isplitting">isplitting</a></code> <code>.</code> <code>dropDelims</code> <code>.</code> <code>oneOf</code></code>.
-</p><pre>
- <code><a href="Control-Lens-IndexedFold.html#v:isplittingOneOf">isplittingOneOf</a></code> :: (<code>Eq</code> i, <code>Eq</code> a) =&gt; [(i, a)] -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> i s a -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> [i] s [a]
-</pre></div></div><div class="top"><p class="src"><a name="v:isplittingWhen" class="def">isplittingWhen</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#isplittingWhen" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by splitting another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> on elements satisfying the given predicate.
-</p><p>Equivalent to <code><code><a href="Control-Lens-IndexedFold.html#v:isplitting">isplitting</a></code> <code>.</code> <code>dropDelims</code> <code>.</code> <code>whenElt</code> <code>.</code> <code>uncurry</code></code>.
-</p><pre>
- <code><a href="Control-Lens-IndexedFold.html#v:isplittingWhen">isplittingWhen</a></code> :: (i -&gt; a -&gt; <code>Bool</code>) -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> i s a -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> [i] s [a]
-</pre></div></div><div class="top"><p class="src"><a name="v:iendingBy" class="def">iendingBy</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k, Eq i, Eq a) =&gt; [(i, a)] -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#iendingBy" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by splitting another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> into chunks terminated by the given delimiter.
-</p><p>Equivalent to <code><code><a href="Control-Lens-IndexedFold.html#v:isplitting">isplitting</a></code> <code>.</code> <code>dropDelims</code> <code>.</code> <code>onSublist</code></code>.
-</p><pre>
- <code><a href="Control-Lens-IndexedFold.html#v:iendingBy">iendingBy</a></code> :: (<code>Eq</code> i, <code>Eq</code> a) =&gt; [(i, a)] -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> i s a -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> [i] s [a]
-</pre></div></div><div class="top"><p class="src"><a name="v:iendingByOneOf" class="def">iendingByOneOf</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k, Eq i, Eq a) =&gt; [(i, a)] -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#iendingByOneOf" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by splitting another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> into chunks terminated by any of the given elements.
-</p><p>Equivalent to <code><code><a href="Control-Lens-IndexedFold.html#v:isplitting">isplitting</a></code> <code>.</code> <code>dropFinalBlank</code> <code>.</code> <code>dropDelims</code> <code>.</code> <code>oneOf</code></code>.
-</p><pre>
- <code><a href="Control-Lens-IndexedFold.html#v:iendingByOneOf">iendingByOneOf</a></code> :: (<code>Eq</code> i, <code>Eq</code> a) =&gt; [(i, a)] -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> i s a -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> [i] s [a]
-</pre></div></div><div class="top"><p class="src"><a name="v:iwordingBy" class="def">iwordingBy</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#iwordingBy" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by splitting another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> into <a href="words.html">words</a>, with word boundaries indicated by the given predicate.
-</p><p>Equivalent to <code><code><a href="Control-Lens-IndexedFold.html#v:isplitting">isplitting</a></code> <code>.</code> <code>dropBlanks</code> <code>.</code> <code>dropDelims</code> <code>.</code> <code>whenElt</code> <code>.</code> <code>uncurry</code></code>.
-</p><pre>
- <code><a href="Control-Lens-IndexedFold.html#v:iwordingBy">iwordingBy</a></code> :: (i -&gt; a -&gt; <code>Bool</code>) -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> i s a -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> [i] s [a]
-</pre></div></div><div class="top"><p class="src"><a name="v:iliningBy" class="def">iliningBy</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k) =&gt; (i -&gt; a -&gt; Bool) -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#iliningBy" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by splitting another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> into <a href="lines.html">lines</a>, with line boundaries indicated by the given predicate.
-</p><p>Equivalent to <code><code><a href="Control-Lens-IndexedFold.html#v:isplitting">isplitting</a></code> <code>.</code> <code>dropFinalBlank</code> <code>.</code> <code>dropDelims</code> <code>.</code> <code>whenElt</code> <code>.</code> <code>uncurry</code></code>.
-</p><pre>
- <code><a href="Control-Lens-IndexedFold.html#v:iliningBy">iliningBy</a></code> :: (i -&gt; a -&gt; <code>Bool</code>) -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> i s a -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> [i] s [a]
-</pre></div></div><div class="top"><p class="src"><a name="v:ichunkingOf" class="def">ichunkingOf</a><a href="src/Control-Lens-IndexedFold.html#ichunkingOf" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; Int</td><td class="doc"><pre>n</pre></td></tr><tr><td class="src">-&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; k ([a] -&gt; f [a]) (s -&gt; f s)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by splitting another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> into length-<code>n</code> pieces.
-</p><pre>
- <code><a href="Control-Lens-IndexedFold.html#v:ichunkingOf">ichunkingOf</a></code> :: <code>Int</code> -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> i s a -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> [i] s [a]
-</pre></div></div><div class="top"><p class="src"><a name="v:isplittingPlaces" class="def">isplittingPlaces</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k, Integral n) =&gt; [n] -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#isplittingPlaces" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by splitting another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> into chunks of the given lengths.
-</p><pre>
- <code><a href="Control-Lens-IndexedFold.html#v:isplittingPlaces">isplittingPlaces</a></code> :: <code>Integral</code> n =&gt; [n] -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> i s a -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> [i] s [a]
-</pre></div></div><div class="top"><p class="src"><a name="v:isplittingPlacesBlanks" class="def">isplittingPlacesBlanks</a> :: (Applicative f, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f, <a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> [i] k, Integral n) =&gt; [n] -&gt; <a href="Control-Lens-IndexedGetter.html#t:IndexedGetting">IndexedGetting</a> i [(i, a)] s s a a -&gt; k ([a] -&gt; f [a]) (s -&gt; f s)<a href="src/Control-Lens-IndexedFold.html#isplittingPlacesBlanks" class="link">Source</a></p><div class="doc"><p>Obtain an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> by splitting another <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-IndexedLens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> or <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> into chunks of the given lengths. Unlike <code><a href="Control-Lens-IndexedFold.html#v:isplittingPlaces">isplittingPlaces</a></code>, the output <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> will always be the same length as the first input argument.
-</p><pre>
- <code><a href="Control-Lens-IndexedFold.html#v:isplittingPlacesBlanks">isplittingPlacesBlanks</a></code> :: <code>Integral</code> n =&gt; [n] -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> i s a -&gt; <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> [i] s [a]
-</pre></div></div><h1 id="g:5">Storing Indexed Folds
+</p></div></div><h1 id="g:5">Storing Indexed Folds
</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedIndexedFold" class="def">ReifiedIndexedFold</a> i s a <a href="src/Control-Lens-IndexedFold.html#ReifiedIndexedFold" class="link">Source</a></p><div class="doc"><p>Useful for storage.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyIndexedFold" class="def">ReifyIndexedFold</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:reflectIndexedFold" class="def">reflectIndexedFold</a> :: <a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a> i s a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>
View
2  Control-Lens-IndexedGetter.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.IndexedGetter</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-IndexedGetter.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedGetter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.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
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedGetter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedGetter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Folds
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedGetter">IndexedGetter</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedGetting">IndexedGetting</a> i m s t a b = <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m b) (s -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m t)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedGetter">ReifiedIndexedGetter</a> i s a = <a href="#v:ReifyIndexedGetter">ReifyIndexedGetter</a> {<ul class="subs"><li><a href="#v:reflectIndexedGetter">reflectIndexedGetter</a> :: <a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a> i s a</li></ul>}</li></ul></div><div id="interface"><h1 id="g:1">Indexed Folds
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedGetter" class="def">IndexedGetter</a> i s a = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Gettable">Gettable</a> f) =&gt; k (a -&gt; f a) (s -&gt; f s)<a href="src/Control-Lens-IndexedGetter.html#IndexedGetter" class="link">Source</a></p><div class="doc"><p>Every <code><a href="Control-Lens-IndexedGetter.html#t:IndexedGetter">IndexedGetter</a></code> is a valid <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code> and <code>Getter</code>.
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IndexedGetting" class="def">IndexedGetting</a> i m s t a b = <a href="Control-Lens-Indexed.html#t:Index">Index</a> i (a -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m b) (s -&gt; <a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> m t)<a href="src/Control-Lens-IndexedGetter.html#IndexedGetting" class="link">Source</a></p><div class="doc"><p>Used to consume an <code><a href="Control-Lens-IndexedFold.html#t:IndexedFold">IndexedFold</a></code>.
View
4 Control-Lens-IndexedLens.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.IndexedLens</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-IndexedLens.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedLens.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.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
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedLens.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.IndexedLens</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Lenses
</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
@@ -19,7 +19,7 @@
</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> 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)
+</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>let f = (+1) &amp; 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
View
2  Control-Lens-IndexedSetter.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.IndexedSetter</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-IndexedSetter.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedSetter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.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
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedSetter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.IndexedSetter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Setter
</a></li><li><a href="#g:2">Storing Indexed Setters
</a></li><li><a href="#g:3">Simple
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedSetter">IndexedSetter</a> i s t a b = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, <a href="Control-Lens-Internal.html#t:Settable">Settable</a> f) =&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:imapOf">imapOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:iover">iover</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:isets">isets</a> :: ((i -&gt; a -&gt; b) -&gt; s -&gt; t) -&gt; <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s t a b</li><li class="src short"><a href="#v:-37--64--126-">(%@~)</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:-37--64--61-">(%@=)</a> :: MonadState s m =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m ()</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i s t a b = <a href="#v:ReifyIndexedSetter">ReifyIndexedSetter</a> {<ul class="subs"><li><a href="#v:reflectIndexedSetter">reflectIndexedSetter</a> :: <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s t a b</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIndexedSetter">SimpleIndexedSetter</a> i s a = <a href="Control-Lens-IndexedSetter.html#t:IndexedSetter">IndexedSetter</a> i s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIndexedSetter">SimpleReifiedIndexedSetter</a> i s a = <a href="Control-Lens-IndexedSetter.html#t:ReifiedIndexedSetter">ReifiedIndexedSetter</a> i s s a a</li></ul></div><div id="interface"><h1 id="g:1">Indexed Setter
View
10 Control-Lens-IndexedTraversal.html
@@ -1,12 +1,12 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.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.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
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-IndexedTraversal.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>rank 2 types, MPTCs, TFs, flexible</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Lens.IndexedTraversal</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Indexed Traversals
</a></li><li><a href="#g:2">Common Indexed Traversals
</a></li><li><a href="#g:3">Indexed Traversal Combinators
</a></li><li><a href="#g:4">Storing Indexed Traversals
</a></li><li><a href="#g:5">Simple
-</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedTraversal">IndexedTraversal</a> i s t a b = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:traverseAt">traverseAt</a> :: <a href="Control-Lens-IndexedLens.html#t:At">At</a> k m =&gt; k -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v</li><li class="src short"><a href="#v:iwhereOf">iwhereOf</a> :: (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a a -&gt; (i -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s t a a</li><li class="src short"><a href="#v:value">value</a> :: (k -&gt; Bool) -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (k, v) v</li><li class="src short"><a href="#v:ignored">ignored</a> :: <span class="keyword">forall</span> 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
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedTraversal">IndexedTraversal</a> i s t a b = <span class="keyword">forall</span> f k. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:traverseAt">traverseAt</a> :: <a href="Control-Lens-IndexedLens.html#t:At">At</a> k m =&gt; k -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v</li><li class="src short"><a href="#v:iwhereOf">iwhereOf</a> :: (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a a -&gt; (i -&gt; Bool) -&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s t a a</li><li class="src short"><a href="#v:value">value</a> :: (k -&gt; Bool) -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (k, v) v</li><li class="src short"><a href="#v:ignored">ignored</a> :: <span class="keyword">forall</span> k f i s a b. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s s a b</li><li class="src short"><span class="keyword">class</span> Ord k =&gt; <a href="#t:TraverseMin">TraverseMin</a> k m | m -&gt; k <span class="keyword">where</span><ul class="subs"><li><a href="#v:traverseMin">traverseMin</a> :: <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v</li></ul></li><li class="src short"><span class="keyword">class</span> Ord k =&gt; <a href="#t:TraverseMax">TraverseMax</a> k m | m -&gt; k <span class="keyword">where</span><ul class="subs"><li><a href="#v:traverseMax">traverseMax</a> :: <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v</li></ul></li><li class="src short"><a href="#v:traversed">traversed</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f =&gt; <a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a> Int (f a) (f b) a b</li><li class="src short"><a href="#v:itraverseOf">itraverseOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a b -&gt; (i -&gt; a -&gt; f b) -&gt; s -&gt; f t</li><li class="src short"><a href="#v:iforOf">iforOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a b -&gt; s -&gt; (i -&gt; a -&gt; f b) -&gt; f t</li><li class="src short"><a href="#v:imapMOf">imapMOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (WrappedMonad m) s t a b -&gt; (i -&gt; a -&gt; m b) -&gt; s -&gt; m t</li><li class="src short"><a href="#v:iforMOf">iforMOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (WrappedMonad m) s t a b -&gt; s -&gt; (i -&gt; a -&gt; m b) -&gt; m t</li><li class="src short"><a href="#v:imapAccumROf">imapAccumROf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (State s) s t a b -&gt; (i -&gt; s -&gt; a -&gt; (s, b)) -&gt; s -&gt; s -&gt; (s, t)</li><li class="src short"><a href="#v:imapAccumLOf">imapAccumLOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) (Backwards (State s)) s t a b -&gt; (i -&gt; s -&gt; a -&gt; (s, b)) -&gt; s -&gt; s -&gt; (s, t)</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIndexedTraversal">ReifiedIndexedTraversal</a> i s t a b = <a href="#v:ReifyIndexedTraversal">ReifyIndexedTraversal</a> {<ul class="subs"><li><a href="#v:reflectIndexedTraversal">reflectIndexedTraversal</a> :: <a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a> i s t a b</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> i s a = <a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a> i s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIndexedTraversal">SimpleReifiedIndexedTraversal</a> i s a = <a href="Control-Lens-IndexedTraversal.html#t:ReifiedIndexedTraversal">ReifiedIndexedTraversal</a> i s s a a</li></ul></div><div id="interface"><h1 id="g:1">Indexed Traversals
</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.
@@ -23,11 +23,13 @@
<code><a href="Control-Lens-IndexedTraversal.html#v:iwhereOf">iwhereOf</a></code> :: <code>SimpleIndexedSetter</code> i s a -&gt; (i -&gt; <code>Bool</code>) -&gt; <code>SimpleIndexedSetter</code> i s a
</pre></div></div><div class="top"><p class="src"><a name="v:value" class="def">value</a> :: (k -&gt; Bool) -&gt; <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (k, v) v<a href="src/Control-Lens-IndexedTraversal.html#value" class="link">Source</a></p><div class="doc"><p>This provides a <code>Traversal</code> that checks a predicate on a key before
allowing you to traverse into a value.
-</p></div></div><div class="top"><p class="src"><a name="v:ignored" class="def">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<a href="src/Control-Lens-IndexedTraversal.html#ignored" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">class</span> Ord k =&gt; <a name="t:TraverseMin" class="def">TraverseMin</a> k m | m -&gt; k <span class="keyword">where</span><a href="src/Control-Lens-IndexedTraversal.html#TraverseMin" class="link">Source</a></p><div class="doc"><p>Allows <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> the value at the smallest index.
+</p></div></div><div class="top"><p class="src"><a name="v:ignored" class="def">ignored</a> :: <span class="keyword">forall</span> k f i s a b. (<a href="Control-Lens-Indexed.html#t:Indexed">Indexed</a> i k, Applicative f) =&gt; <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> k f s s a b<a href="src/Control-Lens-IndexedTraversal.html#ignored" class="link">Source</a></p><div class="doc"><p>This is the trivial empty traversal.
+</p><pre><code><a href="Control-Lens-IndexedTraversal.html#v:ignored">ignored</a></code> :: <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> i s s a b</pre><pre><code><a href="Control-Lens-IndexedTraversal.html#v:ignored">ignored</a></code> &#8801; <code>const</code> <code>pure</code></pre></div></div><div class="top"><p class="src"><span class="keyword">class</span> Ord k =&gt; <a name="t:TraverseMin" class="def">TraverseMin</a> k m | m -&gt; k <span class="keyword">where</span><a href="src/Control-Lens-IndexedTraversal.html#TraverseMin" class="link">Source</a></p><div class="doc"><p>Allows <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> the value at the smallest index.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:traverseMin" class="def">traverseMin</a> :: <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v<a href="src/Control-Lens-IndexedTraversal.html#traverseMin" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> of the element with the smallest index.
</p></div></div><div class="subs instances"><p id="control.i:TraverseMin" class="caption collapser" onclick="toggleSection('i:TraverseMin')">Instances</p><div id="section.i:TraverseMin" class="show"><table><tr><td class="src"><a href="Control-Lens-IndexedTraversal.html#t:TraverseMin">TraverseMin</a> Int IntMap</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Ord k =&gt; <a href="Control-Lens-IndexedTraversal.html#t:TraverseMin">TraverseMin</a> k (Map k)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> Ord k =&gt; <a name="t:TraverseMax" class="def">TraverseMax</a> k m | m -&gt; k <span class="keyword">where</span><a href="src/Control-Lens-IndexedTraversal.html#TraverseMax" class="link">Source</a></p><div class="doc"><p>Allows <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> of the value at the largest index.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:traverseMax" class="def">traverseMax</a> :: <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> k (m v) v<a href="src/Control-Lens-IndexedTraversal.html#traverseMax" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> of the element at the largest index.
-</p></div></div><div class="subs instances"><p id="control.i:TraverseMax" class="caption collapser" onclick="toggleSection('i:TraverseMax')">Instances</p><div id="section.i:TraverseMax" class="show"><table><tr><td class="src"><a href="Control-Lens-IndexedTraversal.html#t:TraverseMax">TraverseMax</a> Int IntMap</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Ord k =&gt; <a href="Control-Lens-IndexedTraversal.html#t:TraverseMax">TraverseMax</a> k (Map k)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:3">Indexed Traversal Combinators
+</p></div></div><div class="subs instances"><p id="control.i:TraverseMax" class="caption collapser" onclick="toggleSection('i:TraverseMax')">Instances</p><div id="section.i:TraverseMax" class="show"><table><tr><td class="src"><a href="Control-Lens-IndexedTraversal.html#t:TraverseMax">TraverseMax</a> Int IntMap</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Ord k =&gt; <a href="Control-Lens-IndexedTraversal.html#t:TraverseMax">TraverseMax</a> k (Map k)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:traversed" class="def">traversed</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f =&gt; <a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a> Int (f a) (f b) a b<a href="src/Control-Lens-IndexedTraversal.html#traversed" class="link">Source</a></p><div class="doc"><p>Traverse any <code><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a></code> container. This is an <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code> that is indexed by ordinal position.
+</p></div></div><h1 id="g:3">Indexed Traversal Combinators
</h1><div class="top"><p class="src"><a name="v:itraverseOf" class="def">itraverseOf</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> (<a href="Control-Lens-Indexed.html#t:Index">Index</a> i) f s t a b -&gt; (i -&gt; a -&gt; f b) -&gt; s -&gt; f t<a href="src/Control-Lens-IndexedTraversal.html#itraverseOf" class="link">Source</a></p><div class="doc"><p>Traversal with an index.
</p><p>NB: When you don't need access to the index then you can just apply your <code><a href="Control-Lens-IndexedTraversal.html#t:IndexedTraversal">IndexedTraversal</a></code>
directly as a function!
View
104 Control-Lens-Internal.html
58 additions, 46 deletions not shown
View
64 Control-Lens-Iso.html
@@ -1,12 +1,13 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Iso</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Iso.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Iso.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.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>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Iso</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Isomorphism Lenses
-</a></li><li><a href="#g:2">Primitive isomorphisms
-</a><ul><li><a href="#g:3">Common Isomorphisms
-</a></li></ul></li><li><a href="#g:4">Storing Isomorphisms
-</a></li><li><a href="#g:5">Simplicity
-</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Iso">Iso</a> s t a b = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, Functor f) =&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:iso">iso</a> :: (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, Functor f) =&gt; (s -&gt; a) -&gt; (a -&gt; s) -&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><a href="#v:isos">isos</a> :: (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, Functor f) =&gt; (s -&gt; a) -&gt; (a -&gt; s) -&gt; (t -&gt; b) -&gt; (b -&gt; t) -&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:ala">ala</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s a -&gt; ((s -&gt; a) -&gt; e -&gt; a) -&gt; e -&gt; s</li><li class="src short"><a href="#v:auf">auf</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s a -&gt; ((b -&gt; a) -&gt; e -&gt; a) -&gt; (b -&gt; s) -&gt; e -&gt; s</li><li class="src short"><a href="#v:under">under</a> :: <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> (a -&gt; <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> b) (s -&gt; <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> t) -&gt; (s -&gt; t) -&gt; a -&gt; b</li><li class="src short"><a href="#v:from">from</a> :: <a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> a b -&gt; k b a</li><li class="src short"><a href="#v:via">via</a> :: <a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> a b -&gt; k a b</li><li class="src short"><span class="keyword">data</span> <a href="#t:Isomorphism">Isomorphism</a> a b = <a href="#v:Isomorphism">Isomorphism</a> (a -&gt; b) (b -&gt; a)</li><li class="src short"><span class="keyword">class</span> Category k =&gt; <a href="#t:Isomorphic">Isomorphic</a> k <span class="keyword">where</span><ul class="subs"><li><a href="#v:isomorphic">isomorphic</a> :: (a -&gt; b) -&gt; (b -&gt; a) -&gt; k a b</li><li><a href="#v:isomap">isomap</a> :: ((a -&gt; b) -&gt; c -&gt; d) -&gt; ((b -&gt; a) -&gt; d -&gt; c) -&gt; k a b -&gt; k c d</li></ul></li><li class="src short"><a href="#v:_const">_const</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b (Const a c) (Const b d)</li><li class="src short"><a href="#v:identity">identity</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b (Identity a) (Identity b)</li><li class="src short"><a href="#v:simple">simple</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b a b</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIso">ReifiedIso</a> s t a b = <a href="#v:ReifyIso">ReifyIso</a> {<ul class="subs"><li><a href="#v:reflectIso">reflectIso</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s t a b</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIso">SimpleIso</a> s a = <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIso">SimpleReifiedIso</a> s a = <a href="Control-Lens-Iso.html#t:ReifiedIso">ReifiedIso</a> s s a a</li></ul></div><div id="interface"><h1 id="g:1">Isomorphism Lenses
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Iso.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Iso</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Isomorphism Lenses
+</a></li><li><a href="#g:2">Working with isomorphisms
+</a></li><li><a href="#g:3">Primitive isomorphisms
+</a><ul><li><a href="#g:4">Common Isomorphisms
+</a></li></ul></li><li><a href="#g:5">Storing Isomorphisms
+</a></li><li><a href="#g:6">Simplicity
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Iso">Iso</a> s t a b = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, Functor f) =&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:iso">iso</a> :: (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, Functor f) =&gt; (s -&gt; a) -&gt; (a -&gt; s) -&gt; k (a -&gt; f a) (s -&gt; f s)</li><li class="src short"><a href="#v:isos">isos</a> :: (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, Functor f) =&gt; (s -&gt; a) -&gt; (a -&gt; s) -&gt; (t -&gt; b) -&gt; (b -&gt; t) -&gt; k (a -&gt; f b) (s -&gt; f t)</li><li class="src short"><a href="#v:ala">ala</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s a -&gt; ((s -&gt; a) -&gt; e -&gt; a) -&gt; e -&gt; s</li><li class="src short"><a href="#v:auf">auf</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s a -&gt; ((b -&gt; a) -&gt; e -&gt; a) -&gt; (b -&gt; s) -&gt; e -&gt; s</li><li class="src short"><a href="#v:under">under</a> :: <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> (a -&gt; <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> b) (s -&gt; <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> t) -&gt; (s -&gt; t) -&gt; a -&gt; b</li><li class="src short"><a href="#v:mapping">mapping</a> :: Functor f =&gt; <a href="Control-Lens-Iso.html#t:SimpleIso">SimpleIso</a> s a -&gt; <a href="Control-Lens-Iso.html#t:SimpleIso">SimpleIso</a> (f s) (f a)</li><li class="src short"><a href="#v:review">review</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> s) s t a b -&gt; a -&gt; s</li><li class="src short"><a href="#v:from">from</a> :: <a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> a b -&gt; k b a</li><li class="src short"><a href="#v:via">via</a> :: <a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> a b -&gt; k a b</li><li class="src short"><span class="keyword">data</span> <a href="#t:Isomorphism">Isomorphism</a> a b = <a href="#v:Isomorphism">Isomorphism</a> (a -&gt; b) (b -&gt; a)</li><li class="src short"><span class="keyword">class</span> Category k =&gt; <a href="#t:Isomorphic">Isomorphic</a> k <span class="keyword">where</span><ul class="subs"><li><a href="#v:isomorphic">isomorphic</a> :: (a -&gt; b) -&gt; (b -&gt; a) -&gt; k a b</li><li><a href="#v:isomap">isomap</a> :: ((a -&gt; b) -&gt; c -&gt; d) -&gt; ((b -&gt; a) -&gt; d -&gt; c) -&gt; k a b -&gt; k c d</li></ul></li><li class="src short"><a href="#v:_const">_const</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b (Const a c) (Const b d)</li><li class="src short"><a href="#v:identity">identity</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b (Identity a) (Identity b)</li><li class="src short"><a href="#v:simple">simple</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a a</li><li class="src short"><a href="#v:non">non</a> :: Eq a =&gt; a -&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> (Maybe a) a</li><li class="src short"><a href="#v:enum">enum</a> :: Enum a =&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> Int a</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ReifiedIso">ReifiedIso</a> s t a b = <a href="#v:ReifyIso">ReifyIso</a> {<ul class="subs"><li><a href="#v:reflectIso">reflectIso</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s t a b</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleIso">SimpleIso</a> s a = <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:SimpleReifiedIso">SimpleReifiedIso</a> s a = <a href="Control-Lens-Iso.html#t:ReifiedIso">ReifiedIso</a> s s a a</li></ul></div><div id="interface"><h1 id="g:1">Isomorphism Lenses
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Iso" class="def">Iso</a> s t a b = <span class="keyword">forall</span> k f. (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, Functor f) =&gt; k (a -&gt; f b) (s -&gt; f t)<a href="src/Control-Lens-Iso.html#Iso" class="link">Source</a></p><div class="doc"><p>Isomorphism families can be composed with other lenses using either (<code>.</code>) and <code>id</code>
from the Prelude or from Control.Category. However, if you compose them
with each other using (<code>.</code>) from the Prelude, they will be dumbed down to a
@@ -18,21 +19,24 @@
</p><pre>
<code><a href="Control-Lens-Getter.html#v:view">view</a></code> (<code><a href="Control-Lens-Iso.html#v:iso">iso</a></code> f g) &#8801; f
<code><a href="Control-Lens-Getter.html#v:view">view</a></code> (<code><a href="Control-Lens-Iso.html#v:from">from</a></code> (<code><a href="Control-Lens-Iso.html#v:iso">iso</a></code> f g)) &#8801; g
- <code><a href="Control-Lens-Setter.html#v:set">set</a></code> (<code><a href="Control-Lens-Iso.html#v:isos">isos</a></code> f g) h &#8801; g <code>.</code> h <code>.</code> f
- <code><a href="Control-Lens-Setter.html#v:set">set</a></code> (<code><a href="Control-Lens-Iso.html#v:from">from</a></code> (<code><a href="Control-Lens-Iso.html#v:iso">iso</a></code> f g')) h &#8801; f <code>.</code> h <code>.</code> g
+ <code><a href="Control-Lens-Setter.html#v:set">set</a></code> (<code><a href="Control-Lens-Iso.html#v:iso">iso</a></code> f g) h &#8801; g <code>.</code> h <code>.</code> f
+ <code><a href="Control-Lens-Setter.html#v:set">set</a></code> (<code><a href="Control-Lens-Iso.html#v:from">from</a></code> (<code><a href="Control-Lens-Iso.html#v:iso">iso</a></code> f g)) h &#8801; f <code>.</code> h <code>.</code> g
</pre><pre>iso :: (s -&gt; a) -&gt; (a -&gt; 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</pre></div></div><div class="top"><p class="src"><a name="v:isos" class="def">isos</a> :: (<a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k, Functor f) =&gt; (s -&gt; a) -&gt; (a -&gt; s) -&gt; (t -&gt; b) -&gt; (b -&gt; t) -&gt; k (a -&gt; f b) (s -&gt; f t)<a href="src/Control-Lens-Iso.html#isos" class="link">Source</a></p><div class="doc"><p>Build an isomorphism family from two pairs of inverse functions
</p><pre>
<code><a href="Control-Lens-Getter.html#v:view">view</a></code> (<code><a href="Control-Lens-Iso.html#v:isos">isos</a></code> sa as tb bt) &#8801; sa
<code><a href="Control-Lens-Getter.html#v:view">view</a></code> (<code><a href="Control-Lens-Iso.html#v:from">from</a></code> (<code><a href="Control-Lens-Iso.html#v:isos">isos</a></code> sa as tb bt)) &#8801; as
<code><a href="Control-Lens-Setter.html#v:set">set</a></code> (<code><a href="Control-Lens-Iso.html#v:isos">isos</a></code> sa as tb bt) ab &#8801; bt <code>.</code> ab <code>.</code> sa
- <code><a href="Control-Lens-Setter.html#v:set">set</a></code> (<code><a href="Control-Lens-Iso.html#v:from">from</a></code> (<code><a href="Control-Lens-Iso.html#v:isos">isos</a></code> ac ca bd db')) ab &#8801; bd <code>.</code> ab <code>.</code> ca
-</pre><pre>isos :: (s -&gt; a) -&gt; (a -&gt; s) -&gt; (t -&gt; b) -&gt; (b -&gt; t) -&gt; <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s t a b</pre></div></div><div class="top"><p class="src"><a name="v:ala" class="def">ala</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s a -&gt; ((s -&gt; a) -&gt; e -&gt; a) -&gt; e -&gt; s<a href="src/Control-Lens-Iso.html#ala" class="link">Source</a></p><div class="doc"><p>Based on <code>ala</code> from Conor McBride's work on Epigram.
+ <code><a href="Control-Lens-Setter.html#v:set">set</a></code> (<code><a href="Control-Lens-Iso.html#v:from">from</a></code> (<code><a href="Control-Lens-Iso.html#v:isos">isos</a></code> ac ca bd db)) ab &#8801; bd <code>.</code> ab <code>.</code> ca
+</pre><pre>isos :: (s -&gt; a) -&gt; (a -&gt; s) -&gt; (t -&gt; b) -&gt; (b -&gt; t) -&gt; <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s t a b</pre></div></div><h1 id="g:2">Working with isomorphisms
+</h1><div class="top"><p class="src"><a name="v:ala" class="def">ala</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s a -&gt; ((s -&gt; a) -&gt; e -&gt; a) -&gt; e -&gt; s<a href="src/Control-Lens-Iso.html#ala" class="link">Source</a></p><div class="doc"><p>Based on <code>ala</code> from Conor McBride's work on Epigram.
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>:m + Data.Monoid.Lens Data.Foldable
</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>ala _sum foldMap [1,2,3,4]
</code></strong>10
</pre></div></div><div class="top"><p class="src"><a name="v:auf" class="def">auf</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s a -&gt; ((b -&gt; a) -&gt; e -&gt; a) -&gt; (b -&gt; s) -&gt; e -&gt; s<a href="src/Control-Lens-Iso.html#auf" class="link">Source</a></p><div class="doc"><p>Based on <code>ala'</code> from Conor McBride's work on Epigram.
</p><p>Mnemonically, the German <em>auf</em> plays a similar role to /</p></div></div><div class="top"><p class="src"><a name="v:under" class="def">under</a> :: <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> (a -&gt; <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> b) (s -&gt; <a href="Control-Lens-Internal.html#t:Mutator">Mutator</a> t) -&gt; (s -&gt; t) -&gt; a -&gt; b<a href="src/Control-Lens-Iso.html#under" class="link">Source</a></p><div class="doc"><p>The opposite of working <code><a href="Control-Lens-Setter.html#v:over">over</a></code> a Setter is working <code><a href="Control-Lens-Iso.html#v:under">under</a></code> an Isomorphism.
-</p><pre><code><a href="Control-Lens-Iso.html#v:under">under</a></code> = <code><a href="Control-Lens-Setter.html#v:over">over</a></code> <code>.</code> <code><a href="Control-Lens-Iso.html#v:from">from</a></code></pre><pre><code><a href="Control-Lens-Iso.html#v:under">under</a></code> :: <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s t a b -&gt; (s -&gt; t) -&gt; a -&gt; b</pre></div></div><h1 id="g:2">Primitive isomorphisms
+</p><pre><code><a href="Control-Lens-Iso.html#v:under">under</a></code> = <code><a href="Control-Lens-Setter.html#v:over">over</a></code> <code>.</code> <code><a href="Control-Lens-Iso.html#v:from">from</a></code></pre><pre><code><a href="Control-Lens-Iso.html#v:under">under</a></code> :: <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> s t a b -&gt; (s -&gt; t) -&gt; a -&gt; b</pre></div></div><div class="top"><p class="src"><a name="v:mapping" class="def">mapping</a> :: Functor f =&gt; <a href="Control-Lens-Iso.html#t:SimpleIso">SimpleIso</a> s a -&gt; <a href="Control-Lens-Iso.html#t:SimpleIso">SimpleIso</a> (f s) (f a)<a href="src/Control-Lens-Iso.html#mapping" class="link">Source</a></p><div class="doc"><p>This can be used to lift any <code><a href="Control-Lens-Iso.html#t:SimpleIso">SimpleIso</a></code> into an arbitrary functor.
+</p></div></div><div class="top"><p class="src"><a name="v:review" class="def">review</a> :: <a href="Control-Lens-Type.html#t:Overloaded">Overloaded</a> <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> (<a href="Control-Lens-Internal.html#t:Accessor">Accessor</a> s) s t a b -&gt; a -&gt; s<a href="src/Control-Lens-Iso.html#review" class="link">Source</a></p><div class="doc"><p>This can be used to turn an <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> around and <code><a href="Control-Lens-Getter.html#v:view">view</a></code> the other way.
+</p><pre><code><a href="Control-Lens-Iso.html#v:review">review</a></code> = <code><a href="Control-Lens-Getter.html#v:view">view</a></code> <code>.</code> <code><a href="Control-Lens-Iso.html#v:from">from</a></code></pre></div></div><h1 id="g:3">Primitive isomorphisms
</h1><div class="top"><p class="src"><a name="v:from" class="def">from</a> :: <a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a> a b -&gt; k b a<a href="src/Control-Lens-Isomorphic.html#from" class="link">Source</a></p><div class="doc"><p>Invert an isomorphism.
</p><p>Note to compose an isomorphism and receive an isomorphism in turn you'll need to use
<code>Category</code>
@@ -51,7 +55,7 @@
the resulting isomorphism as a function.
</p></div><p class="src"><a name="v:isomap" class="def">isomap</a> :: ((a -&gt; b) -&gt; c -&gt; d) -&gt; ((b -&gt; a) -&gt; d -&gt; c) -&gt; k a b -&gt; k c d<a href="src/Control-Lens-Isomorphic.html#isomap" class="link">Source</a></p><div class="doc"><p>Map a morphism in the target category using an isomorphism between morphisms
in Hask.
-</p></div></div><div class="subs instances"><p id="control.i:Isomorphic" class="caption collapser" onclick="toggleSection('i:Isomorphic')">Instances</p><div id="section.i:Isomorphic" class="show"><table><tr><td class="src"><a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> (-&gt;)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h2 id="g:3">Common Isomorphisms
+</p></div></div><div class="subs instances"><p id="control.i:Isomorphic" class="caption collapser" onclick="toggleSection('i:Isomorphic')">Instances</p><div id="section.i:Isomorphic" class="show"><table><tr><td class="src"><a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> (-&gt;)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Iso.html#t:Isomorphic">Isomorphic</a> <a href="Control-Lens-Iso.html#t:Isomorphism">Isomorphism</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h2 id="g:4">Common Isomorphisms
</h2><div class="top"><p class="src"><a name="v:_const" class="def">_const</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b (Const a c) (Const b d)<a href="src/Control-Lens-Iso.html#_const" class="link">Source</a></p><div class="doc"><p>This isomorphism can be used to wrap or unwrap a value in <code>Const</code>
</p><pre>
x <code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code> <code><a href="Control-Lens-Iso.html#v:_const">_const</a></code> &#8801; <code>Const</code> x
@@ -60,11 +64,41 @@
</p><pre>
x^.identity &#8801; <code>Identity</code> x
<code>Identity</code> x <code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code> <code><a href="Control-Lens-Iso.html#v:from">from</a></code> <code><a href="Control-Lens-Iso.html#v:identity">identity</a></code> &#8801; x
-</pre></div></div><div class="top"><p class="src"><a name="v:simple" class="def">simple</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a b a b<a href="src/Control-Lens-Iso.html#simple" class="link">Source</a></p><div class="doc"><p>Composition with this isomorphism is occasionally useful when your <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>,
+</pre></div></div><div class="top"><p class="src"><a name="v:simple" class="def">simple</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> a a<a href="src/Control-Lens-Iso.html#simple" class="link">Source</a></p><div class="doc"><p>Composition with this isomorphism is occasionally useful when your <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>,
<code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> or <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> has a constraint on an unused
argument to force that argument to agree with the
type of a used argument and avoid <code>ScopedTypeVariables</code> or other ugliness.
-</p></div></div><h1 id="g:4">Storing Isomorphisms
+</p></div></div><div class="top"><p class="src"><a name="v:non" class="def">non</a> :: Eq a =&gt; a -&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> (Maybe a) a<a href="src/Control-Lens-Iso.html#non" class="link">Source</a></p><div class="doc"><p>If <code>v</code> is an element of a type <code>a</code>, and <code>a'</code> is <code>a</code> sans the element <code>v</code>, then <code>non v</code> is an isomorphism from
+ <code>Maybe a'</code> to <code>a</code>.
+</p><p>Keep in mind this is only a real isomorphism if you treat the domain as being <code><code>Maybe</code> (a sans v)</code>
+</p><p>This is practically quite useful when you want to have a map where all the entries should have non-zero values.
+</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Map.fromList [(&quot;hello&quot;,1)] &amp; at &quot;hello&quot; . non 0 +~ 2
+</code></strong>fromList [(&quot;hello&quot;,3)]
+</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Map.fromList [(&quot;hello&quot;,1)] &amp; at &quot;hello&quot; . non 0 -~ 1
+</code></strong>fromList []
+</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Map.fromList [(&quot;hello&quot;,1)] ^. at &quot;hello&quot; . non 0
+</code></strong>1
+</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Map.fromList [] ^. at &quot;hello&quot; . non 0
+</code></strong>0
+</pre><p>This combinator is also particularly useful when working with nested maps.
+</p><p><em>e.g.</em> When you want to create the nested map when it is missing:
+</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Map.empty &amp; at &quot;hello&quot; . non Map.empty . at &quot;world&quot; ?~ &quot;!!!&quot;
+</code></strong>fromList [(&quot;hello&quot;,fromList [(&quot;world&quot;,&quot;!!!&quot;)])]
+</pre><p>and when have deleting the last entry from the nested map mean that we
+ should delete its entry from the surrounding one:
+</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>fromList [(&quot;hello&quot;,fromList [(&quot;world&quot;,&quot;!!!&quot;)])] &amp; at &quot;hello&quot; . non Map.empty . at &quot;world&quot; .~ Nothing
+</code></strong>fromList []
+</pre></div></div><div class="top"><p class="src"><a name="v:enum" class="def">enum</a> :: Enum a =&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> Int a<a href="src/Control-Lens-Iso.html#enum" class="link">Source</a></p><div class="doc"><p>This isomorphism can be used to convert to or from an instance of <code>Enum</code>.
+</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>LT^.from enum
+</code></strong>0
+</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>97^.enum :: Char
+</code></strong>'a'
+</pre><p>Note: this is only an isomorphism from the numeric range actually used
+ and it is a bit of a pleasant fiction, since there are questionable
+ <code>Enum</code> instances for <code>Double</code>, and <code>Float</code> that exist solely for
+ <code>[1.0 .. 4.0]</code> sugar and the instances for those and <code>Integer</code> don't
+ cover all values in their range.
+</p></div></div><h1 id="g:5">Storing Isomorphisms
</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ReifiedIso" class="def">ReifiedIso</a> s t a b <a href="src/Control-Lens-Iso.html#ReifiedIso" class="link">Source</a></p><div class="doc"><p>Useful for storing isomorphisms in containers.
-</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyIso" class="def">ReifyIso</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:reflectIso" class="def">reflectIso</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> 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">Simplicity
+</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReifyIso" class="def">ReifyIso</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:reflectIso" class="def">reflectIso</a> :: <a href="Control-Lens-Iso.html#t:Iso">Iso</a> 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:6">Simplicity
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleIso" class="def">SimpleIso</a> s a = <a href="Control-Lens-Iso.html#t:Iso">Iso</a> s s a a<a href="src/Control-Lens-Iso.html#SimpleIso" class="link">Source</a></p><div class="doc"><pre>type <code><a href="Control-Lens-Iso.html#t:SimpleIso">SimpleIso</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></pre></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SimpleReifiedIso" class="def">SimpleReifiedIso</a> s a = <a href="Control-Lens-Iso.html#t:ReifiedIso">ReifiedIso</a> s s a a<a href="src/Control-Lens-Iso.html#SimpleReifiedIso" class="link">Source</a></p><div class="doc"><pre>type <code><a href="Control-Lens-Iso.html#t:SimpleReifiedIso">SimpleReifiedIso</a></code> = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:ReifiedIso">ReifiedIso</a></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
2  Control-Lens-Isomorphic.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Isomorphic</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Isomorphic.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Isomorphic.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.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>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Isomorphic</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> Category k =&gt; <a href="#t:Isomorphic">Isomorphic</a> k <span class="keyword">where</span><ul class="subs"><li><a href="#v:isomorphic">isomorphic</a> :: (a -&gt; b) -&gt; (b -&gt; a) -&gt; k a b</li><li><a href="#v:isomap">isomap</a> :: ((a -&gt; b) -&gt; c -&gt; d) -&gt; ((b -&gt; a) -&gt; d -&gt; c) -&gt; k a b -&gt; k c d</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Isomorphism">Isomorphism</a> a b = <a href="#v:Isomorphism">Isomorphism</a> (a -&gt; b) (b -&gt; a)</li><li class="src short"><a href="#v:from">from</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphism">Isomorphism</a> a b -&gt; k b a</li><li class="src short"><a href="#v:via">via</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphism">Isomorphism</a> a b -&gt; k a b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">class</span> Category k =&gt; <a name="t:Isomorphic" class="def">Isomorphic</a> k <span class="keyword">where</span><a href="src/Control-Lens-Isomorphic.html#Isomorphic" class="link">Source</a></p><div class="doc"><p>Used to provide overloading of isomorphism application
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Isomorphic.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Isomorphic</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> Category k =&gt; <a href="#t:Isomorphic">Isomorphic</a> k <span class="keyword">where</span><ul class="subs"><li><a href="#v:isomorphic">isomorphic</a> :: (a -&gt; b) -&gt; (b -&gt; a) -&gt; k a b</li><li><a href="#v:isomap">isomap</a> :: ((a -&gt; b) -&gt; c -&gt; d) -&gt; ((b -&gt; a) -&gt; d -&gt; c) -&gt; k a b -&gt; k c d</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Isomorphism">Isomorphism</a> a b = <a href="#v:Isomorphism">Isomorphism</a> (a -&gt; b) (b -&gt; a)</li><li class="src short"><a href="#v:from">from</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphism">Isomorphism</a> a b -&gt; k b a</li><li class="src short"><a href="#v:via">via</a> :: <a href="Control-Lens-Isomorphic.html#t:Isomorphic">Isomorphic</a> k =&gt; <a href="Control-Lens-Isomorphic.html#t:Isomorphism">Isomorphism</a> a b -&gt; k a b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">class</span> Category k =&gt; <a name="t:Isomorphic" class="def">Isomorphic</a> k <span class="keyword">where</span><a href="src/Control-Lens-Isomorphic.html#Isomorphic" class="link">Source</a></p><div class="doc"><p>Used to provide overloading of isomorphism application
</p><p>This is a <code>Category</code> with a canonical mapping to it from the
category of isomorphisms over Haskell types.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:isomorphic" class="def">isomorphic</a> :: (a -&gt; b) -&gt; (b -&gt; a) -&gt; k a b<a href="src/Control-Lens-Isomorphic.html#isomorphic" class="link">Source</a></p><div class="doc"><p>Build this morphism out of an isomorphism
View
2  Control-Lens-Loupe.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Loupe</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Loupe.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Loupe.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.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>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Loupe</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Lenses
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Loupe.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Loupe</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Lenses
</a></li><li><a href="#g:2">Simplified
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A <code><a href="Control-Lens-Loupe.html#t:Loupe">Loupe</a></code> is a minimalist <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> suitable for storing in containers
or returning monadically that can still be composed with other lenses.
View
92 Control-Lens-Plated.html
@@ -1,13 +1,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Plated</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Plated.html");};
//]]>
-</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Plated.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.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>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Plated</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Uniplate
+</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Plated.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-3.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Lens.Plated</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Uniplate
</a></li><li><a href="#g:2">Uniplate Combinators
</a></li><li><a href="#g:3">Compos
-</a></li><li><a href="#g:4">Indexing into a Traversal
-</a></li><li><a href="#g:5">Parts
-</a><ul><li><a href="#g:6">Unsafe Operations
-</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>The name &quot;plate&quot; stems originally from &quot;boilerplate&quot;, which was the term
+</a></li><li><a href="#g:4">Parts
+</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>The name &quot;plate&quot; stems originally from &quot;boilerplate&quot;, which was the term
used by the &quot;Scrap Your Boilerplate&quot; papers, and later inherited by Neil
Mitchell's &quot;Uniplate&quot;.
</p><p><a href="http://community.haskell.org/~ndm/uniplate/">http://community.haskell.org/~ndm/uniplate/</a>
@@ -31,7 +29,7 @@
</p><p>It is often beneficial to use the combinators in this module with the combinators
from <code>Data.Data.Lens</code> or <code>GHC.Generics.Lens</code> to make it easier to automatically
derive definitions for <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>, or to derive custom traversals.
-</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> <a href="#t:Plated">Plated</a> a <span class="keyword">where</span><ul class="subs"><li><a href="#v:plate">plate</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a a</li></ul></li><li class="src short"><a href="#v:children">children</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; a -&gt; [a]</li><li class="src short"><a href="#v:childrenOn">childrenOn</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:rewrite">rewrite</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; (a -&gt; Maybe a) -&gt; a -&gt; a</li><li class="src short"><a href="#v:rewriteOf">rewriteOf</a> :: <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a a -&gt; (a -&gt; Maybe a) -&gt; a -&gt; a</li><li class="src short"><a href="#v:rewriteOn">rewriteOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; <a href="Control-Lens-Setter.html#t:Setting">Setting</a> s t a a -&gt; (a -&gt; Maybe a) -&gt; s -&gt; t</li><li class="src short"><a href="#v:rewriteOnOf">rewriteOnOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> s t a a -&gt; <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a a -&gt; (a -&gt; Maybe a) -&gt; s -&gt; t</li><li class="src short"><a href="#v:rewriteM">rewriteM</a> :: (Monad m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; (a -&gt; m (Maybe a)) -&gt; a -&gt; m a</li><li class="src short"><a href="#v:rewriteMOf">rewriteMOf</a> :: Monad m =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (WrappedMonad m) a a -&gt; (a -&gt; m (Maybe a)) -&gt; a -&gt; m a</li><li class="src short"><a href="#v:rewriteMOn">rewriteMOn</a> :: (Monad m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (WrappedMonad m) s t a a -&gt; (a -&gt; m (Maybe a)) -&gt; s -&gt; m t</li><li class="src short"><a href="#v:rewriteMOnOf">rewriteMOnOf</a> :: Monad m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (WrappedMonad m) s t a a -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (WrappedMonad m) a a -&gt; (a -&gt; m (Maybe a)) -&gt; s -&gt; m t</li><li class="src short"><a href="#v:universe">universe</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; a -&gt; [a]</li><li class="src short"><a href="#v:universeOf">universeOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] a b a b -&gt; a -&gt; [a]</li><li class="src short"><a href="#v:universeOn">universeOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] s t a a -&gt; s -&gt; [a]</li><li class="src short"><a href="#v:universeOnOf">universeOnOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] s t a b -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] a b a b -&gt; s -&gt; [a]</li><li class="src short"><a href="#v:transform">transform</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; (a -&gt; a) -&gt; a -&gt; a</li><li class="src short"><a href="#v:transformOf">transformOf</a> :: <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a a -&gt; (a -&gt; a) -&gt; a -&gt; a</li><li class="src short"><a href="#v:transformOn">transformOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; <a href="Control-Lens-Setter.html#t:Setting">Setting</a> s t a a -&gt; (a -&gt; a) -&gt; s -&gt; t</li><li class="src short"><a href="#v:transformOnOf">transformOnOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> s t a a -&gt; <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a a -&gt; (a -&gt; a) -&gt; s -&gt; t</li><li class="src short"><a href="#v:transformM">transformM</a> :: (Monad m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; (a -&gt; m a) -&gt; a -&gt; m a</li><li class="src short"><a href="#v:transformMOf">transformMOf</a> :: Monad m =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (WrappedMonad m) a a -&gt; (a -&gt; m a) -&gt; a -&gt; m a</li><li class="src short"><a href="#v:transformMOn">transformMOn</a> :: (Monad m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (WrappedMonad m) s t a a -&gt; (a -&gt; m a) -&gt; s -&gt; m t</li><li class="src short"><a href="#v:transformMOnOf">transformMOnOf</a> :: Monad m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (WrappedMonad m) s a a a -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (WrappedMonad m) a a -&gt; (a -&gt; m a) -&gt; s -&gt; m a</li><li class="src short"><a href="#v:descend">descend</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; (a -&gt; a) -&gt; a -&gt; a</li><li class="src short"><a href="#v:descendOf">descendOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> s t a b -&gt; (a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:descendOn">descendOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; <a href="Control-Lens-Setter.html#t:Setting">Setting</a> s t a a -&gt; (a -&gt; a) -&gt; s -&gt; t</li><li class="src short"><a href="#v:descendOnOf">descendOnOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> s t a b -&gt; <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b u v -&gt; (u -&gt; v) -&gt; s -&gt; t</li><li class="src short"><a href="#v:descendA">descendA</a> :: (Applicative f, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; (a -&gt; f a) -&gt; a -&gt; f a</li><li class="src short"><a href="#v:descendAOf">descendAOf</a> :: Applicative f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; (a -&gt; f b) -&gt; s -&gt; f t</li><li class="src short"><a href="#v:descendAOn">descendAOn</a> :: (Applicative f, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a a -&gt; (a -&gt; f a) -&gt; s -&gt; f t</li><li class="src short"><a href="#v:descendAOnOf">descendAOnOf</a> :: Applicative f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f u v s t -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; (a -&gt; f b) -&gt; u -&gt; f v</li><li class="src short"><a href="#v:descendA_">descendA_</a> :: (Applicative f, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; (a -&gt; f b) -&gt; a -&gt; f ()</li><li class="src short"><a href="#v:descendAOf_">descendAOf_</a> :: Applicative f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; (a -&gt; f r) -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:descendAOn_">descendAOn_</a> :: (Applicative f, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a a -&gt; (a -&gt; f r) -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:descendAOnOf_">descendAOnOf_</a> :: Applicative f =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) s t a b -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) a b a b -&gt; (a -&gt; f r) -&gt; s -&gt; f ()</li><li class="src short"><a href="#v:descendM">descendM</a> :: (Monad m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; (a -&gt; m a) -&gt; a -&gt; m a</li><li class="src short"><a href="#v:descendMOf">descendMOf</a> :: Monad m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (WrappedMonad m) s t a b -&gt; (a -&gt; m b) -&gt; s -&gt; m t</li><li class="src short"><a href="#v:descendMOn">descendMOn</a> :: (Monad m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (WrappedMonad m) s t a a -&gt; (a -&gt; m a) -&gt; s -&gt; m t</li><li class="src short"><a href="#v:descendMOnOf">descendMOnOf</a> :: Monad m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (WrappedMonad m) s t a a -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (WrappedMonad m) a a -&gt; (a -&gt; m a) -&gt; s -&gt; m t</li><li class="src short"><a href="#v:descendM_">descendM_</a> :: (Monad m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; (a -&gt; m b) -&gt; a -&gt; m ()</li><li class="src short"><a href="#v:descendMOf_">descendMOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; (a -&gt; m r) -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:descendMOn_">descendMOn_</a> :: (Monad m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a a -&gt; (a -&gt; m r) -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:descendMOnOf_">descendMOnOf_</a> :: Monad m =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) s t a b -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) a b a b -&gt; (a -&gt; m r) -&gt; s -&gt; m ()</li><li class="src short"><a href="#v:contexts">contexts</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; a -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a a]</li><li class="src short"><a href="#v:contextsOf">contextsOf</a> :: <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) a a -&gt; a -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a a]</li><li class="src short"><a href="#v:contextsOn">contextsOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) s t a a -&gt; s -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a t]</li><li class="src short"><a href="#v:contextsOnOf">contextsOnOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) s t a a -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) a a -&gt; s -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a t]</li><li class="src short"><a href="#v:holes">holes</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; a -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a a]</li><li class="src short"><a href="#v:holesOf">holesOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) s t a a -&gt; s -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a t]</li><li class="src short"><a href="#v:holesOn">holesOn</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) s t a a -&gt; s -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a t]</li><li class="src short"><a href="#v:holesOnOf">holesOnOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> r r) s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> r r) a b r r -&gt; s -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> r r t]</li><li class="src short"><a href="#v:para">para</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; (a -&gt; [r] -&gt; r) -&gt; a -&gt; r</li><li class="src short"><a href="#v:paraOf">paraOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] a b a b -&gt; (a -&gt; [r] -&gt; r) -&gt; a -&gt; r</li><li class="src short"><a href="#v:composOpFold">composOpFold</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; b -&gt; (b -&gt; b -&gt; b) -&gt; (a -&gt; b) -&gt; a -&gt; b</li><li class="src short"><a href="#v:element">element</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> t =&gt; Int -&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> (t a) a</li><li class="src short"><a href="#v:elementOf">elementOf</a> :: Functor f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) s t a a -&gt; Int -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a a</li><li class="src short"><a href="#v:parts">parts</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> a [a]</li><li class="src short"><a href="#v:partsOf">partsOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) s t a a -&gt; <a href="Control-Lens-Type.html#t:Lens">Lens</a> s t [a] [a]</li><li class="src short"><a href="#v:unsafePartsOf">unsafePartsOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a b) s t a b -&gt; <a href="Control-Lens-Type.html#t:Lens">Lens</a> s t [a] [b]</li></ul></div><div id="interface"><h1 id="g:1">Uniplate
+</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:Plated">Plated</a> a <span class="keyword">where</span><ul class="subs"><li><a href="#v:plate">plate</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a a</li></ul></li><li class="src short"><a href="#v:children">children</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; a -&gt; [a]</li><li class="src short"><a href="#v:rewrite">rewrite</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; (a -&gt; Maybe a) -&gt; a -&gt; a</li><li class="src short"><a href="#v:rewriteOf">rewriteOf</a> :: <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a a -&gt; (a -&gt; Maybe a) -&gt; a -&gt; a</li><li class="src short"><a href="#v:rewriteOn">rewriteOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; <a href="Control-Lens-Setter.html#t:Setting">Setting</a> s t a a -&gt; (a -&gt; Maybe a) -&gt; s -&gt; t</li><li class="src short"><a href="#v:rewriteOnOf">rewriteOnOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> s t a a -&gt; <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a a -&gt; (a -&gt; Maybe a) -&gt; s -&gt; t</li><li class="src short"><a href="#v:rewriteM">rewriteM</a> :: (Monad m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; (a -&gt; m (Maybe a)) -&gt; a -&gt; m a</li><li class="src short"><a href="#v:rewriteMOf">rewriteMOf</a> :: Monad m =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (WrappedMonad m) a a -&gt; (a -&gt; m (Maybe a)) -&gt; a -&gt; m a</li><li class="src short"><a href="#v:rewriteMOn">rewriteMOn</a> :: (Monad m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (WrappedMonad m) s t a a -&gt; (a -&gt; m (Maybe a)) -&gt; s -&gt; m t</li><li class="src short"><a href="#v:rewriteMOnOf">rewriteMOnOf</a> :: Monad m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (WrappedMonad m) s t a a -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (WrappedMonad m) a a -&gt; (a -&gt; m (Maybe a)) -&gt; s -&gt; m t</li><li class="src short"><a href="#v:universe">universe</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; a -&gt; [a]</li><li class="src short"><a href="#v:universeOf">universeOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] a b a b -&gt; a -&gt; [a]</li><li class="src short"><a href="#v:universeOn">universeOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] s t a a -&gt; s -&gt; [a]</li><li class="src short"><a href="#v:universeOnOf">universeOnOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] s t a b -&gt; <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] a b a b -&gt; s -&gt; [a]</li><li class="src short"><a href="#v:transform">transform</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; (a -&gt; a) -&gt; a -&gt; a</li><li class="src short"><a href="#v:transformOf">transformOf</a> :: <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a a -&gt; (a -&gt; a) -&gt; a -&gt; a</li><li class="src short"><a href="#v:transformOn">transformOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; <a href="Control-Lens-Setter.html#t:Setting">Setting</a> s t a a -&gt; (a -&gt; a) -&gt; s -&gt; t</li><li class="src short"><a href="#v:transformOnOf">transformOnOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> s t a a -&gt; <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a a -&gt; (a -&gt; a) -&gt; s -&gt; t</li><li class="src short"><a href="#v:transformM">transformM</a> :: (Monad m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; (a -&gt; m a) -&gt; a -&gt; m a</li><li class="src short"><a href="#v:transformMOf">transformMOf</a> :: Monad m =&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (WrappedMonad m) a a -&gt; (a -&gt; m a) -&gt; a -&gt; m a</li><li class="src short"><a href="#v:transformMOn">transformMOn</a> :: (Monad m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (WrappedMonad m) s t a a -&gt; (a -&gt; m a) -&gt; s -&gt; m t</li><li class="src short"><a href="#v:transformMOnOf">transformMOnOf</a> :: Monad m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (WrappedMonad m) s a a a -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (WrappedMonad m) a a -&gt; (a -&gt; m a) -&gt; s -&gt; m a</li><li class="src short"><a href="#v:contexts">contexts</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; a -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a a]</li><li class="src short"><a href="#v:contextsOf">contextsOf</a> :: <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) a a -&gt; a -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a a]</li><li class="src short"><a href="#v:contextsOn">contextsOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) s t a a -&gt; s -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a t]</li><li class="src short"><a href="#v:contextsOnOf">contextsOnOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) s t a a -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) a a -&gt; s -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a t]</li><li class="src short"><a href="#v:holes">holes</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; a -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a a]</li><li class="src short"><a href="#v:holesOn">holesOn</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) s t a a -&gt; s -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a t]</li><li class="src short"><a href="#v:holesOnOf">holesOnOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> r r) s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> r r) a b r r -&gt; s -&gt; [<a href="Control-Lens-Internal.html#t:Context">Context</a> r r t]</li><li class="src short"><a href="#v:para">para</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; (a -&gt; [r] -&gt; r) -&gt; a -&gt; r</li><li class="src short"><a href="#v:paraOf">paraOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (Endo [a]) a b a b -&gt; (a -&gt; [r] -&gt; r) -&gt; a -&gt; r</li><li class="src short"><a href="#v:composOpFold">composOpFold</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; b -&gt; (b -&gt; b -&gt; b) -&gt; (a -&gt; b) -&gt; a -&gt; b</li><li class="src short"><a href="#v:parts">parts</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> a [a]</li></ul></div><div id="interface"><h1 id="g:1">Uniplate
</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Plated" class="def">Plated</a> a <span class="keyword">where</span><a href="src/Control-Lens-Plated.html#Plated" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> type is one where we know how to extract its immediate self-similar children.
</p><p><em>Example 1</em>:
</p><pre>
@@ -94,8 +92,7 @@
</p><p>The default definition finds no children.
</p></div></div><div class="subs instances"><p id="control.i:Plated" class="caption collapser" onclick="toggleSection('i:Plated')">Instances</p><div id="section.i:Plated" class="show"><table><tr><td class="src"><a href="Control-Lens-Plated.html#t:Plated">Plated</a> [a]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Control-Lens-Plated.html#t:Plated">Plated</a> (Tree a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Uniplate Combinators
</h1><div class="top"><p class="src"><a name="v:children" class="def">children</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; a -&gt; [a]<a href="src/Control-Lens-Plated.html#children" class="link">Source</a></p><div class="doc"><p>Extract the immediate descendants of a <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> container.
-</p><pre><code><a href="Control-Lens-Plated.html#v:children">children</a></code> &#8801; <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre></div></div><div class="top"><p class="src"><a name="v:childrenOn" class="def">childrenOn</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-Plated.html#childrenOn" class="link">Source</a></p><div class="doc"><p>Provided for compatibility with <code>uniplate</code>.
-</p><pre><code><a href="Control-Lens-Plated.html#v:childrenOn">childrenOn</a></code> &#8801; <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code></pre><pre><code><a href="Control-Lens-Plated.html#v:childrenOn">childrenOn</a></code> :: <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> s a -&gt; s -&gt; [a]</pre></div></div><div class="top"><p class="src"><a name="v:rewrite" class="def">rewrite</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; (a -&gt; Maybe a) -&gt; a -&gt; a<a href="src/Control-Lens-Plated.html#rewrite" class="link">Source</a></p><div class="doc"><p>Rewrite by applying a rule everywhere you can. Ensures that the rule cannot
+</p><pre><code><a href="Control-Lens-Plated.html#v:children">children</a></code> &#8801; <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre></div></div><div class="top"><p class="src"><a name="v:rewrite" class="def">rewrite</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; (a -&gt; Maybe a) -&gt; a -&gt; a<a href="src/Control-Lens-Plated.html#rewrite" class="link">Source</a></p><div class="doc"><p>Rewrite by applying a rule everywhere you can. Ensures that the rule cannot
be applied anywhere in the result:
</p><pre>propRewrite r x = <code>all</code> (<code><a href="Data-Just.html#t:isNothing">isNothing</a></code> . r) (<code><a href="Control-Lens-Plated.html#v:universe">universe</a></code> (<code><a href="Control-Lens-Plated.html#v:rewrite">rewrite</a></code> r x))</pre><p>Usually <code><a href="Control-Lens-Plated.html#v:transform">transform</a></code> is more appropriate, but <code><a href="Control-Lens-Plated.html#v:rewrite">rewrite</a></code> can give better
compositionality. Given two single transformations <code>f</code> and <code>g</code>, you can
@@ -159,34 +156,7 @@
</p><pre><code><a href="Control-Lens-Plated.html#v:transformMOf">transformMOf</a></code> :: <code>Monad</code> m =&gt; 'Simple <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a a -&gt; (a -&gt; m a) -&gt; a -&gt; m a</pre></div></div><div class="top"><p class="src"><a name="v:transformMOn" class="def">transformMOn</a> :: (Monad m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (WrappedMonad m) s t a a -&gt; (a -&gt; m a) -&gt; s -&gt; m t<a href="src/Control-Lens-Plated.html#transformMOn" class="link">Source</a></p><div class="doc"><p>Transform every element in the tree in a region indicated by a supplied <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, in a bottom-up manner, monadically.
</p><pre><code><a href="Control-Lens-Plated.html#v:transformMOn">transformMOn</a></code> :: (<code>Monad</code> m, <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></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; m a) -&gt; s -&gt; m s</pre></div></div><div class="top"><p class="src"><a name="v:transformMOnOf" class="def">transformMOnOf</a> :: Monad m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (WrappedMonad m) s a a a -&gt; <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (WrappedMonad m) a a -&gt; (a -&gt; m a) -&gt; s -&gt; m a<a href="src/Control-Lens-Plated.html#transformMOnOf" class="link">Source</a></p><div class="doc"><p>Transform every element in a tree that lies in a region indicated by a supplied <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, walking with a user supplied <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> in
a bottom-up manner with a monadic effect.
-</p><pre><code><a href="Control-Lens-Plated.html#v:transformMOnOf">transformMOnOf</a></code> :: <code>Monad</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; <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 a -&gt; (a -&gt; m a) -&gt; s -&gt; m s</pre></div></div><div class="top"><p class="src"><a name="v:descend" class="def">descend</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; (a -&gt; a) -&gt; a -&gt; a<a href="src/Control-Lens-Plated.html#descend" class="link">Source</a></p><div class="doc"><p>Recurse one level into a structure. (a.k.a <code>composOp</code> from Bj</p></div></div><div class="top"><p class="src"><a name="v:descendOf" class="def">descendOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> s t a b -&gt; (a -&gt; b) -&gt; s -&gt; t<a href="src/Control-Lens-Plated.html#descendOf" class="link">Source</a></p><div class="doc"><p>Recurse one level into a structure using a user specified recursion scheme. This is <code><a href="Control-Lens-Setter.html#v:over">over</a></code>, but it is supplied here
- for consistency with the uniplate API.
-</p><pre><code><a href="Control-Lens-Plated.html#v:descendOf">descendOf</a></code> &#8801; <code><a href="Control-Lens-Setter.html#v:over">over</a></code></pre><pre>
- <code><a href="Control-Lens-Plated.html#v:descendOf">descendOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> s a -&gt; (a -&gt; a) -&gt; s -&gt; s
- <code><a href="Control-Lens-Plated.html#v:descendOf">descendOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> s a -&gt; (a -&gt; a) -&gt; s -&gt; s
-</pre></div></div><div class="top"><p class="src"><a name="v:descendOn" class="def">descendOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a =&gt; <a href="Control-Lens-Setter.html#t:Setting">Setting</a> s t a a -&gt; (a -&gt; a) -&gt; s -&gt; t<a href="src/Control-Lens-Plated.html#descendOn" class="link">Source</a></p><div class="doc"><p>Recurse one level into the parts of the structure delimited by a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code>.
-</p><pre><code><a href="Control-Lens-Plated.html#v:descendOn">descendOn</a></code> b &#8801; <code><a href="Control-Lens-Setter.html#v:over">over</a></code> (b <code>.</code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>)</pre><pre><code><a href="Control-Lens-Plated.html#v:descendOn">descendOn</