/usr/share/doc/libghc-lens-doc/html/Data-Sequence-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 | <!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.Sequence.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-Sequence-Lens.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Sequence-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 <ekmett@gmail.com></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">Data.Sequence.Lens</p></div><div id="description"><p class="caption">Description</p><div class="doc empty"> </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:viewL">viewL</a> :: <a href="Control-Lens-Type.html#t:Iso">Iso</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> b) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:ViewL">ViewL</a> a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:ViewL">ViewL</a> b)</li><li class="src short"><a href="#v:viewR">viewR</a> :: <a href="Control-Lens-Type.html#t:Iso">Iso</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> b) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:ViewR">ViewR</a> a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:ViewR">ViewR</a> b)</li><li class="src short"><a href="#v:sliced">sliced</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Control-Lens-Type.html#t:IndexedTraversal-39-">IndexedTraversal'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a) a</li><li class="src short"><a href="#v:slicedTo">slicedTo</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Control-Lens-Type.html#t:IndexedTraversal-39-">IndexedTraversal'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a) a</li><li class="src short"><a href="#v:slicedFrom">slicedFrom</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Control-Lens-Type.html#t:IndexedTraversal-39-">IndexedTraversal'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a) a</li><li class="src short"><a href="#v:seqOf">seqOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a) s a -> s -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:viewL" class="def">viewL</a> :: <a href="Control-Lens-Type.html#t:Iso">Iso</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> b) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:ViewL">ViewL</a> a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:ViewL">ViewL</a> b) <a href="src/Data-Sequence-Lens.html#viewL" class="link">Source</a> <a href="#v:viewL" class="selflink">#</a></p><div class="doc"><p>A <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a></code> is isomorphic to a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:ViewL">ViewL</a></code></p><pre><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#v:viewl">viewl</a></code> m ≡ m <code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code> <code><a href="Data-Sequence-Lens.html#v:viewL">viewL</a></code></pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>Seq.fromList [a,b,c] ^. viewL
</code></strong>a :< fromList [b,c]
</pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>Seq.empty ^. viewL
</code></strong>EmptyL
</pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>EmptyL ^. from viewL
</code></strong>fromList []
</pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>review viewL $ a Seq.:< fromList [b,c]
</code></strong>fromList [a,b,c]
</pre></div></div><div class="top"><p class="src"><a id="v:viewR" class="def">viewR</a> :: <a href="Control-Lens-Type.html#t:Iso">Iso</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> b) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:ViewR">ViewR</a> a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:ViewR">ViewR</a> b) <a href="src/Data-Sequence-Lens.html#viewR" class="link">Source</a> <a href="#v:viewR" class="selflink">#</a></p><div class="doc"><p>A <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a></code> is isomorphic to a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:ViewR">ViewR</a></code></p><pre><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#v:viewr">viewr</a></code> m ≡ m <code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code> <code><a href="Data-Sequence-Lens.html#v:viewR">viewR</a></code></pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>Seq.fromList [a,b,c] ^. viewR
</code></strong>fromList [a,b] :> c
</pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>Seq.empty ^. viewR
</code></strong>EmptyR
</pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>EmptyR ^. from viewR
</code></strong>fromList []
</pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>review viewR $ fromList [a,b] Seq.:> c
</code></strong>fromList [a,b,c]
</pre></div></div><div class="top"><p class="src"><a id="v:sliced" class="def">sliced</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Control-Lens-Type.html#t:IndexedTraversal-39-">IndexedTraversal'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a) a <a href="src/Data-Sequence-Lens.html#sliced" class="link">Source</a> <a href="#v:sliced" class="selflink">#</a></p><div class="doc"><p>Traverse all the elements numbered from <code>i</code> to <code>j</code> of a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a></code></p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>fromList [a,b,c,d,e] & sliced 1 3 %~ f
</code></strong>fromList [a,f b,f c,d,e]
</pre></div></div><div class="top"><p class="src"><a id="v:slicedTo" class="def">slicedTo</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Control-Lens-Type.html#t:IndexedTraversal-39-">IndexedTraversal'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a) a <a href="src/Data-Sequence-Lens.html#slicedTo" class="link">Source</a> <a href="#v:slicedTo" class="selflink">#</a></p><div class="doc"><p>Traverse the first <code>n</code> elements of a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a></code></p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>fromList [a,b,c,d,e] ^.. slicedTo 2
</code></strong>[a,b]
</pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>fromList [a,b,c,d,e] & slicedTo 2 %~ f
</code></strong>fromList [f a,f b,c,d,e]
</pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>fromList [a,b,c,d,e] & slicedTo 10 .~ x
</code></strong>fromList [x,x,x,x,x]
</pre></div></div><div class="top"><p class="src"><a id="v:slicedFrom" class="def">slicedFrom</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Control-Lens-Type.html#t:IndexedTraversal-39-">IndexedTraversal'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a) a <a href="src/Data-Sequence-Lens.html#slicedFrom" class="link">Source</a> <a href="#v:slicedFrom" class="selflink">#</a></p><div class="doc"><p>Traverse all but the first <code>n</code> elements of a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a></code></p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>fromList [a,b,c,d,e] ^.. slicedFrom 2
</code></strong>[c,d,e]
</pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>fromList [a,b,c,d,e] & slicedFrom 2 %~ f
</code></strong>fromList [a,b,f c,f d,f e]
</pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>fromList [a,b,c,d,e] & slicedFrom 10 .~ x
</code></strong>fromList [a,b,c,d,e]
</pre></div></div><div class="top"><p class="src"><a id="v:seqOf" class="def">seqOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a) s a -> s -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a> a <a href="src/Data-Sequence-Lens.html#seqOf" class="link">Source</a> <a href="#v:seqOf" class="selflink">#</a></p><div class="doc"><p>Construct a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a></code> from a <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code>, <code><a href="Control-Lens-Fold.html#v:Fold">Fold</a></code>, <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code>, <code><a href="Control-Lens-Lens.html#v:Lens">Lens</a></code> or <code><a href="Control-Lens-Iso.html#v:Iso">Iso</a></code>.</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>seqOf folded ["hello","world"]
</code></strong>fromList ["hello","world"]
</pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>seqOf (folded._2) [("hello",1),("world",2),("!!!",3)]
</code></strong>fromList [1,2,3]
</pre><pre><code><a href="Data-Sequence-Lens.html#v:seqOf">seqOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> s a -> s -> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a></code> a
<code><a href="Data-Sequence-Lens.html#v:seqOf">seqOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> s a -> s -> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a></code> a
<code><a href="Data-Sequence-Lens.html#v:seqOf">seqOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -> s -> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a></code> a
<code><a href="Data-Sequence-Lens.html#v:seqOf">seqOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Lens-39-">Lens'</a></code> s a -> s -> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a></code> a
<code><a href="Data-Sequence-Lens.html#v:seqOf">seqOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Traversal-39-">Traversal'</a></code> s a -> s -> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Sequence.html#t:Seq">Seq</a></code> a
</pre></div></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>
|