packages feed

Cabal-1.20.0.2: doc/API/Cabal/Distribution-Simple-LHC.html

<!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>Distribution.Simple.LHC</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_Distribution-Simple-LHC.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">Cabal-1.20.0.2: A framework for packaging Haskell software</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Maintainer</th><td>cabal-devel@haskell.org</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Distribution.Simple.LHC</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This is a fairly large module. It contains most of the GHC-specific code for
 configuring, building and installing packages. It also exports a function
 for finding out what packages are already installed. Configuring involves
 finding the <code>ghc</code> and <code>ghc-pkg</code> programs, finding what language extensions
 this version of ghc supports and returning a <code><a href="Distribution-Simple-Compiler.html#t:Compiler">Compiler</a></code> value.
</p><p><code><a href="Distribution-Simple-LHC.html#v:getInstalledPackages">getInstalledPackages</a></code> involves calling the <code>ghc-pkg</code> program to find out
 what packages are installed.
</p><p>Building is somewhat complex as there is quite a bit of information to take
 into account. We have to build libs and programs, possibly for profiling and
 shared libs. We have to support building libraries that will be usable by
 GHCi and also ghc's <code>-split-objs</code> feature. We have to compile any C files
 using ghc. Linking, especially for <code>split-objs</code> is remarkably complex,
 partly because there tend to be 1,000's of <code>.o</code> files and this can often be
 more than we can pass to the <code>ld</code> or <code>ar</code> programs in one go.
</p><p>Installing for libs and exes involves finding the right files and copying
 them to the right places. One of the more tricky things about this module is
 remembering the layout of files in the build directory (which is not
 explicitly documented) and thus what search dirs are used for various kinds
 of files.
</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:configure">configure</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="Distribution-Simple-Program.html#t:ProgramConfiguration">ProgramConfiguration</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="Distribution-Simple-Compiler.html#t:Compiler">Compiler</a>, <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-System.html#t:Platform">Platform</a>, <a href="Distribution-Simple-Program.html#t:ProgramConfiguration">ProgramConfiguration</a>)</li><li class="src short"><a href="#v:getInstalledPackages">getInstalledPackages</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; <a href="Distribution-Simple-Compiler.html#t:PackageDBStack">PackageDBStack</a> -&gt; <a href="Distribution-Simple-Program.html#t:ProgramConfiguration">ProgramConfiguration</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="Distribution-Simple-PackageIndex.html#t:PackageIndex">PackageIndex</a></li><li class="src short"><a href="#v:buildLib">buildLib</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-PackageDescription.html#t:Library">Library</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:buildExe">buildExe</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-PackageDescription.html#t:Executable">Executable</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:installLib">installLib</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-PackageDescription.html#t:Library">Library</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:installExe">installExe</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Simple-InstallDirs.html#t:InstallDirs">InstallDirs</a> <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -&gt; (<a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a>, <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a>) -&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-PackageDescription.html#t:Executable">Executable</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:registerPackage">registerPackage</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; <a href="Distribution-InstalledPackageInfo.html#t:InstalledPackageInfo">InstalledPackageInfo</a> -&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Distribution-Simple-Compiler.html#t:PackageDBStack">PackageDBStack</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:ghcOptions">ghcOptions</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-PackageDescription.html#t:BuildInfo">BuildInfo</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -&gt; [<a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:ghcVerbosityOptions">ghcVerbosityOptions</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; [<a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/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:configure" class="def">configure</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="Distribution-Simple-Program.html#t:ProgramConfiguration">ProgramConfiguration</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="Distribution-Simple-Compiler.html#t:Compiler">Compiler</a>, <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-System.html#t:Platform">Platform</a>, <a href="Distribution-Simple-Program.html#t:ProgramConfiguration">ProgramConfiguration</a>)</p></div><div class="top"><p class="src"><a name="v:getInstalledPackages" class="def">getInstalledPackages</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; <a href="Distribution-Simple-Compiler.html#t:PackageDBStack">PackageDBStack</a> -&gt; <a href="Distribution-Simple-Program.html#t:ProgramConfiguration">ProgramConfiguration</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="Distribution-Simple-PackageIndex.html#t:PackageIndex">PackageIndex</a></p></div><div class="top"><p class="src"><a name="v:buildLib" class="def">buildLib</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-PackageDescription.html#t:Library">Library</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Build a library with LHC.
</p></div></div><div class="top"><p class="src"><a name="v:buildExe" class="def">buildExe</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-PackageDescription.html#t:Executable">Executable</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Build an executable with LHC.
</p></div></div><div class="top"><p class="src"><a name="v:installLib" class="def">installLib</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>install location
</p></td></tr><tr><td class="src">-&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>install location for dynamic libraries
</p></td></tr><tr><td class="src">-&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Build location
</p></td></tr><tr><td class="src">-&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Distribution-PackageDescription.html#t:Library">Library</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Install for ghc, .hi, .a and, if --with-ghci given, .o
</p></div></div><div class="top"><p class="src"><a name="v:installExe" class="def">installExe</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Distribution-Simple-InstallDirs.html#t:InstallDirs">InstallDirs</a> <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Where to copy the files to
</p></td></tr><tr><td class="src">-&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Build location
</p></td></tr><tr><td class="src">-&gt; (<a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a>, <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a>)</td><td class="doc"><p>Executable (prefix,suffix)
</p></td></tr><tr><td class="src">-&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Distribution-PackageDescription.html#t:Executable">Executable</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Install executables for GHC.
</p></div></div><div class="top"><p class="src"><a name="v:registerPackage" class="def">registerPackage</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; <a href="Distribution-InstalledPackageInfo.html#t:InstalledPackageInfo">InstalledPackageInfo</a> -&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Distribution-Simple-Compiler.html#t:PackageDBStack">PackageDBStack</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p></div><div class="top"><p class="src"><a name="v:ghcOptions" class="def">ghcOptions</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-PackageDescription.html#t:BuildInfo">BuildInfo</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -&gt; [<a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>]</p></div><div class="top"><p class="src"><a name="v:ghcVerbosityOptions" class="def">ghcVerbosityOptions</a> :: <a href="Distribution-Verbosity.html#t:Verbosity">Verbosity</a> -&gt; [<a href="file:///Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/share/doc/ghc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>]</p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>