Sophie

Sophie

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

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>Linker</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_Linker.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">ghc-7.4.2: The GHC API</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">Linker</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>The dynamic linker for GHCi.
</p><p>This module deals with the top-level issues of dynamic linking,
 calling the object-code linker and the byte-code linker where
 necessary.
</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"><span class="keyword">data</span>  <a href="#t:HValue">HValue</a> </li><li class="src short"><a href="#v:getHValue">getHValue</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="Name.html#t:Name">Name</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Linker.html#t:HValue">HValue</a></li><li class="src short"><a href="#v:showLinkerState">showLinkerState</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:linkExpr">linkExpr</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="ByteCodeAsm.html#t:UnlinkedBCO">UnlinkedBCO</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Linker.html#t:HValue">HValue</a></li><li class="src short"><a href="#v:linkDecls">linkDecls</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="ByteCodeAsm.html#t:CompiledByteCode">CompiledByteCode</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:unload">unload</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -&gt; [<a href="HscTypes.html#t:Linkable">Linkable</a>] -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withExtendedLinkEnv">withExtendedLinkEnv</a> :: (<a href="MonadUtils.html#t:MonadIO">MonadIO</a> m, <a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m) =&gt; [(<a href="Name.html#t:Name">Name</a>, <a href="Linker.html#t:HValue">HValue</a>)] -&gt; m a -&gt; m a</li><li class="src short"><a href="#v:extendLinkEnv">extendLinkEnv</a> :: [(<a href="Name.html#t:Name">Name</a>, <a href="Linker.html#t:HValue">HValue</a>)] -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:deleteFromLinkEnv">deleteFromLinkEnv</a> :: [<a href="Name.html#t:Name">Name</a>] -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:extendLoadedPkgs">extendLoadedPkgs</a> :: [<a href="Module.html#t:PackageId">PackageId</a>] -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:linkPackages">linkPackages</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -&gt; [<a href="Module.html#t:PackageId">PackageId</a>] -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:initDynLinker">initDynLinker</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:linkModule">linkModule</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="Module.html#t:Module">Module</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><span class="keyword">data</span>  <a href="#t:PersistentLinkerState">PersistentLinkerState</a> </li><li class="src short"><a href="#v:saveLinkerGlobals">saveLinkerGlobals</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.5.1.0/Control-Concurrent-MVar.html#t:MVar">MVar</a> <a href="Linker.html#t:PersistentLinkerState">PersistentLinkerState</a>, <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>)</li><li class="src short"><a href="#v:restoreLinkerGlobals">restoreLinkerGlobals</a> :: (<a href="../base-4.5.1.0/Control-Concurrent-MVar.html#t:MVar">MVar</a> <a href="Linker.html#t:PersistentLinkerState">PersistentLinkerState</a>, <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:HValue" class="def">HValue</a>  </p></div><div class="top"><p class="src"><a name="v:getHValue" class="def">getHValue</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="Name.html#t:Name">Name</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Linker.html#t:HValue">HValue</a></p><div class="doc"><p>Get the <code><a href="Linker.html#t:HValue">HValue</a></code> associated with the given name.
</p><p>May cause loading the module that contains the name.
</p><p>Throws a <code><a href="Panic.html#v:ProgramError">ProgramError</a></code> if loading fails or the name cannot be found.
</p></div></div><div class="top"><p class="src"><a name="v:showLinkerState" class="def">showLinkerState</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Display the persistent linker state.
</p></div></div><div class="top"><p class="src"><a name="v:linkExpr" class="def">linkExpr</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="ByteCodeAsm.html#t:UnlinkedBCO">UnlinkedBCO</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Linker.html#t:HValue">HValue</a></p><div class="doc"><p>Link a single expression, <em>including</em> first linking packages and
 modules that this expression depends on.
</p><p>Raises an IO exception (<code><a href="Panic.html#v:ProgramError">ProgramError</a></code>) if it can't find a compiled
 version of the dependents to link.
