This file is indexed.

/usr/share/doc/libghc-lens-doc/html/Control-Lens-Internal-Indexed.html is in libghc-lens-doc 4.13-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Internal.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-Internal-Indexed.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Internal-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-4.13: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(C) 2012-2015 Edward Kmett</td></tr><tr><th>License</th><td>BSD-style (see the file LICENSE)</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>non-portable</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Control.Lens.Internal.Indexed</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">An Indexed Profunctor</a></li><li><a href="#g:2">Classes</a></li><li><a href="#g:3">Indexing</a></li><li><a href="#g:4">64-bit Indexing</a></li><li><a href="#g:5">Converting to Folds</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Internal implementation details for <code><a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a></code> lens-likes</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">newtype</span> <a href="#t:Indexed">Indexed</a> i a b = <a href="#v:Indexed">Indexed</a> {<ul class="subs"><li><a href="#v:runIndexed">runIndexed</a> :: i -&gt; a -&gt; b</li></ul>}</li><li class="src short"><span class="keyword">class</span> (<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Corepresentable">Corepresentable</a> p, <a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad.html#t:Comonad">Comonad</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Corep">Corep</a> p), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Corep">Corep</a> p), <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor.html#t:Strong">Strong</a> p, <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Representable">Representable</a> p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Rep">Rep</a> p), <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad-Fix.html#t:MonadFix">MonadFix</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Rep">Rep</a> p), <a href="file:///usr/share/doc/libghc-distributive-doc/html/Data-Distributive.html#t:Distributive">Distributive</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Rep">Rep</a> p), <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor.html#t:Costrong">Costrong</a> p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Arrow.html#t:ArrowLoop">ArrowLoop</a> p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Arrow.html#t:ArrowApply">ArrowApply</a> p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Arrow.html#t:ArrowChoice">ArrowChoice</a> p) =&gt; <a href="#t:Conjoined">Conjoined</a> p <span class="keyword">where</span><ul class="subs"><li><a href="#v:distrib">distrib</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; p a b -&gt; p (f a) (f b)</li><li><a href="#v:conjoined">conjoined</a> :: ((p ~ (-&gt;)) =&gt; q (a -&gt; b) r) -&gt; q (p a b) r -&gt; q (p a b) r</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="Control-Lens-Internal-Indexed.html#t:Conjoined">Conjoined</a> p =&gt; <a href="#t:Indexable">Indexable</a> i p <span class="keyword">where</span><ul class="subs"><li><a href="#v:indexed">indexed</a> :: p a b -&gt; i -&gt; a -&gt; b</li></ul></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Indexing">Indexing</a> f a = <a href="#v:Indexing">Indexing</a> {<ul class="subs"><li><a href="#v:runIndexing">runIndexing</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>, f a)</li></ul>}</li><li class="src short"><a href="#v:indexing">indexing</a> :: <a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> p =&gt; ((a -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexing">Indexing</a> f b) -&gt; s -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexing">Indexing</a> f t) -&gt; p a (f b) -&gt; s -&gt; f t</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Indexing64">Indexing64</a> f a = <a href="#v:Indexing64">Indexing64</a> {<ul class="subs"><li><a href="#v:runIndexing64">runIndexing64</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a>, f a)</li></ul>}</li><li class="src short"><a href="#v:indexing64">indexing64</a> :: <a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a> p =&gt; ((a -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexing64">Indexing64</a> f b) -&gt; s -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexing64">Indexing64</a> f t) -&gt; p a (f b) -&gt; s -&gt; f t</li><li class="src short"><a href="#v:withIndex">withIndex</a> :: (<a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a> i p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> f) =&gt; p (i, s) (f (j, t)) -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i s (f t)</li><li class="src short"><a href="#v:asIndex">asIndex</a> :: (<a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a> i p, <a href="Control-Lens-Getter.html#t:Contravariant">Contravariant</a> f, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> f) =&gt; p i (f i) -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i s (f s)</li></ul></div><div id="interface"><h1 id="g:1">An Indexed Profunctor</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Indexed" class="def">Indexed</a> i a b <a href="src/Control-Lens-Internal-Indexed.html#Indexed" class="link">Source</a></p><div class="doc"><p>A function with access to a index. This constructor may be useful when you need to store
 an <code><a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a></code> in a container to avoid <code>ImpredicativeTypes</code>.</p><pre>index :: Indexed i a b -&gt; i -&gt; a -&gt; b</pre></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Indexed" class="def">Indexed</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:runIndexed" class="def">runIndexed</a> :: i -&gt; a -&gt; b</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Indexed" class="caption collapser" onclick="toggleSection('i:Indexed')">Instances</p><div id="section.i:Indexed" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Category.html#t:Category">Category</a> * (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-198" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(~) * i j =&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a> i (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> j)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-238" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Arrow.html#t:Arrow">Arrow</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-204" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Arrow.html#t:ArrowChoice">ArrowChoice</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-216" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Arrow.html#t:ArrowApply">ArrowApply</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-226" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Arrow.html#t:ArrowLoop">ArrowLoop</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-230" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Representable">Representable</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-176" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Corepresentable">Corepresentable</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-185" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor.html#t:Strong">Strong</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-194" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-190" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor.html#t:Costrong">Costrong</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-167" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-153" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Control-Lens-Internal-Indexed.html#t:Conjoined">Conjoined</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-234" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Control-Lens-Internal-Bazaar.html#t:Bizarre">Bizarre</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>) <a href="Control-Lens-Internal-Magma.html#t:Mafic">Mafic</a></span> <a href="src/Control-Lens-Internal-Bazaar.html#line-197" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Sieve.html#t:Sieve">Sieve</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) ((-&gt;) i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-172" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Sieve.html#t:Cosieve">Cosieve</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-181" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Control-Lens-Internal-Context.html#t:Sellable">Sellable</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) (<a href="Control-Lens-Internal-Magma.html#t:Molten">Molten</a> i)</span> <a href="src/Control-Lens-Internal-Context.html#line-128" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Control-Lens-Internal-Bazaar.html#t:Bizarre">Bizarre</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) (<a href="Control-Lens-Internal-Magma.html#t:Molten">Molten</a> i)</span> <a href="src/Control-Lens-Internal-Bazaar.html#line-132" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i a)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-143" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i a)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-125" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad-Fix.html#t:MonadFix">MonadFix</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i a)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-149" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i a)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-133" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Apply.html#t:Apply">Apply</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i a)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-129" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Bind.html#t:Bind">Bind</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i a)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-139" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Rep">Rep</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) = (-&gt;) i</span> <a href="src/Control-Lens-Internal-Indexed.html#line-177" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Corep">Corep</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) = <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> i</span> <a href="src/Control-Lens-Internal-Indexed.html#line-186" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Classes</h1><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Corepresentable">Corepresentable</a> p, <a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad.html#t:Comonad">Comonad</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Corep">Corep</a> p), <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Corep">Corep</a> p), <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor.html#t:Strong">Strong</a> p, <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Representable">Representable</a> p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Rep">Rep</a> p), <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad-Fix.html#t:MonadFix">MonadFix</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Rep">Rep</a> p), <a href="file:///usr/share/doc/libghc-distributive-doc/html/Data-Distributive.html#t:Distributive">Distributive</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Rep">Rep</a> p), <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor.html#t:Costrong">Costrong</a> p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Arrow.html#t:ArrowLoop">ArrowLoop</a> p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Arrow.html#t:ArrowApply">ArrowApply</a> p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Arrow.html#t:ArrowChoice">ArrowChoice</a> p) =&gt; <a name="t:Conjoined" class="def">Conjoined</a> p <span class="keyword">where</span> <a href="src/Control-Lens-Internal-Indexed.html#Conjoined" class="link">Source</a></p><div class="doc"><p>This is a <code><a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a></code> that is both <code><a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Corepresentable">Corepresentable</a></code> by <code>f</code> and <code><a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Representable">Representable</a></code> by <code>g</code> such
 that <code>f</code> is left adjoint to <code>g</code>. From this you can derive a lot of structure due
 to the preservation of limits and colimits.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src">Nothing</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:distrib" class="def">distrib</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; p a b -&gt; p (f a) (f b) <a href="src/Control-Lens-Internal-Indexed.html#distrib" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-Internal-Indexed.html#t:Conjoined">Conjoined</a></code> is strong enough to let us distribute every <code><a href="Control-Lens-Internal-Indexed.html#t:Conjoined">Conjoined</a></code>
 <code><a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a></code> over every Haskell <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a></code>. This is effectively a
 generalization of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#v:fmap">fmap</a></code>.</p></div><p class="src"><a name="v:conjoined" class="def">conjoined</a> :: ((p ~ (-&gt;)) =&gt; q (a -&gt; b) r) -&gt; q (p a b) r -&gt; q (p a b) r <a href="src/Control-Lens-Internal-Indexed.html#conjoined" class="link">Source</a></p><div class="doc"><p>This permits us to make a decision at an outermost point about whether or not we use an index.</p><p>Ideally any use of this function should be done in such a way so that you compute the same answer,
 but this cannot be enforced at the type level.</p></div></div><div class="subs instances"><p id="control.i:Conjoined" class="caption collapser" onclick="toggleSection('i:Conjoined')">Instances</p><div id="section.i:Conjoined" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Control-Lens-Internal-Indexed.html#t:Conjoined">Conjoined</a> (-&gt;)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-95" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Control-Lens-Internal-Indexed.html#t:Conjoined">Conjoined</a> <a href="Control-Lens-Reified.html#t:ReifiedGetter">ReifiedGetter</a></span> <a href="src/Control-Lens-Internal-Indexed.html#line-189" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Control-Lens-Internal-Indexed.html#t:Conjoined">Conjoined</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-234" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="Control-Lens-Internal-Indexed.html#t:Conjoined">Conjoined</a> p =&gt; <a name="t:Indexable" class="def">Indexable</a> i p <span class="keyword">where</span> <a href="src/Control-Lens-Internal-Indexed.html#Indexable" class="link">Source</a></p><div class="doc"><p>This class permits overloading of function application for things that
 also admit a notion of a key or index.</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:indexed" class="def">indexed</a> :: p a b -&gt; i -&gt; a -&gt; b <a href="src/Control-Lens-Internal-Indexed.html#indexed" class="link">Source</a></p><div class="doc"><p>Build a function from an <code><a href="Control-Lens-Internal-Indexed.html#v:indexed">indexed</a></code> function.</p></div></div><div class="subs instances"><p id="control.i:Indexable" class="caption collapser" onclick="toggleSection('i:Indexable')">Instances</p><div id="section.i:Indexable" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a> i (-&gt;)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-111" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(~) * i j =&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a> i (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> j)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-238" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:3">Indexing</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Indexing" class="def">Indexing</a> f a <a href="src/Control-Lens-Internal-Indexed.html#Indexing" class="link">Source</a></p><div class="doc"><p><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a></code> composition of <code><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.4.2.0/Control-Monad-Trans-State-Lazy.html#v:State">State</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></code></code> with a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a></code>, used
 by <code><a href="Control-Lens-Indexed.html#v:indexed">indexed</a></code>.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Indexing" class="def">Indexing</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:runIndexing" class="def">runIndexing</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>, f a)</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Indexing" class="caption collapser" onclick="toggleSection('i:Indexing')">Instances</p><div id="section.i:Indexing" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexing">Indexing</a> f)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-250" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexing">Indexing</a> f)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-261" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Control-Lens-Getter.html#t:Contravariant">Contravariant</a> f =&gt; <a href="Control-Lens-Getter.html#t:Contravariant">Contravariant</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexing">Indexing</a> f)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-269" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Apply.html#t:Apply">Apply</a> f =&gt; <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Apply.html#t:Apply">Apply</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexing">Indexing</a> f)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-255" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:indexing" class="def">indexing</a> :: <a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> p =&gt; ((a -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexing">Indexing</a> f b) -&gt; s -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexing">Indexing</a> f t) -&gt; p a (f b) -&gt; s -&gt; f t <a href="src/Control-Lens-Internal-Indexed.html#indexing" class="link">Source</a></p><div class="doc"><p>Transform a <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> into an <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> or
 a <code><a href="Control-Lens-Fold.html#v:Fold">Fold</a></code> into an <code><a href="Control-Lens-Fold.html#v:IndexedFold">IndexedFold</a></code>, etc.</p><pre><code><a href="Control-Lens-Internal-Indexed.html#v:indexing">indexing</a></code> :: <code><a href="Control-Lens-Type.html#v:Traversal">Traversal</a></code> s t a b -&gt; <code><a href="Control-Lens-Type.html#v:IndexedTraversal">IndexedTraversal</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></code> s t a b
