Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > db7a4a658d190b3e658423135710c498 > files > 736

ghc-darcs-devel-2.8.3-1.fc18.i686.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>Ratified</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_Ratified.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Ratified.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">darcs-2.8.3: a distributed, interactive, smart revision control system</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">Ratified</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>XXX: Perhaps a word of explanation here [WL]
</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:readFile">readFile</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:hGetContents">hGetContents</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/GHC-IO-Handle.html#t:Handle">Handle</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/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:readFile" class="def">readFile</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></p><div class="doc"><p>The <code><a href="Ratified.html#v:readFile">readFile</a></code> function reads a file and
 returns the contents of the file as a string.
 The file is read lazily, on demand, as with <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#v:getContents">getContents</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:hGetContents" class="def">hGetContents</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/GHC-IO-Handle.html#t:Handle">Handle</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></p><div class="doc"><p>Computation <code><a href="Ratified.html#v:hGetContents">hGetContents</a></code> <code>hdl</code> returns the list of characters
 corresponding to the unread portion of the channel or file managed
 by <code>hdl</code>, which is put into an intermediate state, <em>semi-closed</em>.
 In this state, <code>hdl</code> is effectively closed,
 but items are read from <code>hdl</code> on demand and accumulated in a special
 list returned by <code><a href="Ratified.html#v:hGetContents">hGetContents</a></code> <code>hdl</code>.
</p><p>Any operation that fails because a handle is closed,
 also fails if a handle is semi-closed.  The only exception is <code>hClose</code>.
 A semi-closed handle becomes closed:
</p><ul><li> if <code>hClose</code> is applied to it;
</li><li> if an I/O error occurs when reading an item from the handle;
</li><li> or once the entire contents of the handle has been read.
</li></ul><p>Once a semi-closed handle becomes closed, the contents of the
 associated list becomes fixed.  The contents of this final list is
 only partially specified: it will contain at least all the items of
 the stream that were evaluated prior to the handle becoming closed.
</p><p>Any I/O errors encountered while a handle is semi-closed are simply
 discarded.
</p><p>This operation may fail with:
</p><ul><li> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO-Error.html#v:isEOFError">isEOFError</a></code> if the end of file has been reached.
</li></ul></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>