</p></div></div><div class="top"><p class="src"><a name="v:linkDecls" class="def">linkDecls</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="ByteCodeAsm.html#t:CompiledByteCode">CompiledByteCode</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p></div><div class="top"><p class="src"><a name="v:unload" class="def">unload</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="DynFlags.html#t:DynFlags">DynFlags</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; [<a href="HscTypes.html#t:Linkable">Linkable</a>]</td><td class="doc"><p>The linkables to *keep*.
</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Unloading old objects ready for a new compilation sweep.
</p><p>The compilation manager provides us with a list of linkables that it
 considers &quot;stable&quot;, i.e. won't be recompiled this time around.  For
 each of the modules current linked in memory,
</p><ul><li> if the linkable is stable (and it's the same one -- the user may have
     recompiled the module on the side), we keep it,
</li><li> otherwise, we unload it.
</li><li> we also implicitly unload all temporary bindings at this point.
</li></ul></div></div><div class="top"><p class="src"><a name="v:withExtendedLinkEnv" class="def">withExtendedLinkEnv</a> :: (<a href="MonadUtils.html#t:MonadIO">MonadIO</a> m, <a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m) =&gt; [(<a href="Name.html#t:Name">Name</a>, <a href="Linker.html#t:HValue">HValue</a>)] -&gt; m a -&gt; m a</p><div class="doc"><p>Temporarily extend the linker state.
</p></div></div><div class="top"><p class="src"><a name="v:extendLinkEnv" class="def">extendLinkEnv</a> :: [(<a href="Name.html#t:Name">Name</a>, <a href="Linker.html#t:HValue">HValue</a>)] -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p></div><div class="top"><p class="src"><a name="v:deleteFromLinkEnv" class="def">deleteFromLinkEnv</a> :: [<a href="Name.html#t:Name">Name</a>] -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p></div><div class="top"><p class="src"><a name="v:extendLoadedPkgs" class="def">extendLoadedPkgs</a> :: [<a href="Module.html#t:PackageId">PackageId</a>] -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p></div><div class="top"><p class="src"><a name="v:linkPackages" class="def">linkPackages</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -&gt; [<a href="Module.html#t:PackageId">PackageId</a>] -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Link exactly the specified packages, and their dependents (unless of
 course they are already linked).  The dependents are linked
 automatically, and it doesn't matter what order you specify the input
 packages.
</p></div></div><div class="top"><p class="src"><a name="v:initDynLinker" class="def">initDynLinker</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Initialise the dynamic linker.  This entails
</p><p>a) Calling the C initialisation procedure,
</p><p>b) Loading any packages specified on the command line,
</p><p>c) Loading any packages specified on the command line, now held in the
     <code>-l</code> options in <code>v_Opt_l</code>,
</p><p>d) Loading any <code>.o/.dll</code> files specified on the command line, now held
     in <code>v_Ld_inputs</code>,
</p><p>e) Loading any MacOS frameworks.
</p><p>NOTE: This function is idempotent; if called more than once, it does
 nothing.  This is useful in Template Haskell, where we call it before
 trying to link.
</p></div></div><div class="top"><p class="src"><a name="v:linkModule" class="def">linkModule</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="Module.html#t:Module">Module</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:PersistentLinkerState" class="def">PersistentLinkerState</a>  </p></div><div class="top"><p class="src"><a name="v:saveLinkerGlobals" class="def">saveLinkerGlobals</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.5.1.0/Control-Concurrent-MVar.html#t:MVar">MVar</a> <a href="Linker.html#t:PersistentLinkerState">PersistentLinkerState</a>, <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>)</p></div><div class="top"><p class="src"><a name="v:restoreLinkerGlobals" class="def">restoreLinkerGlobals</a> :: (<a href="../base-4.5.1.0/Control-Concurrent-MVar.html#t:MVar">MVar</a> <a href="Linker.html#t:PersistentLinkerState">PersistentLinkerState</a>, <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p></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>