/usr/share/doc/libghc-base-compat-doc/html/System-Environment-Compat.html is in libghc-base-compat-doc 0.9.1-3.
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 | <!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.Environment.Compat</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_System-Environment-Compat.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/System-Environment-Compat.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">base-compat-0.9.1: A compatibility layer for base</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">System.Environment.Compat</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Miscellaneous information about the system environment.</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:getArgs">getArgs</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [<a href="Data-String-Compat.html#t:String">String</a>]</li><li class="src short"><a href="#v:getProgName">getProgName</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="Data-String-Compat.html#t:String">String</a></li><li class="src short"><a href="#v:getEnv">getEnv</a> :: <a href="Data-String-Compat.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="Data-String-Compat.html#t:String">String</a></li><li class="src short"><a href="#v:lookupEnv">lookupEnv</a> :: <a href="Data-String-Compat.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Data-String-Compat.html#t:String">String</a>)</li><li class="src short"><a href="#v:setEnv">setEnv</a> :: <a href="Data-String-Compat.html#t:String">String</a> -> <a href="Data-String-Compat.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:unsetEnv">unsetEnv</a> :: <a href="Data-String-Compat.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withArgs">withArgs</a> :: [<a href="Data-String-Compat.html#t:String">String</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:withProgName">withProgName</a> :: <a href="Data-String-Compat.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:getEnvironment">getEnvironment</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [(<a href="Data-String-Compat.html#t:String">String</a>, <a href="Data-String-Compat.html#t:String">String</a>)]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:getArgs" class="def">getArgs</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [<a href="Data-String-Compat.html#t:String">String</a>] <a href="#v:getArgs" class="selflink">#</a></p><div class="doc"><p>Computation <code><a href="System-Environment-Compat.html#v:getArgs">getArgs</a></code> returns a list of the program's command
line arguments (not including the program name).</p></div></div><div class="top"><p class="src"><a id="v:getProgName" class="def">getProgName</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="Data-String-Compat.html#t:String">String</a> <a href="#v:getProgName" class="selflink">#</a></p><div class="doc"><p>Computation <code><a href="System-Environment-Compat.html#v:getProgName">getProgName</a></code> returns the name of the program as it was
invoked.</p><p>However, this is hard-to-impossible to implement on some non-Unix
OSes, so instead, for maximum portability, we just return the leafname
of the program as invoked. Even then there are some differences
between platforms: on Windows, for example, a program invoked as foo
is probably really <code>FOO.EXE</code>, and that is what <code><a href="System-Environment-Compat.html#v:getProgName">getProgName</a></code> will return.</p></div></div><div class="top"><p class="src"><a id="v:getEnv" class="def">getEnv</a> :: <a href="Data-String-Compat.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="Data-String-Compat.html#t:String">String</a> <a href="#v:getEnv" class="selflink">#</a></p><div class="doc"><p>Computation <code><a href="System-Environment-Compat.html#v:getEnv">getEnv</a></code> <code>var</code> returns the value
of the environment variable <code>var</code>. For the inverse, POSIX users
can use <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/unix-2.7.2.0/System-Posix-Env.html#v:putEnv">putEnv</a></code>.</p><p>This computation may fail with:</p><ul><li><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO-Error.html#v:isDoesNotExistError">isDoesNotExistError</a></code> if the environment variable
does not exist.</li></ul></div></div><div class="top"><p class="src"><a id="v:lookupEnv" class="def">lookupEnv</a> :: <a href="Data-String-Compat.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Data-String-Compat.html#t:String">String</a>) <a href="#v:lookupEnv" class="selflink">#</a></p><div class="doc"><p>Return the value of the environment variable <code>var</code>, or <code>Nothing</code> if
there is no such value.</p><p>For POSIX users, this is equivalent to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/unix-2.7.2.0/System-Posix-Env.html#v:getEnv">getEnv</a></code>.</p><p><em>Since: 4.6.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:setEnv" class="def">setEnv</a> :: <a href="Data-String-Compat.html#t:String">String</a> -> <a href="Data-String-Compat.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="#v:setEnv" class="selflink">#</a></p><div class="doc"><p><code>setEnv name value</code> sets the specified environment variable to <code>value</code>.</p><p>On Windows setting an environment variable to the <em>empty string</em> removes
that environment variable from the environment. For the sake of
compatibility we adopt that behavior. In particular</p><pre>setEnv name ""
</pre><p>has the same effect as</p><pre><code><a href="System-Environment-Compat.html#v:unsetEnv">unsetEnv</a></code> name
</pre><p>If you don't care about Windows support and want to set an environment
variable to the empty string use <code>System.Posix.Env.setEnv</code> from the <code>unix</code>
package instead.</p><p>Throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception.html#v:IOException">IOException</a></code> if <code>name</code> is the empty string or
contains an equals sign.</p><p><em>Since: 4.7.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:unsetEnv" class="def">unsetEnv</a> :: <a href="Data-String-Compat.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="#v:unsetEnv" class="selflink">#</a></p><div class="doc"><p><code>unSet name</code> removes the specified environment variable from the
environment of the current process.</p><p>Throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception.html#v:IOException">IOException</a></code> if <code>name</code> is the empty string or
contains an equals sign.</p><p><em>Since: 4.7.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:withArgs" class="def">withArgs</a> :: [<a href="Data-String-Compat.html#t:String">String</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="#v:withArgs" class="selflink">#</a></p><div class="doc"><p><code><a href="System-Environment-Compat.html#v:withArgs">withArgs</a></code> <code>args act</code> - while executing action <code>act</code>, have <code><a href="System-Environment-Compat.html#v:getArgs">getArgs</a></code>
return <code>args</code>.</p></div></div><div class="top"><p class="src"><a id="v:withProgName" class="def">withProgName</a> :: <a href="Data-String-Compat.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="#v:withProgName" class="selflink">#</a></p><div class="doc"><p><code><a href="System-Environment-Compat.html#v:withProgName">withProgName</a></code> <code>name act</code> - while executing action <code>act</code>,
have <code><a href="System-Environment-Compat.html#v:getProgName">getProgName</a></code> return <code>name</code>.</p></div></div><div class="top"><p class="src"><a id="v:getEnvironment" class="def">getEnvironment</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [(<a href="Data-String-Compat.html#t:String">String</a>, <a href="Data-String-Compat.html#t:String">String</a>)] <a href="#v:getEnvironment" class="selflink">#</a></p><div class="doc"><p><code><a href="System-Environment-Compat.html#v:getEnvironment">getEnvironment</a></code> retrieves the entire environment as a
list of <code>(key,value)</code> pairs.</p><p>If an environment entry does not contain an <code>'='</code> character,
the <code>key</code> is the whole entry and the <code>value</code> is the empty string.</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>
|