<code><a href="Control-Lens-Internal-Indexed.html#v:indexing">indexing</a></code> :: <code><a href="Control-Lens-Type.html#v:Prism">Prism</a></code> s t a b     -&gt; <code><a href="Control-Lens-Type.html#v:IndexedTraversal">IndexedTraversal</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></code> s t a b
<code><a href="Control-Lens-Internal-Indexed.html#v:indexing">indexing</a></code> :: <code><a href="Control-Lens-Type.html#v:Lens">Lens</a></code> s t a b      -&gt; <code><a href="Control-Lens-Type.html#v:IndexedLens">IndexedLens</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></code>  s t a b
<code><a href="Control-Lens-Internal-Indexed.html#v:indexing">indexing</a></code> :: <code><a href="Control-Lens-Type.html#v:Iso">Iso</a></code> s t a b       -&gt; <code><a href="Control-Lens-Type.html#v:IndexedLens">IndexedLens</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></code> s t a b
<code><a href="Control-Lens-Internal-Indexed.html#v:indexing">indexing</a></code> :: <code><a href="Control-Lens-Type.html#v:Fold">Fold</a></code> s a          -&gt; <code><a href="Control-Lens-Type.html#v:IndexedFold">IndexedFold</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></code> s a
<code><a href="Control-Lens-Internal-Indexed.html#v:indexing">indexing</a></code> :: <code><a href="Control-Lens-Type.html#v:Getter">Getter</a></code> s a        -&gt; <code><a href="Control-Lens-Type.html#v:IndexedGetter">IndexedGetter</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></code> s a
</pre><pre><code><a href="Control-Lens-Internal-Indexed.html#v:indexing">indexing</a></code> :: <code><a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></code> p =&gt; <code><a href="Control-Lens-Type.html#v:LensLike">LensLike</a></code> (<code><a href="Control-Lens-Internal-Indexed.html#t:Indexing">Indexing</a></code> f) s t a b -&gt; <code><a href="Control-Lens-Type.html#v:Over">Over</a></code> p f s t a b</pre></div></div><h1 id="g:4">64-bit Indexing</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Indexing64" class="def">Indexing64</a> f a <a href="src/Control-Lens-Internal-Indexed.html#Indexing64" class="link">Source</a></p><div class="doc"><p><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a></code> composition of <code><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.4.2.0/Control-Monad-Trans-State-Lazy.html#v:State">State</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></code></code> with a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a></code>, used
 by <code><a href="Control-Lens-Indexed.html#v:indexed64">indexed64</a></code>.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Indexing64" class="def">Indexing64</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:runIndexing64" class="def">runIndexing64</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a>, f a)</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Indexing64" class="caption collapser" onclick="toggleSection('i:Indexing64')">Instances</p><div id="section.i:Indexing64" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexing64">Indexing64</a> f)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-299" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexing64">Indexing64</a> f)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-310" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Control-Lens-Getter.html#t:Contravariant">Contravariant</a> f =&gt; <a href="Control-Lens-Getter.html#t:Contravariant">Contravariant</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexing64">Indexing64</a> f)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-318" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Apply.html#t:Apply">Apply</a> f =&gt; <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Apply.html#t:Apply">Apply</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexing64">Indexing64</a> f)</span> <a href="src/Control-Lens-Internal-Indexed.html#line-304" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:indexing64" class="def">indexing64</a> :: <a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a> p =&gt; ((a -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexing64">Indexing64</a> f b) -&gt; s -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexing64">Indexing64</a> f t) -&gt; p a (f b) -&gt; s -&gt; f t <a href="src/Control-Lens-Internal-Indexed.html#indexing64" class="link">Source</a></p><div class="doc"><p>Transform a <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> into an <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> or
 a <code><a href="Control-Lens-Fold.html#v:Fold">Fold</a></code> into an <code><a href="Control-Lens-Fold.html#v:IndexedFold">IndexedFold</a></code>, etc.</p><p>This combinator is like <code><a href="Control-Lens-Internal-Indexed.html#v:indexing">indexing</a></code> except that it handles large traversals and folds gracefully.</p><pre><code><a href="Control-Lens-Internal-Indexed.html#v:indexing64">indexing64</a></code> :: <code><a href="Control-Lens-Type.html#v:Traversal">Traversal</a></code> s t a b -&gt; <code><a href="Control-Lens-Type.html#v:IndexedTraversal">IndexedTraversal</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></code> s t a b
