/usr/share/doc/libghc-foundation-doc/html/Foundation-IO.html is in libghc-foundation-doc 0.0.17-1.
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 | <!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>Foundation.IO</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_Foundation-IO.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Foundation-IO.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">foundation-0.0.17: Alternative prelude with batteries and no dependencies</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>License</th><td>BSD-style</td></tr><tr><th>Maintainer</th><td>Vincent Hanquez <vincent@snarc.org></td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Foundation.IO</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Terminal</a></li><li><a href="#g:2">File</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>IO Routine</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:putStrLn">putStrLn</a> :: <a href="Foundation-String.html#t:String">String</a> -> <a href="Foundation.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:putStr">putStr</a> :: <a href="Foundation-String.html#t:String">String</a> -> <a href="Foundation.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:stdin">stdin</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a></li><li class="src short"><a href="#v:stdout">stdout</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:IOMode">IOMode</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a><ul class="subs"><li>= <a href="#v:ReadMode">ReadMode</a></li><li>| <a href="#v:WriteMode">WriteMode</a></li><li>| <a href="#v:AppendMode">AppendMode</a></li><li>| <a href="#v:ReadWriteMode">ReadWriteMode</a></li></ul></li><li class="src short"><a href="#v:openFile">openFile</a> :: <a href="Foundation-VFS-FilePath.html#t:FilePath">FilePath</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a></li><li class="src short"><a href="#v:closeFile">closeFile</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="Foundation.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withFile">withFile</a> :: <a href="Foundation-VFS-FilePath.html#t:FilePath">FilePath</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="Foundation.html#t:IO">IO</a> r) -> <a href="Foundation.html#t:IO">IO</a> r</li><li class="src short"><a href="#v:hGet">hGet</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="Foundation.html#t:Int">Int</a> -> <a href="Foundation.html#t:IO">IO</a> (<a href="Foundation-Array-Internal.html#t:UArray">UArray</a> <a href="Foundation.html#t:Word8">Word8</a>)</li><li class="src short"><a href="#v:hPut">hPut</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="Foundation-Array-Internal.html#t:UArray">UArray</a> <a href="Foundation.html#t:Word8">Word8</a> -> <a href="Foundation.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:readFile">readFile</a> :: <a href="Foundation-VFS-FilePath.html#t:FilePath">FilePath</a> -> <a href="Foundation.html#t:IO">IO</a> (<a href="Foundation-Array-Internal.html#t:UArray">UArray</a> <a href="Foundation.html#t:Word8">Word8</a>)</li></ul></div><div id="interface"><h1 id="g:1">Terminal</h1><div class="top"><p class="src"><a id="v:putStrLn" class="def">putStrLn</a> :: <a href="Foundation-String.html#t:String">String</a> -> <a href="Foundation.html#t:IO">IO</a> () <a href="src/Foundation-IO-Terminal.html#putStrLn" class="link">Source</a> <a href="#v:putStrLn" class="selflink">#</a></p><div class="doc"><p>Print a string with a newline to standard output</p></div></div><div class="top"><p class="src"><a id="v:putStr" class="def">putStr</a> :: <a href="Foundation-String.html#t:String">String</a> -> <a href="Foundation.html#t:IO">IO</a> () <a href="src/Foundation-IO-Terminal.html#putStr" class="link">Source</a> <a href="#v:putStr" class="selflink">#</a></p><div class="doc"><p>Print a string to standard output</p></div></div><div class="top"><p class="src"><a id="v:stdin" class="def">stdin</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> <a href="#v:stdin" class="selflink">#</a></p><div class="doc"><p>A handle managing input from the Haskell program's standard input channel.</p></div></div><div class="top"><p class="src"><a id="v:stdout" class="def">stdout</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> <a href="#v:stdout" class="selflink">#</a></p><div class="doc"><p>A handle managing output to the Haskell program's standard output channel.</p></div></div><h1 id="g:2">File</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:IOMode" class="def">IOMode</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="#t:IOMode" class="selflink">#</a></p><div class="doc"><p>See <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#v:openFile">openFile</a></code></p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:ReadMode" class="def">ReadMode</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:WriteMode" class="def">WriteMode</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:AppendMode" class="def">AppendMode</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:ReadWriteMode" class="def">ReadWriteMode</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:IOMode" class="caption collapser" onclick="toggleSection('i:IOMode')">Instances</p><div id="section.i:IOMode" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IOMode:Enum:1" class="instance expander" onclick="toggleSection('i:id:IOMode:Enum:1')"></span> <a href="Foundation.html#t:Enum">Enum</a> <a href="Foundation-IO.html#t:IOMode">IOMode</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IOMode:Enum:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:succ">succ</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> <a href="#v:succ" class="selflink">#</a></p><p class="src"><a href="#v:pred">pred</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> <a href="#v:pred" class="selflink">#</a></p><p class="src"><a href="#v:toEnum">toEnum</a> :: <a href="Foundation.html#t:Int">Int</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> <a href="#v:toEnum" class="selflink">#</a></p><p class="src"><a href="#v:fromEnum">fromEnum</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation.html#t:Int">Int</a> <a href="#v:fromEnum" class="selflink">#</a></p><p class="src"><a href="#v:enumFrom">enumFrom</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> [<a href="Foundation-IO.html#t:IOMode">IOMode</a>] <a href="#v:enumFrom" class="selflink">#</a></p><p class="src"><a href="#v:enumFromThen">enumFromThen</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> [<a href="Foundation-IO.html#t:IOMode">IOMode</a>] <a href="#v:enumFromThen" class="selflink">#</a></p><p class="src"><a href="#v:enumFromTo">enumFromTo</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> [<a href="Foundation-IO.html#t:IOMode">IOMode</a>] <a href="#v:enumFromTo" class="selflink">#</a></p><p class="src"><a href="#v:enumFromThenTo">enumFromThenTo</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> [<a href="Foundation-IO.html#t:IOMode">IOMode</a>] <a href="#v:enumFromThenTo" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IOMode:Eq:2" class="instance expander" onclick="toggleSection('i:id:IOMode:Eq:2')"></span> <a href="Foundation.html#t:Eq">Eq</a> <a href="Foundation-IO.html#t:IOMode">IOMode</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IOMode:Eq:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IOMode:Ord:3" class="instance expander" onclick="toggleSection('i:id:IOMode:Ord:3')"></span> <a href="Foundation.html#t:Ord">Ord</a> <a href="Foundation-IO.html#t:IOMode">IOMode</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IOMode:Ord:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(<)</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(<=)</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(>)</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(>=)</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IOMode:Read:4" class="instance expander" onclick="toggleSection('i:id:IOMode:Read:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> <a href="Foundation-IO.html#t:IOMode">IOMode</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IOMode:Read:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="Foundation.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> <a href="Foundation-IO.html#t:IOMode">IOMode</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Foundation-IO.html#t:IOMode">IOMode</a>] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Foundation-IO.html#t:IOMode">IOMode</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Foundation-IO.html#t:IOMode">IOMode</a>] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IOMode:Show:5" class="instance expander" onclick="toggleSection('i:id:IOMode:Show:5')"></span> <a href="Foundation.html#t:Show">Show</a> <a href="Foundation-IO.html#t:IOMode">IOMode</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IOMode:Show:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="Foundation.html#t:Int">Int</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Foundation-IO.html#t:IOMode">IOMode</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IOMode:Ix:6" class="instance expander" onclick="toggleSection('i:id:IOMode:Ix:6')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ix.html#t:Ix">Ix</a> <a href="Foundation-IO.html#t:IOMode">IOMode</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IOMode:Ix:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:range">range</a> :: (<a href="Foundation-IO.html#t:IOMode">IOMode</a>, <a href="Foundation-IO.html#t:IOMode">IOMode</a>) -> [<a href="Foundation-IO.html#t:IOMode">IOMode</a>] <a href="#v:range" class="selflink">#</a></p><p class="src"><a href="#v:index">index</a> :: (<a href="Foundation-IO.html#t:IOMode">IOMode</a>, <a href="Foundation-IO.html#t:IOMode">IOMode</a>) -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation.html#t:Int">Int</a> <a href="#v:index" class="selflink">#</a></p><p class="src"><a href="#v:unsafeIndex">unsafeIndex</a> :: (<a href="Foundation-IO.html#t:IOMode">IOMode</a>, <a href="Foundation-IO.html#t:IOMode">IOMode</a>) -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation.html#t:Int">Int</a></p><p class="src"><a href="#v:inRange">inRange</a> :: (<a href="Foundation-IO.html#t:IOMode">IOMode</a>, <a href="Foundation-IO.html#t:IOMode">IOMode</a>) -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation.html#t:Bool">Bool</a> <a href="#v:inRange" class="selflink">#</a></p><p class="src"><a href="#v:rangeSize">rangeSize</a> :: (<a href="Foundation-IO.html#t:IOMode">IOMode</a>, <a href="Foundation-IO.html#t:IOMode">IOMode</a>) -> <a href="Foundation.html#t:Int">Int</a> <a href="#v:rangeSize" class="selflink">#</a></p><p class="src"><a href="#v:unsafeRangeSize">unsafeRangeSize</a> :: (<a href="Foundation-IO.html#t:IOMode">IOMode</a>, <a href="Foundation-IO.html#t:IOMode">IOMode</a>) -> <a href="Foundation.html#t:Int">Int</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:openFile" class="def">openFile</a> :: <a href="Foundation-VFS-FilePath.html#t:FilePath">FilePath</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> <a href="Foundation.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> <a href="src/Foundation-IO-File.html#openFile" class="link">Source</a> <a href="#v:openFile" class="selflink">#</a></p><div class="doc"><p>list the file name in the given FilePath directory</p><p>TODO: error management and not implemented yet
getDirectory :: FilePath -> IO [FileName]
getDirectory = undefined</p><p>Open a new handle on the file</p></div></div><div class="top"><p class="src"><a id="v:closeFile" class="def">closeFile</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="Foundation.html#t:IO">IO</a> () <a href="src/Foundation-IO-File.html#closeFile" class="link">Source</a> <a href="#v:closeFile" class="selflink">#</a></p><div class="doc"><p>Close a handle</p></div></div><div class="top"><p class="src"><a id="v:withFile" class="def">withFile</a> :: <a href="Foundation-VFS-FilePath.html#t:FilePath">FilePath</a> -> <a href="Foundation-IO.html#t:IOMode">IOMode</a> -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="Foundation.html#t:IO">IO</a> r) -> <a href="Foundation.html#t:IO">IO</a> r <a href="src/Foundation-IO-File.html#withFile" class="link">Source</a> <a href="#v:withFile" class="selflink">#</a></p><div class="doc"><p><code><code><a href="Foundation-IO.html#v:withFile">withFile</a></code> filepath mode act</code> opens a file using the mode<code>
and run act</code>. the by-product handle will be closed when act finish,
either normally or through an exception.</p><p>The value returned is the result of act@</p></div></div><div class="top"><p class="src"><a id="v:hGet" class="def">hGet</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="Foundation.html#t:Int">Int</a> -> <a href="Foundation.html#t:IO">IO</a> (<a href="Foundation-Array-Internal.html#t:UArray">UArray</a> <a href="Foundation.html#t:Word8">Word8</a>) <a href="src/Foundation-IO-File.html#hGet" class="link">Source</a> <a href="#v:hGet" class="selflink">#</a></p><div class="doc"><p>Read binary data directly from the specified <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a></code>.</p><p>First argument is the Handle to read from, and the second is the number of bytes to read.
It returns the bytes read, up to the specified size, or an empty array if EOF has been reached.</p><p><code><a href="Foundation-IO.html#v:hGet">hGet</a></code> is implemented in terms of <code>hGetBuf</code>.</p></div></div><div class="top"><p class="src"><a id="v:hPut" class="def">hPut</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="Foundation-Array-Internal.html#t:UArray">UArray</a> <a href="Foundation.html#t:Word8">Word8</a> -> <a href="Foundation.html#t:IO">IO</a> () <a href="src/Foundation-IO-File.html#hPut" class="link">Source</a> <a href="#v:hPut" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:readFile" class="def">readFile</a> :: <a href="Foundation-VFS-FilePath.html#t:FilePath">FilePath</a> -> <a href="Foundation.html#t:IO">IO</a> (<a href="Foundation-Array-Internal.html#t:UArray">UArray</a> <a href="Foundation.html#t:Word8">Word8</a>) <a href="src/Foundation-IO-File.html#readFile" class="link">Source</a> <a href="#v:readFile" class="selflink">#</a></p><div class="doc"><p>Read a binary file and return the whole content in one contiguous buffer.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|