This file is indexed.

/usr/share/doc/libghc-lens-doc/html/Data-List-Lens.html is in libghc-lens-doc 4.15.4-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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!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>Data.List.Lens</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-List-Lens.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-List-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-4.15.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>(C) 2012-16 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>provisional</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Data.List.Lens</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Traversals for manipulating parts of a list.</p><p>Additional optics for manipulating lists are present more
 generically in this package.</p><p>The <code><a href="Control-Lens-At.html#v:Ixed">Ixed</a></code> class allows traversing the element at a
 specific list index.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[0..10] ^? ix 4
</code></strong>Just 4
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[0..5] &amp; ix 4 .~ 2
</code></strong>[0,1,2,3,2,5]
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[0..10] ^? ix 14
</code></strong>Nothing
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[0..5] &amp; ix 14 .~ 2
</code></strong>[0,1,2,3,4,5]
</pre><p>The <code><a href="Control-Lens-Cons.html#v:Cons">Cons</a></code> and <code><a href="Control-Lens-Empty.html#v:AsEmpty">AsEmpty</a></code>
 classes provide <code><a href="Control-Lens-Prism.html#v:Prism">Prism</a></code>s for list constructors.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[1..10] ^? _Cons
</code></strong>Just (1,[2,3,4,5,6,7,8,9,10])
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[] ^? _Cons
</code></strong>Nothing
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[] ^? _Empty
</code></strong>Just ()
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>_Cons # (1, _Empty # ()) :: [Int]
</code></strong>[1]
</pre><p>Additionally, <code><a href="Control-Lens-Cons.html#v:Snoc">Snoc</a></code> provides a
 <code><a href="Control-Lens-Prism.html#v:Prism">Prism</a></code> for accessing the end of a list. Note
 that this <code><a href="Control-Lens-Prism.html#v:Prism">Prism</a></code> always will need to traverse
 the whole list.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[1..5] ^? _Snoc
</code></strong>Just ([1,2,3,4],5)
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>_Snoc # ([1,2],5)
</code></strong>[1,2,5]
</pre><p>An instance of <code><a href="Control-Lens-Plated.html#v:Plated">Plated</a></code> allows for finding
 locations in the list where a traversal matches.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[Nothing, Just 7, Just 3, Nothing] &amp; deep (ix 0 . _Just) +~ 10
</code></strong>[Nothing,Just 17,Just 3,Nothing]
</pre><p>An instance of <code><a href="Control-Lens-Iso.html#v:Reversing">Reversing</a></code> provides an
 <code><a href="Control-Lens-Iso.html#v:Iso">Iso</a></code> between a list and its reverse.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;live&quot; &amp; reversed %~ ('d':)
</code></strong>&quot;lived&quot;
</pre><p>Finally, it's possible to traverse, fold over, and map over
 index-value pairs thanks to instances of
 <code><a href="Control-Lens-Indexed.html#v:TraversableWithIndex">TraversableWithIndex</a></code>,
 <code><a href="Control-Lens-Indexed.html#v:FoldableWithIndex">FoldableWithIndex</a></code>, and
 <code><a href="Control-Lens-Indexed.html#v:FunctorWithIndex">FunctorWithIndex</a></code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>imap (,) &quot;Hello&quot;
</code></strong>[(0,'H'),(1,'e'),(2,'l'),(3,'l'),(4,'o')]
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>ifoldMap replicate &quot;Hello&quot;
</code></strong>&quot;ellllloooo&quot;
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>itraverse_ (curry print) &quot;Hello&quot;
</code></strong>(0,'H')
(1,'e')
(2,'l')
(3,'l')
(4,'o')
</pre></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:prefixed">prefixed</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> [a] [a]</li><li class="src short"><a href="#v:suffixed">suffixed</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> [a] [a]</li><li class="src short"><a href="#v:stripSuffix">stripSuffix</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [a]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:prefixed" class="def">prefixed</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> [a] [a] <a href="src/Data-List-Lens.html#prefixed" class="link">Source</a> <a href="#v:prefixed" class="selflink">#</a></p><div class="doc"><p>A <code><a href="Control-Lens-Type.html#t:Prism">Prism</a></code> stripping a prefix from a list when used as a <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code>, or
 prepending that prefix when run backwards:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;preview&quot; ^? prefixed &quot;pre&quot;
</code></strong>Just &quot;view&quot;
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;review&quot; ^? prefixed &quot;pre&quot;
</code></strong>Nothing
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>prefixed &quot;pre&quot; # &quot;amble&quot;
</code></strong>&quot;preamble&quot;
</pre></div></div><div class="top"><p class="src"><a id="v:suffixed" class="def">suffixed</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> [a] [a] <a href="src/Data-List-Lens.html#suffixed" class="link">Source</a> <a href="#v:suffixed" class="selflink">#</a></p><div class="doc"><p>A <code><a href="Control-Lens-Type.html#t:Prism">Prism</a></code> stripping a suffix from a list when used as a <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code>, or
 appending that suffix when run backwards:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;review&quot; ^? suffixed &quot;view&quot;
</code></strong>Just &quot;re&quot;
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;review&quot; ^? suffixed &quot;tire&quot;
</code></strong>Nothing
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>suffixed &quot;.o&quot; # &quot;hello&quot;
</code></strong>&quot;hello.o&quot;
</pre></div></div><div class="top"><p class="src"><a id="v:stripSuffix" class="def">stripSuffix</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; [a] -&gt; [a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [a] <a href="src/Data-List-Lens.html#stripSuffix" class="link">Source</a> <a href="#v:stripSuffix" class="selflink">#</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>