Sophie

Sophie

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

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>Distribution.PackageDescription.Configuration</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-PackageDescription-Configuration.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.14.0: 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.PackageDescription.Configuration</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This is about the cabal configurations feature. It exports
 <code><a href="Distribution-PackageDescription-Configuration.html#v:finalizePackageDescription">finalizePackageDescription</a></code> and <code><a href="Distribution-PackageDescription-Configuration.html#v:flattenPackageDescription">flattenPackageDescription</a></code> which are
 functions for converting <code><a href="Distribution-PackageDescription.html#t:GenericPackageDescription">GenericPackageDescription</a></code>s down to
 <code><a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a></code>s. It has code for working with the tree of conditions
 and resolving or flattening conditions.
</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:finalizePackageDescription">finalizePackageDescription</a> :: <a href="Distribution-PackageDescription.html#t:FlagAssignment">FlagAssignment</a> -&gt; (<a href="Distribution-Package.html#t:Dependency">Dependency</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Distribution-System.html#t:Platform">Platform</a> -&gt; <a href="Distribution-Compiler.html#t:CompilerId">CompilerId</a> -&gt; [<a href="Distribution-Package.html#t:Dependency">Dependency</a>] -&gt; <a href="Distribution-PackageDescription.html#t:GenericPackageDescription">GenericPackageDescription</a> -&gt; <a href="../base-4.5.1.0/Data-Either.html#t:Either">Either</a> [<a href="Distribution-Package.html#t:Dependency">Dependency</a>] (<a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a>, <a href="Distribution-PackageDescription.html#t:FlagAssignment">FlagAssignment</a>)</li><li class="src short"><a href="#v:flattenPackageDescription">flattenPackageDescription</a> :: <a href="Distribution-PackageDescription.html#t:GenericPackageDescription">GenericPackageDescription</a> -&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a></li><li class="src short"><a href="#v:parseCondition">parseCondition</a> ::  <a href="Distribution-Compat-ReadP.html#t:ReadP">ReadP</a> r (<a href="Distribution-PackageDescription.html#t:Condition">Condition</a> <a href="Distribution-PackageDescription.html#t:ConfVar">ConfVar</a>)</li><li class="src short"><a href="#v:freeVars">freeVars</a> ::  <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> <a href="Distribution-PackageDescription.html#t:ConfVar">ConfVar</a> c a -&gt; [<a href="Distribution-PackageDescription.html#t:FlagName">FlagName</a>]</li><li class="src short"><a href="#v:mapCondTree">mapCondTree</a> ::  (a -&gt; b) -&gt; (c -&gt; d) -&gt; (<a href="Distribution-PackageDescription.html#t:Condition">Condition</a> v -&gt; <a href="Distribution-PackageDescription.html#t:Condition">Condition</a> w) -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> v c a -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> w d b</li><li class="src short"><a href="#v:mapTreeData">mapTreeData</a> ::  (a -&gt; b) -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> v c a -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> v c b</li><li class="src short"><a href="#v:mapTreeConds">mapTreeConds</a> ::  (<a href="Distribution-PackageDescription.html#t:Condition">Condition</a> v -&gt; <a href="Distribution-PackageDescription.html#t:Condition">Condition</a> w) -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> v c a -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> w c a</li><li class="src short"><a href="#v:mapTreeConstrs">mapTreeConstrs</a> ::  (c -&gt; d) -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> v c a -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> v d a</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:finalizePackageDescription" class="def">finalizePackageDescription</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Distribution-PackageDescription.html#t:FlagAssignment">FlagAssignment</a></td><td class="doc"><p>Explicitly specified flag assignments
</p></td></tr><tr><td class="src">-&gt; (<a href="Distribution-Package.html#t:Dependency">Dependency</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>)</td><td class="doc"><p>Is a given depenency satisfiable from the set of available packages?
 If this is unknown then use True.
