Lastest docs updated
travis build: 87
commit: 1a2c77c6a6
auto-pushed to gh-pages
This commit is contained in:
parent
e630a6ee28
commit
95c6a84dfe
@ -1,6 +0,0 @@
|
||||
<!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>HPath.IO.Utils</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_HPath-IO-Utils.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HPath-IO-Utils.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">hpath-0.8.0: Support for well-typed paths</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>© 2016 Julian Ospald</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>Julian Ospald <hasufell@posteo.de></td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HPath.IO.Utils</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Random and general IO/monad utilities.</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"><a href="#v:whenM">whenM</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/Control-Monad.html#t:Monad">Monad</a> m => m <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/Data-Bool.html#t:Bool">Bool</a> -> m () -> m ()</li><li class="src short"><a href="#v:unlessM">unlessM</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/Control-Monad.html#t:Monad">Monad</a> m => m <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/Data-Bool.html#t:Bool">Bool</a> -> m () -> m ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:whenM" class="def">whenM</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/Control-Monad.html#t:Monad">Monad</a> m => m <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/Data-Bool.html#t:Bool">Bool</a> -> m () -> m () <a href="src/HPath-IO-Utils.html#whenM" class="link">Source</a> <a href="#v:whenM" class="selflink">#</a></p><div class="doc"><p>If the value of the first argument is True, then execute the action
|
||||
provided in the second argument, otherwise do nothing.</p></div></div><div class="top"><p class="src"><a id="v:unlessM" class="def">unlessM</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/Control-Monad.html#t:Monad">Monad</a> m => m <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/Data-Bool.html#t:Bool">Bool</a> -> m () -> m () <a href="src/HPath-IO-Utils.html#unlessM" class="link">Source</a> <a href="#v:unlessM" class="selflink">#</a></p><div class="doc"><p>If the value of the first argument is False, then execute the action
|
||||
provided in the second argument, otherwise do nothing.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>
|
@ -74,7 +74,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_HPath.html");};
|
||||
</code></strong>Just "dod"
|
||||
<code class="prompt">>>> </code><strong class="userinput"><code>basename (MkPath "/") :: Maybe (Path Fn)
|
||||
</code></strong>Nothing
|
||||
</pre></div></div><div class="top"><p class="src"><a id="v:dirname" class="def">dirname</a> :: <a href="HPath.html#t:Path">Path</a> <a href="HPath.html#t:Abs">Abs</a> -> <a href="HPath.html#t:Path">Path</a> <a href="HPath.html#t:Abs">Abs</a> <a href="src/HPath.html#dirname" class="link">Source</a> <a href="#v:dirname" class="selflink">#</a></p><div class="doc"><p>Extract the directory name of a path.</p><p>The following properties hold:</p><pre>dirname (p </> a) == dirname p</pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>dirname (MkPath "/abc/def/dod")
|
||||
</pre></div></div><div class="top"><p class="src"><a id="v:dirname" class="def">dirname</a> :: <a href="HPath.html#t:Path">Path</a> <a href="HPath.html#t:Abs">Abs</a> -> <a href="HPath.html#t:Path">Path</a> <a href="HPath.html#t:Abs">Abs</a> <a href="src/HPath.html#dirname" class="link">Source</a> <a href="#v:dirname" class="selflink">#</a></p><div class="doc"><p>Extract the directory name of a path.</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>dirname (MkPath "/abc/def/dod")
|
||||
</code></strong>"/abc/def"
|
||||
<code class="prompt">>>> </code><strong class="userinput"><code>dirname (MkPath "/")
|
||||
</code></strong>"/"
|
||||
|
BIN
hpath.haddock
BIN
hpath.haddock
Binary file not shown.
@ -1,4 +0,0 @@
|
||||
<!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>HPath.IO.Utils</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HPath.IO.Utils</p></div><div id="interface"><div class="top"><p class="src"><a href="HPath-IO-Utils.html#v:whenM" target="main">whenM</a></p></div><div class="top"><p class="src"><a href="HPath-IO-Utils.html#v:unlessM" target="main">unlessM</a></p></div></div></body></html>
|
@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
|
||||
<title>src/HPath/IO/Utils.hs</title>
|
||||
<link type='text/css' rel='stylesheet' href='hscolour.css' />
|
||||
</head>
|
||||
<body>
|
||||
<pre><a name="line-1"></a><span class='hs-comment'>-- |</span>
|
||||
<a name="line-2"></a><span class='hs-comment'>-- Module : HPath.IO.Utils</span>
|
||||
<a name="line-3"></a><span class='hs-comment'>-- Copyright : © 2016 Julian Ospald</span>
|
||||
<a name="line-4"></a><span class='hs-comment'>-- License : BSD3</span>
|
||||
<a name="line-5"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-6"></a><span class='hs-comment'>-- Maintainer : Julian Ospald <hasufell@posteo.de></span>
|
||||
<a name="line-7"></a><span class='hs-comment'>-- Stability : experimental</span>
|
||||
<a name="line-8"></a><span class='hs-comment'>-- Portability : portable</span>
|
||||
<a name="line-9"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-10"></a><span class='hs-comment'>-- Random and general IO/monad utilities.</span>
|
||||
<a name="line-11"></a>
|
||||
<a name="line-12"></a>
|
||||
<a name="line-13"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span> <span class='hs-keyword'>where</span>
|
||||
<a name="line-14"></a>
|
||||
<a name="line-15"></a>
|
||||
<a name="line-16"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Monad</span>
|
||||
<a name="line-17"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-18"></a> <span class='hs-varid'>when</span>
|
||||
<a name="line-19"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>unless</span>
|
||||
<a name="line-20"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-21"></a>
|
||||
<a name="line-22"></a>
|
||||
<a name="line-23"></a><a name="whenM"></a><span class='hs-comment'>-- |If the value of the first argument is True, then execute the action</span>
|
||||
<a name="line-24"></a><span class='hs-comment'>-- provided in the second argument, otherwise do nothing.</span>
|
||||
<a name="line-25"></a><span class='hs-definition'>whenM</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Monad</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=></span> <span class='hs-varid'>m</span> <span class='hs-conid'>Bool</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>m</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>m</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-26"></a><span class='hs-definition'>whenM</span> <span class='hs-varid'>mb</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>mb</span> <span class='hs-varop'>>>=</span> <span class='hs-layout'>(</span><span class='hs-varop'>`when`</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span>
|
||||
<a name="line-27"></a>
|
||||
<a name="line-28"></a>
|
||||
<a name="line-29"></a><a name="unlessM"></a><span class='hs-comment'>-- |If the value of the first argument is False, then execute the action</span>
|
||||
<a name="line-30"></a><span class='hs-comment'>-- provided in the second argument, otherwise do nothing.</span>
|
||||
<a name="line-31"></a><span class='hs-definition'>unlessM</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Monad</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=></span> <span class='hs-varid'>m</span> <span class='hs-conid'>Bool</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>m</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>m</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-32"></a><span class='hs-definition'>unlessM</span> <span class='hs-varid'>mb</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>mb</span> <span class='hs-varop'>>>=</span> <span class='hs-layout'>(</span><span class='hs-varop'>`unless`</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span>
|
||||
</pre></body>
|
||||
</html>
|
@ -323,63 +323,59 @@
|
||||
<a name="line-314"></a>
|
||||
<a name="line-315"></a><a name="dirname"></a><span class='hs-comment'>-- | Extract the directory name of a path.</span>
|
||||
<a name="line-316"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-317"></a><span class='hs-comment'>-- The following properties hold:</span>
|
||||
<a name="line-318"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-319"></a><span class='hs-comment'>-- @dirname (p \<\/> a) == dirname p@</span>
|
||||
<a name="line-320"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-321"></a><span class='hs-comment'>-- >>> dirname (MkPath "/abc/def/dod")</span>
|
||||
<a name="line-322"></a><span class='hs-comment'>-- "/abc/def"</span>
|
||||
<a name="line-323"></a><span class='hs-comment'>-- >>> dirname (MkPath "/")</span>
|
||||
<a name="line-324"></a><span class='hs-comment'>-- "/"</span>
|
||||
<a name="line-325"></a><span class='hs-definition'>dirname</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span>
|
||||
<a name="line-326"></a><span class='hs-definition'>dirname</span> <span class='hs-layout'>(</span><span class='hs-conid'>MkPath</span> <span class='hs-varid'>fp</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkPath</span> <span class='hs-layout'>(</span><span class='hs-varid'>takeDirectory</span> <span class='hs-varop'>$</span> <span class='hs-varid'>dropTrailingPathSeparator</span> <span class='hs-varid'>fp</span><span class='hs-layout'>)</span>
|
||||
<a name="line-327"></a>
|
||||
<a name="line-328"></a><a name="basename"></a><span class='hs-comment'>-- | Extract the file part of a path.</span>
|
||||
<a name="line-329"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-317"></a><span class='hs-comment'>-- >>> dirname (MkPath "/abc/def/dod")</span>
|
||||
<a name="line-318"></a><span class='hs-comment'>-- "/abc/def"</span>
|
||||
<a name="line-319"></a><span class='hs-comment'>-- >>> dirname (MkPath "/")</span>
|
||||
<a name="line-320"></a><span class='hs-comment'>-- "/"</span>
|
||||
<a name="line-321"></a><span class='hs-definition'>dirname</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span>
|
||||
<a name="line-322"></a><span class='hs-definition'>dirname</span> <span class='hs-layout'>(</span><span class='hs-conid'>MkPath</span> <span class='hs-varid'>fp</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkPath</span> <span class='hs-layout'>(</span><span class='hs-varid'>takeDirectory</span> <span class='hs-varop'>$</span> <span class='hs-varid'>dropTrailingPathSeparator</span> <span class='hs-varid'>fp</span><span class='hs-layout'>)</span>
|
||||
<a name="line-323"></a>
|
||||
<a name="line-324"></a><a name="basename"></a><span class='hs-comment'>-- | Extract the file part of a path.</span>
|
||||
<a name="line-325"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-326"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-327"></a><span class='hs-comment'>-- The following properties hold:</span>
|
||||
<a name="line-328"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-329"></a><span class='hs-comment'>-- @basename (p \<\/> a) == basename a@</span>
|
||||
<a name="line-330"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-331"></a><span class='hs-comment'>-- The following properties hold:</span>
|
||||
<a name="line-331"></a><span class='hs-comment'>-- Throws: `PathException` if given the root path "/"</span>
|
||||
<a name="line-332"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-333"></a><span class='hs-comment'>-- @basename (p \<\/> a) == basename a@</span>
|
||||
<a name="line-334"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-335"></a><span class='hs-comment'>-- Throws: `PathException` if given the root path "/"</span>
|
||||
<a name="line-336"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-337"></a><span class='hs-comment'>-- >>> basename (MkPath "/abc/def/dod") :: Maybe (Path Fn)</span>
|
||||
<a name="line-338"></a><span class='hs-comment'>-- Just "dod"</span>
|
||||
<a name="line-339"></a><span class='hs-comment'>-- >>> basename (MkPath "/abc/def/dod/") :: Maybe (Path Fn)</span>
|
||||
<a name="line-340"></a><span class='hs-comment'>-- Just "dod"</span>
|
||||
<a name="line-341"></a><span class='hs-comment'>-- >>> basename (MkPath "/") :: Maybe (Path Fn)</span>
|
||||
<a name="line-342"></a><span class='hs-comment'>-- Nothing</span>
|
||||
<a name="line-343"></a><span class='hs-definition'>basename</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MonadThrow</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>Path</span> <span class='hs-varid'>b</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>m</span> <span class='hs-layout'>(</span><span class='hs-conid'>Path</span> <span class='hs-conid'>Fn</span><span class='hs-layout'>)</span>
|
||||
<a name="line-344"></a><span class='hs-definition'>basename</span> <span class='hs-layout'>(</span><span class='hs-conid'>MkPath</span> <span class='hs-varid'>l</span><span class='hs-layout'>)</span>
|
||||
<a name="line-345"></a> <span class='hs-keyglyph'>|</span> <span class='hs-varid'>not</span> <span class='hs-layout'>(</span><span class='hs-varid'>isAbsolute</span> <span class='hs-varid'>rl</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>MkPath</span> <span class='hs-varid'>rl</span>
|
||||
<a name="line-346"></a> <span class='hs-keyglyph'>|</span> <span class='hs-varid'>otherwise</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>throwM</span> <span class='hs-conid'>RootDirHasNoBasename</span>
|
||||
<a name="line-347"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-348"></a> <span class='hs-varid'>rl</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>last</span> <span class='hs-varop'>.</span> <span class='hs-varid'>splitPath</span> <span class='hs-varop'>.</span> <span class='hs-varid'>dropTrailingPathSeparator</span> <span class='hs-varop'>$</span> <span class='hs-varid'>l</span>
|
||||
<a name="line-333"></a><span class='hs-comment'>-- >>> basename (MkPath "/abc/def/dod") :: Maybe (Path Fn)</span>
|
||||
<a name="line-334"></a><span class='hs-comment'>-- Just "dod"</span>
|
||||
<a name="line-335"></a><span class='hs-comment'>-- >>> basename (MkPath "/abc/def/dod/") :: Maybe (Path Fn)</span>
|
||||
<a name="line-336"></a><span class='hs-comment'>-- Just "dod"</span>
|
||||
<a name="line-337"></a><span class='hs-comment'>-- >>> basename (MkPath "/") :: Maybe (Path Fn)</span>
|
||||
<a name="line-338"></a><span class='hs-comment'>-- Nothing</span>
|
||||
<a name="line-339"></a><span class='hs-definition'>basename</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MonadThrow</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>Path</span> <span class='hs-varid'>b</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>m</span> <span class='hs-layout'>(</span><span class='hs-conid'>Path</span> <span class='hs-conid'>Fn</span><span class='hs-layout'>)</span>
|
||||
<a name="line-340"></a><span class='hs-definition'>basename</span> <span class='hs-layout'>(</span><span class='hs-conid'>MkPath</span> <span class='hs-varid'>l</span><span class='hs-layout'>)</span>
|
||||
<a name="line-341"></a> <span class='hs-keyglyph'>|</span> <span class='hs-varid'>not</span> <span class='hs-layout'>(</span><span class='hs-varid'>isAbsolute</span> <span class='hs-varid'>rl</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>MkPath</span> <span class='hs-varid'>rl</span>
|
||||
<a name="line-342"></a> <span class='hs-keyglyph'>|</span> <span class='hs-varid'>otherwise</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>throwM</span> <span class='hs-conid'>RootDirHasNoBasename</span>
|
||||
<a name="line-343"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-344"></a> <span class='hs-varid'>rl</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>last</span> <span class='hs-varop'>.</span> <span class='hs-varid'>splitPath</span> <span class='hs-varop'>.</span> <span class='hs-varid'>dropTrailingPathSeparator</span> <span class='hs-varop'>$</span> <span class='hs-varid'>l</span>
|
||||
<a name="line-345"></a>
|
||||
<a name="line-346"></a>
|
||||
<a name="line-347"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
|
||||
<a name="line-348"></a><span class='hs-comment'>-- Path IO helpers</span>
|
||||
<a name="line-349"></a>
|
||||
<a name="line-350"></a>
|
||||
<a name="line-351"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
|
||||
<a name="line-352"></a><span class='hs-comment'>-- Path IO helpers</span>
|
||||
<a name="line-351"></a><a name="withAbsPath"></a><span class='hs-definition'>withAbsPath</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span>
|
||||
<a name="line-352"></a><span class='hs-definition'>withAbsPath</span> <span class='hs-layout'>(</span><span class='hs-conid'>MkPath</span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span> <span class='hs-varid'>action</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>action</span> <span class='hs-varid'>p</span>
|
||||
<a name="line-353"></a>
|
||||
<a name="line-354"></a>
|
||||
<a name="line-355"></a><a name="withAbsPath"></a><span class='hs-definition'>withAbsPath</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span>
|
||||
<a name="line-356"></a><span class='hs-definition'>withAbsPath</span> <span class='hs-layout'>(</span><span class='hs-conid'>MkPath</span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span> <span class='hs-varid'>action</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>action</span> <span class='hs-varid'>p</span>
|
||||
<a name="line-355"></a><a name="withRelPath"></a><span class='hs-definition'>withRelPath</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Path</span> <span class='hs-conid'>Rel</span> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span>
|
||||
<a name="line-356"></a><span class='hs-definition'>withRelPath</span> <span class='hs-layout'>(</span><span class='hs-conid'>MkPath</span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span> <span class='hs-varid'>action</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>action</span> <span class='hs-varid'>p</span>
|
||||
<a name="line-357"></a>
|
||||
<a name="line-358"></a>
|
||||
<a name="line-359"></a><a name="withRelPath"></a><span class='hs-definition'>withRelPath</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Path</span> <span class='hs-conid'>Rel</span> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span>
|
||||
<a name="line-360"></a><span class='hs-definition'>withRelPath</span> <span class='hs-layout'>(</span><span class='hs-conid'>MkPath</span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span> <span class='hs-varid'>action</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>action</span> <span class='hs-varid'>p</span>
|
||||
<a name="line-359"></a><a name="withFnPath"></a><span class='hs-definition'>withFnPath</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Path</span> <span class='hs-conid'>Fn</span> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span>
|
||||
<a name="line-360"></a><span class='hs-definition'>withFnPath</span> <span class='hs-layout'>(</span><span class='hs-conid'>MkPath</span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span> <span class='hs-varid'>action</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>action</span> <span class='hs-varid'>p</span>
|
||||
<a name="line-361"></a>
|
||||
<a name="line-362"></a>
|
||||
<a name="line-363"></a><a name="withFnPath"></a><span class='hs-definition'>withFnPath</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Path</span> <span class='hs-conid'>Fn</span> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span>
|
||||
<a name="line-364"></a><span class='hs-definition'>withFnPath</span> <span class='hs-layout'>(</span><span class='hs-conid'>MkPath</span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span> <span class='hs-varid'>action</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>action</span> <span class='hs-varid'>p</span>
|
||||
<a name="line-363"></a><span class='hs-comment'>------------------------</span>
|
||||
<a name="line-364"></a><span class='hs-comment'>-- ByteString helpers</span>
|
||||
<a name="line-365"></a>
|
||||
<a name="line-366"></a>
|
||||
<a name="line-367"></a><span class='hs-comment'>------------------------</span>
|
||||
<a name="line-368"></a><span class='hs-comment'>-- ByteString helpers</span>
|
||||
<a name="line-369"></a>
|
||||
<a name="line-370"></a><span class='hs-cpp'>#if MIN_VERSION_bytestring(0,10,8)</span>
|
||||
<a name="line-371"></a><span class='hs-cpp'>#else</span>
|
||||
<a name="line-372"></a><a name="stripPrefix"></a><span class='hs-definition'>stripPrefix</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Maybe</span> <span class='hs-conid'>ByteString</span>
|
||||
<a name="line-373"></a><span class='hs-definition'>stripPrefix</span> <span class='hs-varid'>a</span> <span class='hs-varid'>b</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>pack</span> <span class='hs-varop'>`fmap`</span> <span class='hs-conid'>L</span><span class='hs-varop'>.</span><span class='hs-varid'>stripPrefix</span> <span class='hs-layout'>(</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>unpack</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>unpack</span> <span class='hs-varid'>b</span><span class='hs-layout'>)</span>
|
||||
<a name="line-374"></a><span class='hs-cpp'>#endif</span>
|
||||
<a name="line-366"></a><span class='hs-cpp'>#if MIN_VERSION_bytestring(0,10,8)</span>
|
||||
<a name="line-367"></a><span class='hs-cpp'>#else</span>
|
||||
<a name="line-368"></a><a name="stripPrefix"></a><span class='hs-definition'>stripPrefix</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Maybe</span> <span class='hs-conid'>ByteString</span>
|
||||
<a name="line-369"></a><span class='hs-definition'>stripPrefix</span> <span class='hs-varid'>a</span> <span class='hs-varid'>b</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>pack</span> <span class='hs-varop'>`fmap`</span> <span class='hs-conid'>L</span><span class='hs-varop'>.</span><span class='hs-varid'>stripPrefix</span> <span class='hs-layout'>(</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>unpack</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>unpack</span> <span class='hs-varid'>b</span><span class='hs-layout'>)</span>
|
||||
<a name="line-370"></a><span class='hs-cpp'>#endif</span>
|
||||
</pre></body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user