This file is indexed.

/usr/share/doc/libghc-cabal-doc/html/Distribution-Package.html is in libghc-cabal-doc 1.22.5.0-2.

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
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!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.Package</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-Package.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Distribution-Package.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">Cabal-1.22.5.0: A framework for packaging Haskell software</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>Isaac Jones 2003-2004</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>cabal-devel@haskell.org</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Distribution.Package</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Package ids</a></li><li><a href="#g:2">Installed package identifiers</a></li><li><a href="#g:3">Package keys (used for linker symbols and library name)</a></li><li><a href="#g:4">Package source dependencies</a></li><li><a href="#g:5">Package classes</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Defines a package identifier along with a parser and pretty printer for it.
 <code><a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></code>s consist of a name and an exact version. It also defines
 a <code><a href="Distribution-Package.html#t:Dependency">Dependency</a></code> data type. A dependency is a package name and a version
 range, like <code>&quot;foo &gt;= 1.2 &amp;&amp; &lt; 2&quot;</code>.</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">newtype</span> <a href="#t:PackageName">PackageName</a> = <a href="#v:PackageName">PackageName</a> {<ul class="subs"><li><a href="#v:unPackageName">unPackageName</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:PackageIdentifier">PackageIdentifier</a> = <a href="#v:PackageIdentifier">PackageIdentifier</a> {<ul class="subs"><li><a href="#v:pkgName">pkgName</a> :: <a href="Distribution-Package.html#t:PackageName">PackageName</a></li><li><a href="#v:pkgVersion">pkgVersion</a> :: <a href="Distribution-Version.html#t:Version">Version</a></li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:PackageId">PackageId</a> = <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:InstalledPackageId">InstalledPackageId</a> = <a href="#v:InstalledPackageId">InstalledPackageId</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:PackageKey">PackageKey</a><ul class="subs"><li>= <a href="#v:PackageKey">PackageKey</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word64">Word64</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word64">Word64</a></li><li>| <a href="#v:OldPackageKey">OldPackageKey</a> !<a href="Distribution-Package.html#t:PackageId">PackageId</a></li></ul></li><li class="src short"><a href="#v:mkPackageKey">mkPackageKey</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Distribution-Package.html#t:PackageId">PackageId</a> -&gt; [<a href="Distribution-Package.html#t:PackageKey">PackageKey</a>] -&gt; [(<a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a>, (<a href="Distribution-Package.html#t:PackageKey">PackageKey</a>, <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a>))] -&gt; <a href="Distribution-Package.html#t:PackageKey">PackageKey</a></li><li class="src short"><a href="#v:packageKeyHash">packageKeyHash</a> :: <a href="Distribution-Package.html#t:PackageKey">PackageKey</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:packageKeyLibraryName">packageKeyLibraryName</a> :: <a href="Distribution-Package.html#t:PackageId">PackageId</a> -&gt; <a href="Distribution-Package.html#t:PackageKey">PackageKey</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Dependency">Dependency</a> = <a href="#v:Dependency">Dependency</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-Version.html#t:VersionRange">VersionRange</a></li><li class="src short"><a href="#v:thisPackageVersion">thisPackageVersion</a> :: <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a> -&gt; <a href="Distribution-Package.html#t:Dependency">Dependency</a></li><li class="src short"><a href="#v:notThisPackageVersion">notThisPackageVersion</a> :: <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a> -&gt; <a href="Distribution-Package.html#t:Dependency">Dependency</a></li><li class="src short"><a href="#v:simplifyDependency">simplifyDependency</a> :: <a href="Distribution-Package.html#t:Dependency">Dependency</a> -&gt; <a href="Distribution-Package.html#t:Dependency">Dependency</a></li><li class="src short"><span class="keyword">class</span> <a href="#t:Package">Package</a> pkg <span class="keyword">where</span><ul class="subs"><li><a href="#v:packageId">packageId</a> :: pkg -&gt; <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></li></ul></li><li class="src short"><a href="#v:packageName">packageName</a> :: <a href="Distribution-Package.html#t:Package">Package</a> pkg =&gt; pkg -&gt; <a href="Distribution-Package.html#t:PackageName">PackageName</a></li><li class="src short"><a href="#v:packageVersion">packageVersion</a> :: <a href="Distribution-Package.html#t:Package">Package</a> pkg =&gt; pkg -&gt; <a href="Distribution-Version.html#t:Version">Version</a></li><li class="src short"><span class="keyword">class</span> <a href="Distribution-Package.html#t:Package">Package</a> pkg =&gt; <a href="#t:PackageFixedDeps">PackageFixedDeps</a> pkg <span class="keyword">where</span><ul class="subs"><li><a href="#v:depends">depends</a> :: pkg -&gt; [<a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a>]</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="Distribution-Package.html#t:Package">Package</a> pkg =&gt; <a href="#t:PackageInstalled">PackageInstalled</a> pkg <span class="keyword">where</span><ul class="subs"><li><a href="#v:installedPackageId">installedPackageId</a> :: pkg -&gt; <a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a></li><li><a href="#v:installedDepends">installedDepends</a> :: pkg -&gt; [<a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a>]</li></ul></li></ul></div><div id="interface"><h1 id="g:1">Package ids</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:PackageName" class="def">PackageName</a> <a href="src/Distribution-Package.html#PackageName" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PackageName" class="def">PackageName</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:unPackageName" class="def">unPackageName</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:PackageName" class="caption collapser" onclick="toggleSection('i:PackageName')">Instances</p><div id="section.i:PackageName" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a></span> <a href="src/Distribution-Package.html#line-70" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Data.html#t:Data">Data</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a></span> <a href="src/Distribution-Package.html#line-70" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a></span> <a href="src/Distribution-Package.html#line-70" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a></span> <a href="src/Distribution-Package.html#line-70" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a></span> <a href="src/Distribution-Package.html#line-70" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-Generics.html#t:Generic">Generic</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a></span> <a href="src/Distribution-Package.html#line-70" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/binary-0.7.5.0/Data-Binary.html#t:Binary">Binary</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a></span> <a href="src/Distribution-Package.html#line-72" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.1.1/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a></span> <a href="src/Distribution-Package.html#line-86" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Distribution-Text.html#t:Text">Text</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a></span> <a href="src/Distribution-Package.html#line-74" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a></span> <a href="src/Distribution-Package.html#line-69" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PackageIdentifier" class="def">PackageIdentifier</a> <a href="src/Distribution-Package.html#PackageIdentifier" class="link">Source</a></p><div class="doc"><p>The name and version of a package.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PackageIdentifier" class="def">PackageIdentifier</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:pkgName" class="def">pkgName</a> :: <a href="Distribution-Package.html#t:PackageName">PackageName</a></dt><dd class="doc"><p>The name of this package, eg. foo</p></dd><dt class="src"><a name="v:pkgVersion" class="def">pkgVersion</a> :: <a href="Distribution-Version.html#t:Version">Version</a></dt><dd class="doc"><p>the version of this package, eg 1.2</p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:PackageIdentifier" class="caption collapser" onclick="toggleSection('i:PackageIdentifier')">Instances</p><div id="section.i:PackageIdentifier" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></span> <a href="src/Distribution-Package.html#line-98" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Data.html#t:Data">Data</a> <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></span> <a href="src/Distribution-Package.html#line-98" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></span> <a href="src/Distribution-Package.html#line-98" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a> <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></span> <a href="src/Distribution-Package.html#line-98" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></span> <a href="src/Distribution-Package.html#line-98" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-Generics.html#t:Generic">Generic</a> <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></span> <a href="src/Distribution-Package.html#line-98" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/binary-0.7.5.0/Data-Binary.html#t:Binary">Binary</a> <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></span> <a href="src/Distribution-Package.html#line-100" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.1.1/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></span> <a href="src/Distribution-Package.html#line-112" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Distribution-Text.html#t:Text">Text</a> <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></span> <a href="src/Distribution-Package.html#line-102" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Distribution-Package.html#t:Package">Package</a> <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></span> <a href="src/Distribution-Package.html#line-358" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></span> <a href="src/Distribution-Package.html#line-93" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:PackageId" class="def">PackageId</a> = <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a> <a href="src/Distribution-Package.html#PackageId" class="link">Source</a></p><div class="doc"><p>Type alias so we can use the shorter name PackageId.</p></div></div><h1 id="g:2">Installed package identifiers</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:InstalledPackageId" class="def">InstalledPackageId</a> <a href="src/Distribution-Package.html#InstalledPackageId" class="link">Source</a></p><div class="doc"><p>An InstalledPackageId uniquely identifies an instance of an installed
 package.  There can be at most one package with a given <code><a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a></code>
 in a package database, or overlay of databases.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:InstalledPackageId" class="def">InstalledPackageId</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:InstalledPackageId" class="caption collapser" onclick="toggleSection('i:InstalledPackageId')">Instances</p><div id="section.i:InstalledPackageId" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a></span> <a href="src/Distribution-Package.html#line-124" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Data.html#t:Data">Data</a> <a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a></span> <a href="src/Distribution-Package.html#line-124" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> <a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a></span> <a href="src/Distribution-Package.html#line-124" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a> <a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a></span> <a href="src/Distribution-Package.html#line-124" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a></span> <a href="src/Distribution-Package.html#line-124" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-Generics.html#t:Generic">Generic</a> <a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a></span> <a href="src/Distribution-Package.html#line-124" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/binary-0.7.5.0/Data-Binary.html#t:Binary">Binary</a> <a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a></span> <a href="src/Distribution-Package.html#line-126" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Distribution-Text.html#t:Text">Text</a> <a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a></span> <a href="src/Distribution-Package.html#line-128" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a></span> <a href="src/Distribution-Package.html#line-123" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:3">Package keys (used for linker symbols and library name)</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PackageKey" class="def">PackageKey</a> <a href="src/Distribution-Package.html#PackageKey" class="link">Source</a></p><div class="doc"><p>A <code><a href="Distribution-Package.html#t:PackageKey">PackageKey</a></code> is the notion of &quot;package ID&quot; which is visible to the
 compiler. Why is this not a <code><a href="Distribution-Package.html#t:PackageId">PackageId</a></code>? The <code><a href="Distribution-Package.html#t:PackageId">PackageId</a></code> is a user-visible
 concept written explicity in Cabal files; on the other hand, a <code><a href="Distribution-Package.html#t:PackageKey">PackageKey</a></code>
 may contain, for example, information about the transitive dependency
 tree of a package.  Why is this not an <code><a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a></code>?  A <code><a href="Distribution-Package.html#t:PackageKey">PackageKey</a></code>
 affects the ABI because it is used for linker symbols; however, an
 <code><a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a></code> can be used to distinguish two ABI-compatible versions
 of a library.</p><p>The key is defined to be a 128-bit MD5 hash, separated into two 64-bit
 components (the most significant component coming first) which are
 individually base-62 encoded (A-Z, a-z, 0-9).</p><pre>     key         ::= hash64 hash64
     hash64      ::= [A-Za-z0-9]{11}