</p></td></tr><tr><td class="src">-&gt; <a href="Distribution-System.html#t:Platform">Platform</a></td><td class="doc"><p>The <code><a href="Distribution-System.html#t:Arch">Arch</a></code> and <code><a href="Distribution-System.html#t:OS">OS</a></code>
</p></td></tr><tr><td class="src">-&gt; <a href="Distribution-Compiler.html#t:CompilerId">CompilerId</a></td><td class="doc"><p>Compiler + Version
</p></td></tr><tr><td class="src">-&gt; [<a href="Distribution-Package.html#t:Dependency">Dependency</a>]</td><td class="doc"><p>Additional constraints
</p></td></tr><tr><td class="src">-&gt; <a href="Distribution-PackageDescription.html#t:GenericPackageDescription">GenericPackageDescription</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-Either.html#t:Either">Either</a> [<a href="Distribution-Package.html#t:Dependency">Dependency</a>] (<a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a>, <a href="Distribution-PackageDescription.html#t:FlagAssignment">FlagAssignment</a>)</td><td class="doc"><p>Either missing dependencies or the resolved package
 description along with the flag assignments chosen.
</p></td></tr></table></div><div class="doc"><p>Create a package description with all configurations resolved.
</p><p>This function takes a <code><a href="Distribution-PackageDescription.html#t:GenericPackageDescription">GenericPackageDescription</a></code> and several environment
 parameters and tries to generate <code><a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a></code> by finding a flag
 assignment that result in satisfiable dependencies.
</p><p>It takes as inputs a not necessarily complete specifications of flags
 assignments, an optional package index as well as platform parameters.  If
 some flags are not assigned explicitly, this function will try to pick an
 assignment that causes this function to succeed.  The package index is
 optional since on some platforms we cannot determine which packages have
 been installed before.  When no package index is supplied, every dependency
 is assumed to be satisfiable, therefore all not explicitly assigned flags
 will get their default values.
</p><p>This function will fail if it cannot find a flag assignment that leads to
 satisfiable dependencies.  (It will not try alternative assignments for
 explicitly specified flags.)  In case of failure it will return a <em>minimum</em>
 number of dependencies that could not be satisfied.  On success, it will
 return the package description and the full flag assignment chosen.
</p></div></div><div class="top"><p class="src"><a name="v:flattenPackageDescription" class="def">flattenPackageDescription</a> :: <a href="Distribution-PackageDescription.html#t:GenericPackageDescription">GenericPackageDescription</a> -&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a></p><div class="doc"><p>Flatten a generic package description by ignoring all conditions and just
 join the field descriptors into on package description.  Note, however,
 that this may lead to inconsistent field values, since all values are
 joined into one field, which may not be possible in the original package
 description, due to the use of exclusive choices (if ... else ...).
</p><p>TODO: One particularly tricky case is defaulting.  In the original package
 description, e.g., the source directory might either be the default or a
 certain, explicitly set path.  Since defaults are filled in only after the
 package has been resolved and when no explicit value has been set, the
 default path will be missing from the package description returned by this
 function.
</p></div></div><div class="top"><p class="src"><a name="v:parseCondition" class="def">parseCondition</a> ::  <a href="Distribution-Compat-ReadP.html#t:ReadP">ReadP</a> r (<a href="Distribution-PackageDescription.html#t:Condition">Condition</a> <a href="Distribution-PackageDescription.html#t:ConfVar">ConfVar</a>)</p><div class="doc"><p>Parse a configuration condition from a string.
</p></div></div><div class="top"><p class="src"><a name="v:freeVars" class="def">freeVars</a> ::  <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> <a href="Distribution-PackageDescription.html#t:ConfVar">ConfVar</a> c a -&gt; [<a href="Distribution-PackageDescription.html#t:FlagName">FlagName</a>]</p></div><div class="top"><p class="src"><a name="v:mapCondTree" class="def">mapCondTree</a> ::  (a -&gt; b) -&gt; (c -&gt; d) -&gt; (<a href="Distribution-PackageDescription.html#t:Condition">Condition</a> v -&gt; <a href="Distribution-PackageDescription.html#t:Condition">Condition</a> w) -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> v c a -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> w d b</p></div><div class="top"><p class="src"><a name="v:mapTreeData" class="def">mapTreeData</a> ::  (a -&gt; b) -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> v c a -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> v c b</p></div><div class="top"><p class="src"><a name="v:mapTreeConds" class="def">mapTreeConds</a> ::  (<a href="Distribution-PackageDescription.html#t:Condition">Condition</a> v -&gt; <a href="Distribution-PackageDescription.html#t:Condition">Condition</a> w) -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> v c a -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> w c a</p></div><div class="top"><p class="src"><a name="v:mapTreeConstrs" class="def">mapTreeConstrs</a> ::  (c -&gt; d) -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> v c a -&gt; <a href="Distribution-PackageDescription.html#t:CondTree">CondTree</a> v d 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>