/
System-FilePath-Lens.html
56 lines (56 loc) · 26.1 KB
/
System-FilePath-Lens.html
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
<!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>System.FilePath.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_System-FilePath-Lens.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/System-FilePath-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-2.8: 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>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett <ekmett@gmail.com></td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">System.FilePath.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:-60--47--62--126-">(</>~)</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> a -> b</li><li class="src short"><a href="#v:-60--60--47--62--126-">(<</>~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a>) a b <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> a -> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a>, b)</li><li class="src short"><a href="#v:-60-.-62--126-">(<.>~)</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -> a -> b</li><li class="src short"><a href="#v:-60--60-.-62--126-">(<<.>~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a>) a b <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -> a -> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a>, b)</li><li class="src short"><a href="#v:-60--47--62--61-">(</>=)</a> :: MonadState a m => <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> m ()</li><li class="src short"><a href="#v:-60--60--47--62--61-">(<</>=)</a> :: MonadState a m => <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a>) a <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> m <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:-60-.-62--61-">(<.>=)</a> :: MonadState a m => <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -> m ()</li><li class="src short"><a href="#v:-60--60-.-62--61-">(<<.>=)</a> :: MonadState a m => <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a>) a <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -> m <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:basename">basename</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:directory">directory</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:extension">extension</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:filename">filename</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:-60--47--62--126-" class="def">(</>~)</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> a -> b<a href="src/System-FilePath-Lens.html#%3C%2F%3E~" class="link">Source</a></p><div class="doc"><p>Modify the path by adding another path.
</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>:m + Control.Lens
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>both </>~ "!!!" $ ("hello","world")
</code></strong>("hello/!!!","world/!!!")
</pre><pre>
(<code><a href="System-FilePath-Lens.html#v:-60--47--62--126-"></>~</a></code>) :: <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> a b <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> a -> b
(<code><a href="System-FilePath-Lens.html#v:-60--47--62--126-"></>~</a></code>) :: <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a b <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> a -> b
(<code><a href="System-FilePath-Lens.html#v:-60--47--62--126-"></>~</a></code>) :: <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a b <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> a -> b
(<code><a href="System-FilePath-Lens.html#v:-60--47--62--126-"></>~</a></code>) :: <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> a -> b
</pre></div></div><div class="top"><p class="src"><a name="v:-60--60--47--62--126-" class="def">(<</>~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a>) a b <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> a -> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a>, b)<a href="src/System-FilePath-Lens.html#%3C%3C%2F%3E~" class="link">Source</a></p><div class="doc"><p>Add a path onto the end of the target of a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> and return the result
</p><p>When you do not need the result of the operation, (<code><a href="System-FilePath-Lens.html#v:-60--47--62--126-"></>~</a></code>) is more flexible.
</p></div></div><div class="top"><p class="src"><a name="v:-60-.-62--126-" class="def">(<.>~)</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -> a -> b<a href="src/System-FilePath-Lens.html#%3C.%3E~" class="link">Source</a></p><div class="doc"><p>Modify the path by adding extension.
</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>:m + Control.Lens
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>both <.>~ "!!!" $ ("hello","world")
</code></strong>("hello.!!!","world.!!!")
</pre><pre>
(<code><a href="System-FilePath-Lens.html#v:-60-.-62--126-"><.>~</a></code>) :: <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> a b <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a></code> -> a -> b
(<code><a href="System-FilePath-Lens.html#v:-60-.-62--126-"><.>~</a></code>) :: <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a b <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a></code> -> a -> b
(<code><a href="System-FilePath-Lens.html#v:-60-.-62--126-"><.>~</a></code>) :: <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a b <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a></code> -> a -> b
(<code><a href="System-FilePath-Lens.html#v:-60-.-62--126-"><.>~</a></code>) :: <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a></code> -> a -> b
</pre></div></div><div class="top"><p class="src"><a name="v:-60--60-.-62--126-" class="def">(<<.>~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a>) a b <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -> a -> (<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a>, b)<a href="src/System-FilePath-Lens.html#%3C%3C.%3E~" class="link">Source</a></p><div class="doc"><p>Add an extension onto the end of the target of a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> and return the result
</p><p>When you do not need the result of the operation, (<code><a href="System-FilePath-Lens.html#v:-60-.-62--126-"><.>~</a></code>) is more flexible.
</p></div></div><div class="top"><p class="src"><a name="v:-60--47--62--61-" class="def">(</>=)</a> :: MonadState a m => <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> m ()<a href="src/System-FilePath-Lens.html#%3C%2F%3E%3D" class="link">Source</a></p><div class="doc"><p>Modify the target(s) of a <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code>, <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> or <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> by adding a path.
</p><pre>
(<code><a href="System-FilePath-Lens.html#v:-60--47--62--61-"></>=</a></code>) :: <code>MonadState</code> a m => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> a <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> m ()
(<code><a href="System-FilePath-Lens.html#v:-60--47--62--61-"></>=</a></code>) :: <code>MonadState</code> a m => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> m ()
(<code><a href="System-FilePath-Lens.html#v:-60--47--62--61-"></>=</a></code>) :: <code>MonadState</code> a m => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> m ()
(<code><a href="System-FilePath-Lens.html#v:-60--47--62--61-"></>=</a></code>) :: <code>MonadState</code> a m => <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 <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> m ()
</pre></div></div><div class="top"><p class="src"><a name="v:-60--60--47--62--61-" class="def">(<</>=)</a> :: MonadState a m => <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a>) a <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> m <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a><a href="src/System-FilePath-Lens.html#%3C%3C%2F%3E%3D" class="link">Source</a></p><div class="doc"><p>Add a path onto the end of the target of a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> into
your monad's state and return the result.
</p><p>When you do not need the result of the operation, (<code><a href="System-FilePath-Lens.html#v:-60--47--62--61-"></>=</a></code>) is more flexible.
</p></div></div><div class="top"><p class="src"><a name="v:-60-.-62--61-" class="def">(<.>=)</a> :: MonadState a m => <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -> m ()<a href="src/System-FilePath-Lens.html#%3C.%3E%3D" class="link">Source</a></p><div class="doc"><p>Modify the target(s) of a <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code>, <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> or <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> by adding an extension.
</p><pre>
(<code><a href="System-FilePath-Lens.html#v:-60-.-62--61-"><.>=</a></code>) :: <code>MonadState</code> a m => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> a <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a></code> -> m ()
(<code><a href="System-FilePath-Lens.html#v:-60-.-62--61-"><.>=</a></code>) :: <code>MonadState</code> a m => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a></code> -> m ()
(<code><a href="System-FilePath-Lens.html#v:-60-.-62--61-"><.>=</a></code>) :: <code>MonadState</code> a m => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a></code> -> m ()
(<code><a href="System-FilePath-Lens.html#v:-60-.-62--61-"><.>=</a></code>) :: <code>MonadState</code> a m => <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 <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a></code> -> m ()
</pre></div></div><div class="top"><p class="src"><a name="v:-60--60-.-62--61-" class="def">(<<.>=)</a> :: MonadState a m => <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a>) a <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> -> m <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a><a href="src/System-FilePath-Lens.html#%3C%3C.%3E%3D" class="link">Source</a></p><div class="doc"><p>Add an extension onto the end of the target of a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> into
your monad's state and return the result.
</p><p>When you do not need the result of the operation, (<code><a href="System-FilePath-Lens.html#v:-60-.-62--61-"><.>=</a></code>) is more flexible.
</p></div></div><div class="top"><p class="src"><a name="v:basename" class="def">basename</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a><a href="src/System-FilePath-Lens.html#basename" class="link">Source</a></p><div class="doc"><p>A lens reading and writing to the basename.
</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>basename .~ "filename" $ "path/name.png"
</code></strong>"path/filename.png"
</pre></div></div><div class="top"><p class="src"><a name="v:directory" class="def">directory</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a><a href="src/System-FilePath-Lens.html#directory" class="link">Source</a></p><div class="doc"><p>A lens reading and writing to the directory.
</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>"long/path/name.txt" ^. directory
</code></strong>"long/path"
</pre></div></div><div class="top"><p class="src"><a name="v:extension" class="def">extension</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a><a href="src/System-FilePath-Lens.html#extension" class="link">Source</a></p><div class="doc"><p>A lens reading and writing to the extension.
</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>extension .~ ".png" $ "path/name.txt"
</code></strong>"path/name.png"
</pre></div></div><div class="top"><p class="src"><a name="v:filename" class="def">filename</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/System-IO.html#t:FilePath">FilePath</a><a href="src/System-FilePath-Lens.html#filename" class="link">Source</a></p><div class="doc"><p>A lens reading and writing to the full filename.
</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>filename .~ "name.txt" $ "path/name.png"
</code></strong>"path/name.txt"
</pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.12.0</p></div></body></html>