</pre><p>The string that is hashed is specified as raw_key:</p><pre>     raw_key     ::= package_id &quot;n&quot;
                     holes_nl
                     depends_nl
     package_id  ::= package_name &quot;-&quot; package_version
     holes_nl    ::= &quot;&quot;
                   | hole_inst &quot;n&quot; holes_nl
     hole_inst   ::= modulename &quot; &quot; key &quot;:&quot; modulename
     depends_nl  ::= &quot;&quot;
                   | depend &quot;n&quot; depends_nl
     depend      ::= key
</pre><p>The holes list MUST be sorted by the first modulename; the depends list
 MUST be sorted by the key.  holes describes the backing implementations of
 all holes in the package; depends describes all of the build-depends of
 a package.  A package key MAY be used in holes even if it is not
 mentioned in depends: depends contains STRICTLY packages which are
 textually mentioned in the package description.</p><p>The trailing newline is MANDATORY.</p><p>There is also a variant of package key which is prefixed by a informational
 string.  This key MUST NOT be used in the computation of the hash proper,
 but it is useful for human-readable consumption.</p><pre>     infokey     ::= infostring &quot;_&quot; key
     infostring  ::= [A-Za-z0-9-]+
</pre><p>For example, Cabal provides a key with the first five characters of the
 package name for linker symbols.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PackageKey" class="def">PackageKey</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word64">Word64</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word64">Word64</a></td><td class="doc"><p>Modern package key which is a hash of the PackageId and the transitive
 dependency key.  Manually inline it here so we can get the instances
 we need.  Also contains a short informative string</p></td></tr><tr><td class="src"><a name="v:OldPackageKey" class="def">OldPackageKey</a> !<a href="Distribution-Package.html#t:PackageId">PackageId</a></td><td class="doc"><p>Old-style package key which is just a <code><a href="Distribution-Package.html#t:PackageId">PackageId</a></code>.  Required because
 old versions of GHC assume that the <code>sourcePackageId</code> recorded for an
 installed package coincides with the package key it was compiled with.</p></td></tr></table></div><div class="subs instances"><p id="control.i:PackageKey" class="caption collapser" onclick="toggleSection('i:PackageKey')">Instances</p><div id="section.i:PackageKey" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-Package.html#t:PackageKey">PackageKey</a></span> <a href="src/Distribution-Package.html#line-201" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Data.html#t:Data">Data</a> <a href="Distribution-Package.html#t:PackageKey">PackageKey</a></span> <a href="src/Distribution-Package.html#line-201" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> <a href="Distribution-Package.html#t:PackageKey">PackageKey</a></span> <a href="src/Distribution-Package.html#line-201" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a> <a href="Distribution-Package.html#t:PackageKey">PackageKey</a></span> <a href="src/Distribution-Package.html#line-201" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-Package.html#t:PackageKey">PackageKey</a></span> <a href="src/Distribution-Package.html#line-201" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-Generics.html#t:Generic">Generic</a> <a href="Distribution-Package.html#t:PackageKey">PackageKey</a></span> <a href="src/Distribution-Package.html#line-201" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/binary-0.7.5.0/Data-Binary.html#t:Binary">Binary</a> <a href="Distribution-Package.html#t:PackageKey">PackageKey</a></span> <a href="src/Distribution-Package.html#line-203" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.1.1/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Distribution-Package.html#t:PackageKey">PackageKey</a></span> <a href="src/Distribution-Package.html#line-299" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Distribution-Text.html#t:Text">Text</a> <a href="Distribution-Package.html#t:PackageKey">PackageKey</a></span> <a href="src/Distribution-Package.html#line-284" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Package.html#t:PackageKey">PackageKey</a></span> <a href="src/Distribution-Package.html#line-192" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:mkPackageKey" class="def">mkPackageKey</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Distribution-Package.html#t:PackageId">PackageId</a> -&gt; [<a href="Distribution-Package.html#t:PackageKey">PackageKey</a>] -&gt; [(<a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a>, (<a href="Distribution-Package.html#t:PackageKey">PackageKey</a>, <a href="Distribution-ModuleName.html#t:ModuleName">ModuleName</a>))] -&gt; <a href="Distribution-Package.html#t:PackageKey">PackageKey</a> <a href="src/Distribution-Package.html#mkPackageKey" class="link">Source</a></p><div class="doc"><p>Generates a <code><a href="Distribution-Package.html#t:PackageKey">PackageKey</a></code> from a <code><a href="Distribution-Package.html#t:PackageId">PackageId</a></code>, sorted package keys of the
 immediate dependencies.</p></div></div><div class="top"><p class="src"><a name="v:packageKeyHash" class="def">packageKeyHash</a> :: <a href="Distribution-Package.html#t:PackageKey">PackageKey</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> <a href="src/Distribution-Package.html#packageKeyHash" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:packageKeyLibraryName" class="def">packageKeyLibraryName</a> :: <a href="Distribution-Package.html#t:PackageId">PackageId</a> -&gt; <a href="Distribution-Package.html#t:PackageKey">PackageKey</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> <a href="src/Distribution-Package.html#packageKeyLibraryName" class="link">Source</a></p></div><h1 id="g:4">Package source dependencies</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Dependency" class="def">Dependency</a> <a href="src/Distribution-Package.html#Dependency" class="link">Source</a></p><div class="doc"><p>Describes a dependency on a source package (API)</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Dependency" class="def">Dependency</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-Version.html#t:VersionRange">VersionRange</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Dependency" class="caption collapser" onclick="toggleSection('i:Dependency')">Instances</p><div id="section.i:Dependency" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-Package.html#t:Dependency">Dependency</a></span> <a href="src/Distribution-Package.html#line-310" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Data.html#t:Data">Data</a> <a href="Distribution-Package.html#t:Dependency">Dependency</a></span> <a href="src/Distribution-Package.html#line-310" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a> <a href="Distribution-Package.html#t:Dependency">Dependency</a></span> <a href="src/Distribution-Package.html#line-310" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-Package.html#t:Dependency">Dependency</a></span> <a href="src/Distribution-Package.html#line-310" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-Generics.html#t:Generic">Generic</a> <a href="Distribution-Package.html#t:Dependency">Dependency</a></span> <a href="src/Distribution-Package.html#line-310" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/binary-0.7.5.0/Data-Binary.html#t:Binary">Binary</a> <a href="Distribution-Package.html#t:Dependency">Dependency</a></span> <a href="src/Distribution-Package.html#line-312" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Distribution-Text.html#t:Text">Text</a> <a href="Distribution-Package.html#t:Dependency">Dependency</a></span> <a href="src/Distribution-Package.html#line-314" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Package.html#t:Dependency">Dependency</a></span> <a href="src/Distribution-Package.html#line-309" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:thisPackageVersion" class="def">thisPackageVersion</a> :: <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a> -&gt; <a href="Distribution-Package.html#t:Dependency">Dependency</a> <a href="src/Distribution-Package.html#thisPackageVersion" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:notThisPackageVersion" class="def">notThisPackageVersion</a> :: <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a> -&gt; <a href="Distribution-Package.html#t:Dependency">Dependency</a> <a href="src/Distribution-Package.html#notThisPackageVersion" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:simplifyDependency" class="def">simplifyDependency</a> :: <a href="Distribution-Package.html#t:Dependency">Dependency</a> -&gt; <a href="Distribution-Package.html#t:Dependency">Dependency</a> <a href="src/Distribution-Package.html#simplifyDependency" class="link">Source</a></p><div class="doc"><p>Simplify the <code><a href="Distribution-Version.html#t:VersionRange">VersionRange</a></code> expression in a <code><a href="Distribution-Package.html#t:Dependency">Dependency</a></code>.
 See <code><a href="Distribution-Version.html#v:simplifyVersionRange">simplifyVersionRange</a></code>.</p></div></div><h1 id="g:5">Package classes</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Package" class="def">Package</a> pkg <span class="keyword">where</span> <a href="src/Distribution-Package.html#Package" class="link">Source</a></p><div class="doc"><p>Class of things that have a <code><a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></code></p><p>Types in this class are all notions of a package. This allows us to have
 different types for the different phases that packages go though, from
 simple name/id, package description, configured or installed packages.</p><p>Not all kinds of packages can be uniquely identified by a
 <code><a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></code>. In particular, installed packages cannot, there may be
 many installed instances of the same source package.</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:packageId" class="def">packageId</a> :: pkg -&gt; <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a> <a href="src/Distribution-Package.html#packageId" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:Package" class="caption collapser" onclick="toggleSection('i:Package')">Instances</p><div id="section.i:Package" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Distribution-Package.html#t:Package">Package</a> <a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a></span> <a href="src/Distribution-Package.html#line-358" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Distribution-Package.html#t:Package">Package</a> <a href="Distribution-PackageDescription.html#t:GenericPackageDescription">GenericPackageDescription</a></span> <a href="src/Distribution-Package.html#line-1107" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Distribution-Package.html#t:Package">Package</a> <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a></span> <a href="src/Distribution-Package.html#line-204" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Distribution-Package.html#t:Package">Package</a> (<a href="Distribution-InstalledPackageInfo.html#t:InstalledPackageInfo_">InstalledPackageInfo_</a> str)</span> <a href="src/Distribution-Package.html#line-115" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:packageName" class="def">packageName</a> :: <a href="Distribution-Package.html#t:Package">Package</a> pkg =&gt; pkg -&gt; <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="src/Distribution-Package.html#packageName" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:packageVersion" class="def">packageVersion</a> :: <a href="Distribution-Package.html#t:Package">Package</a> pkg =&gt; pkg -&gt; <a href="Distribution-Version.html#t:Version">Version</a> <a href="src/Distribution-Package.html#packageVersion" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="Distribution-Package.html#t:Package">Package</a> pkg =&gt; <a name="t:PackageFixedDeps" class="def">PackageFixedDeps</a> pkg <span class="keyword">where</span> <a href="src/Distribution-Package.html#PackageFixedDeps" class="link">Source</a></p><div class="doc"><p>Subclass of packages that have specific versioned dependencies.</p><p>So for example a not-yet-configured package has dependencies on version
 ranges, not specific versions. A configured or an already installed package
 depends on exact versions. Some operations or data structures (like
  dependency graphs) only make sense on this subclass of package types.</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:depends" class="def">depends</a> :: pkg -&gt; [<a href="Distribution-Package.html#t:PackageIdentifier">PackageIdentifier</a>] <a href="src/Distribution-Package.html#depends" class="link">Source</a></p></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="Distribution-Package.html#t:Package">Package</a> pkg =&gt; <a name="t:PackageInstalled" class="def">PackageInstalled</a> pkg <span class="keyword">where</span> <a href="src/Distribution-Package.html#PackageInstalled" class="link">Source</a></p><div class="doc"><p>Class of installed packages.</p><p>The primary data type which is an instance of this package is
 <code>InstalledPackageInfo</code>, but when we are doing install plans in Cabal install
 we may have other, installed package-like things which contain more metadata.
 Installed packages have exact dependencies <code><a href="Distribution-Package.html#v:installedDepends">installedDepends</a></code>.</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:installedPackageId" class="def">installedPackageId</a> :: pkg -&gt; <a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a> <a href="src/Distribution-Package.html#installedPackageId" class="link">Source</a></p><p class="src"><a name="v:installedDepends" class="def">installedDepends</a> :: pkg -&gt; [<a href="Distribution-Package.html#t:InstalledPackageId">InstalledPackageId</a>] <a href="src/Distribution-Package.html#installedDepends" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:PackageInstalled" class="caption collapser" onclick="toggleSection('i:PackageInstalled')">Instances</p><div id="section.i:PackageInstalled" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Distribution-Package.html#t:PackageInstalled">PackageInstalled</a> (<a href="Distribution-InstalledPackageInfo.html#t:InstalledPackageInfo_">InstalledPackageInfo_</a> str)</span> <a href="src/Distribution-Package.html#line-118" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>