Sophie

Sophie

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

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>Foreign.Marshal</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_Foreign-Marshal.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">haskell2010-1.1.0.1: Compatibility with Haskell 2010</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Foreign.Marshal</p></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">module <a href="Foreign-Marshal-Alloc.html">Foreign.Marshal.Alloc</a></li><li class="src short">module <a href="Foreign-Marshal-Array.html">Foreign.Marshal.Array</a></li><li class="src short">module <a href="Foreign-Marshal-Error.html">Foreign.Marshal.Error</a></li><li class="src short">module <a href="Foreign-Marshal-Utils.html">Foreign.Marshal.Utils</a></li><li class="src short"><a href="#v:unsafeLocalState">unsafeLocalState</a> ::  <a href="Prelude.html#t:IO">IO</a> a -&gt; a</li></ul></div><div id="interface"><h1>Documentation</h1><div class="doc"><p>The module <a href="../base-4.5.1.0/Foreign-Marshal.html">Foreign.Marshal</a> re-exports the other modules in the
 <code>Foreign.Marshal</code> hierarchy:
</p></div><div class="top"><p class="src">module <a href="Foreign-Marshal-Alloc.html">Foreign.Marshal.Alloc</a></p></div><div class="top"><p class="src">module <a href="Foreign-Marshal-Array.html">Foreign.Marshal.Array</a></p></div><div class="top"><p class="src">module <a href="Foreign-Marshal-Error.html">Foreign.Marshal.Error</a></p></div><div class="top"><p class="src">module <a href="Foreign-Marshal-Utils.html">Foreign.Marshal.Utils</a></p></div><div class="doc"><p>and provides one function:
</p></div><div class="top"><p class="src"><a name="v:unsafeLocalState" class="def">unsafeLocalState</a> ::  <a href="Prelude.html#t:IO">IO</a> a -&gt; a</p><div class="doc"><p>Sometimes an external entity is a pure function, except that it passes
arguments and/or results via pointers.  The function
<code>unsafeLocalState</code> permits the packaging of such entities as pure
functions.  
</p><p>The only IO operations allowed in the IO action passed to
<code>unsafeLocalState</code> are (a) local allocation (<code>alloca</code>, <code>allocaBytes</code>
and derived operations such as <code>withArray</code> and <code>withCString</code>), and (b)
pointer operations (<code>Foreign.Storable</code> and <code>Foreign.Ptr</code>) on the
pointers to local storage, and (c) foreign functions whose only
observable effect is to read and/or write the locally allocated
memory.  Passing an IO operation that does not obey these rules
results in undefined behaviour.
</p><p>It is expected that this operation will be
replaced in a future revision of Haskell.
</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>