<code><a href="Control-Lens-Internal-Indexed.html#v:indexing64">indexing64</a></code> :: <code><a href="Control-Lens-Type.html#v:Prism">Prism</a></code> s t a b     -&gt; <code><a href="Control-Lens-Type.html#v:IndexedTraversal">IndexedTraversal</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></code> s t a b
<code><a href="Control-Lens-Internal-Indexed.html#v:indexing64">indexing64</a></code> :: <code><a href="Control-Lens-Type.html#v:Lens">Lens</a></code> s t a b      -&gt; <code><a href="Control-Lens-Type.html#v:IndexedLens">IndexedLens</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></code> s t a b
<code><a href="Control-Lens-Internal-Indexed.html#v:indexing64">indexing64</a></code> :: <code><a href="Control-Lens-Type.html#v:Iso">Iso</a></code> s t a b       -&gt; <code><a href="Control-Lens-Type.html#v:IndexedLens">IndexedLens</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></code> s t a b
<code><a href="Control-Lens-Internal-Indexed.html#v:indexing64">indexing64</a></code> :: <code><a href="Control-Lens-Type.html#v:Fold">Fold</a></code> s a          -&gt; <code><a href="Control-Lens-Type.html#v:IndexedFold">IndexedFold</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></code> s a
<code><a href="Control-Lens-Internal-Indexed.html#v:indexing64">indexing64</a></code> :: <code><a href="Control-Lens-Type.html#v:Getter">Getter</a></code> s a        -&gt; <code><a href="Control-Lens-Type.html#v:IndexedGetter">IndexedGetter</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></code> s a
</pre><pre><code><a href="Control-Lens-Internal-Indexed.html#v:indexing64">indexing64</a></code> :: <code><a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></code> p =&gt; <code><a href="Control-Lens-Type.html#v:LensLike">LensLike</a></code> (<code><a href="Control-Lens-Internal-Indexed.html#t:Indexing64">Indexing64</a></code> f) s t a b -&gt; <code><a href="Control-Lens-Type.html#v:Over">Over</a></code> p f s t a b</pre></div></div><h1 id="g:5">Converting to Folds</h1><div class="top"><p class="src"><a name="v:withIndex" class="def">withIndex</a> :: (<a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a> i p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> f) =&gt; p (i, s) (f (j, t)) -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i s (f t) <a href="src/Control-Lens-Internal-Indexed.html#withIndex" class="link">Source</a></p><div class="doc"><p>Fold a container with indices returning both the indices and the values.</p><p>The result is only valid to compose in a <code>Traversal</code>, if you don't edit the
 index as edits to the index have no effect.</p></div></div><div class="top"><p class="src"><a name="v:asIndex" class="def">asIndex</a> :: (<a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a> i p, <a href="Control-Lens-Getter.html#t:Contravariant">Contravariant</a> f, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> f) =&gt; p i (f i) -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i s (f s) <a href="src/Control-Lens-Internal-Indexed.html#asIndex" class="link">Source</a></p><div class="doc"><p>When composed with an <code>IndexedFold</code> or <code>IndexedTraversal</code> this yields an
 (<code><a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a></code>) <code>Fold</code> of the indices.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>