Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 6e204a966e8c42d976f99a1700ce5f20 > files > 2322

ghc-7.4.2-4.mga5.i586.rpm

<!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</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-Environment.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">base-4.5.1.0: Basic libraries</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>libraries@haskell.org</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr></table><p class="caption">System.Environment</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="System-IO.html#t:IO">IO</a> [<a href="Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:getProgName">getProgName</a> :: <a href="System-IO.html#t:IO">IO</a> <a href="Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:getEnv">getEnv</a> :: <a href="Data-String.html#t:String">String</a> -&gt; <a href="System-IO.html#t:IO">IO</a> <a href="Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:withArgs">withArgs</a> ::  [<a href="Data-String.html#t:String">String</a>] -&gt; <a href="System-IO.html#t:IO">IO</a> a -&gt; <a href="System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:withProgName">withProgName</a> ::  <a href="Data-String.html#t:String">String</a> -&gt; <a href="System-IO.html#t:IO">IO</a> a -&gt; <a href="System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:getEnvironment">getEnvironment</a> :: <a href="System-IO.html#t:IO">IO</a> [(<a href="Data-String.html#t:String">String</a>, <a href="Data-String.html#t:String">String</a>)]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:getArgs" class="def">getArgs</a> :: <a href="System-IO.html#t:IO">IO</a> [<a href="Data-String.html#t:String">String</a>]</p><div class="doc"><p>Computation <code><a href="System-Environment.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 name="v:getProgName" class="def">getProgName</a> :: <a href="System-IO.html#t:IO">IO</a> <a href="Data-String.html#t:String">String</a></p><div class="doc"><p>Computation <code><a href="System-Environment.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.html#v:getProgName">getProgName</a></code> will return.
</p></div></div><div class="top"><p class="src"><a name="v:getEnv" class="def">getEnv</a> :: <a href="Data-String.html#t:String">String</a> -&gt; <a href="System-IO.html#t:IO">IO</a> <a href="Data-String.html#t:String">String</a></p><div class="doc"><p>Computation <code><a href="System-Environment.html#v:getEnv">getEnv</a></code> <code>var</code> returns the value
 of the environment variable <code>var</code>.  
</p><p>This computation may fail with:
</p><ul><li> <code><a href="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 name="v:withArgs" class="def">withArgs</a> ::  [<a href="Data-String.html#t:String">String</a>] -&gt; <a href="System-IO.html#t:IO">IO</a> a -&gt; <a href="System-IO.html#t:IO">IO</a> a</p><div class="doc"><p><code><a href="System-Environment.html#v:withArgs">withArgs</a></code> <code>args act</code> - while executing action <code>act</code>, have <code><a href="System-Environment.html#v:getArgs">getArgs</a></code>
return <code>args</code>.
</p></div></div><div class="top"><p class="src"><a name="v:withProgName" class="def">withProgName</a> ::  <a href="Data-String.html#t:String">String</a> -&gt; <a href="System-IO.html#t:IO">IO</a> a -&gt; <a href="System-IO.html#t:IO">IO</a> a</p><div class="doc"><p><code><a href="System-Environment.html#v:withProgName">withProgName</a></code> <code>name act</code> - while executing action <code>act</code>,
have <code><a href="System-Environment.html#v:getProgName">getProgName</a></code> return <code>name</code>.
</p></div></div><div class="top"><p class="src"><a name="v:getEnvironment" class="def">getEnvironment</a> :: <a href="System-IO.html#t:IO">IO</a> [(<a href="Data-String.html#t:String">String</a>, <a href="Data-String.html#t:String">String</a>)]</p><div class="doc"><p><code><a href="System-Environment.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.11.0</p></div></body></html>