/usr/share/doc/libghc-cabal-doc/html/Distribution-PackageDescription-Check.html is in libghc-cabal-doc 1.24.1.0-1.
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 | <!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.Check</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Distribution-PackageDescription-Check.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Distribution-PackageDescription-Check.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.24.1.0: A framework for packaging Haskell software</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>Lennart Kolmodin 2008</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>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Distribution.PackageDescription.Check</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Package Checking</a><ul><li><a href="#g:2">Checking package contents</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This has code for checking for various problems in packages. There is one
set of checks that just looks at a <code><a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a></code> in isolation and
another set of checks that also looks at files in the package. Some of the
checks are basic sanity checks, others are portability standards that we'd
like to encourage. There is a <code><a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a></code> type that distinguishes the
different kinds of check so we can see which ones are appropriate to report
in different situations. This code gets uses when configuring a package when
we consider only basic problems. The higher standard is uses when when
preparing a source tarball and by Hackage when uploading new packages. The
reason for this is that we want to hold packages that are expected to be
distributed to a higher standard than packages that are only ever expected
to be used on the author's own environment.</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:PackageCheck">PackageCheck</a><ul class="subs"><li>= <a href="#v:PackageBuildImpossible">PackageBuildImpossible</a> { <ul class="subs"><li><a href="#v:explanation">explanation</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li></ul> }</li><li>| <a href="#v:PackageBuildWarning">PackageBuildWarning</a> { <ul class="subs"><li><a href="#v:explanation">explanation</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li></ul> }</li><li>| <a href="#v:PackageDistSuspicious">PackageDistSuspicious</a> { <ul class="subs"><li><a href="#v:explanation">explanation</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li></ul> }</li><li>| <a href="#v:PackageDistSuspiciousWarn">PackageDistSuspiciousWarn</a> { <ul class="subs"><li><a href="#v:explanation">explanation</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li></ul> }</li><li>| <a href="#v:PackageDistInexcusable">PackageDistInexcusable</a> { <ul class="subs"><li><a href="#v:explanation">explanation</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li></ul> }</li></ul></li><li class="src short"><a href="#v:checkPackage">checkPackage</a> :: <a href="Distribution-PackageDescription.html#t:GenericPackageDescription">GenericPackageDescription</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -> [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a>]</li><li class="src short"><a href="#v:checkConfiguredPackage">checkConfiguredPackage</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -> [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a>]</li><li class="src short"><a href="#v:checkPackageFiles">checkPackageFiles</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a>]</li><li class="src short"><a href="#v:checkPackageContent">checkPackageContent</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Distribution-PackageDescription-Check.html#t:CheckPackageContentOps">CheckPackageContentOps</a> m -> <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -> m [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:CheckPackageContentOps">CheckPackageContentOps</a> m = <a href="#v:CheckPackageContentOps">CheckPackageContentOps</a> {<ul class="subs"><li><a href="#v:doesFileExist">doesFileExist</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:doesDirectoryExist">doesDirectoryExist</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:getDirectoryContents">getDirectoryContents</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> m [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>]</li><li><a href="#v:getFileContents">getFileContents</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li></ul>}</li><li class="src short"><a href="#v:checkPackageFileNames">checkPackageFileNames</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>] -> [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a>]</li></ul></div><div id="interface"><h1 id="g:1">Package Checking</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:PackageCheck" class="def">PackageCheck</a> <a href="src/Distribution-PackageDescription-Check.html#PackageCheck" class="link">Source</a> <a href="#t:PackageCheck" class="selflink">#</a></p><div class="doc"><p>Results of some kind of failed package check.</p><p>There are a range of severities, from merely dubious to totally insane.
All of them come with a human readable explanation. In future we may augment
them with more machine readable explanations, for example to help an IDE
suggest automatic corrections.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:PackageBuildImpossible" class="def">PackageBuildImpossible</a></td><td class="doc"><p>This package description is no good. There's no way it's going to
build sensibly. This should give an error at configure time.</p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:explanation" class="def">explanation</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></dfn><div class="doc empty"> </div></li></ul></div></td></tr><tr><td class="src"><a id="v:PackageBuildWarning" class="def">PackageBuildWarning</a></td><td class="doc"><p>A problem that is likely to affect building the package, or an
issue that we'd like every package author to be aware of, even if
the package is never distributed.</p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:explanation" class="def">explanation</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></dfn><div class="doc empty"> </div></li></ul></div></td></tr><tr><td class="src"><a id="v:PackageDistSuspicious" class="def">PackageDistSuspicious</a></td><td class="doc"><p>An issue that might not be a problem for the package author but
might be annoying or detrimental when the package is distributed to
users. We should encourage distributed packages to be free from these
issues, but occasionally there are justifiable reasons so we cannot
ban them entirely.</p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:explanation" class="def">explanation</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></dfn><div class="doc empty"> </div></li></ul></div></td></tr><tr><td class="src"><a id="v:PackageDistSuspiciousWarn" class="def">PackageDistSuspiciousWarn</a></td><td class="doc"><p>Like PackageDistSuspicious but will only display warnings
rather than causing abnormal exit when you run 'cabal check'.</p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:explanation" class="def">explanation</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></dfn><div class="doc empty"> </div></li></ul></div></td></tr><tr><td class="src"><a id="v:PackageDistInexcusable" class="def">PackageDistInexcusable</a></td><td class="doc"><p>An issue that is OK in the author's environment but is almost
certain to be a portability problem for other environments. We can
quite legitimately refuse to publicly distribute packages with these
problems.</p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:explanation" class="def">explanation</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></dfn><div class="doc empty"> </div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:PackageCheck" class="caption collapser" onclick="toggleSection('i:PackageCheck')">Instances</p><div id="section.i:PackageCheck" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PackageCheck:Eq:1" class="instance expander" onclick="toggleSection('i:id:PackageCheck:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a></span> <a href="src/Distribution-PackageDescription-Check.html#line-102" class="link">Source</a> <a href="#t:PackageCheck" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PackageCheck:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a> -> <a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a> -> <a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PackageCheck:Show:2" class="instance expander" onclick="toggleSection('i:id:PackageCheck:Show:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a></span> <a href="src/Distribution-PackageDescription-Check.html#line-104" class="link">Source</a> <a href="#t:PackageCheck" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PackageCheck:Show:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:checkPackage" class="def">checkPackage</a> :: <a href="Distribution-PackageDescription.html#t:GenericPackageDescription">GenericPackageDescription</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -> [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a>] <a href="src/Distribution-PackageDescription-Check.html#checkPackage" class="link">Source</a> <a href="#v:checkPackage" class="selflink">#</a></p><div class="doc"><p>Check for common mistakes and problems in package descriptions.</p><p>This is the standard collection of checks covering all aspects except
for checks that require looking at files within the package. For those
see <code><a href="Distribution-PackageDescription-Check.html#v:checkPackageFiles">checkPackageFiles</a></code>.</p><p>It requires the <code><a href="Distribution-PackageDescription.html#t:GenericPackageDescription">GenericPackageDescription</a></code> and optionally a particular
configuration of that package. If you pass <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code> then we just check
a version of the generic description using <code><a href="Distribution-PackageDescription-Configuration.html#v:flattenPackageDescription">flattenPackageDescription</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:checkConfiguredPackage" class="def">checkConfiguredPackage</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -> [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a>] <a href="src/Distribution-PackageDescription-Check.html#checkConfiguredPackage" class="link">Source</a> <a href="#v:checkConfiguredPackage" class="selflink">#</a></p></div><h2 id="g:2">Checking package contents</h2><div class="top"><p class="src"><a id="v:checkPackageFiles" class="def">checkPackageFiles</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a>] <a href="src/Distribution-PackageDescription-Check.html#checkPackageFiles" class="link">Source</a> <a href="#v:checkPackageFiles" class="selflink">#</a></p><div class="doc"><p>Sanity check things that requires IO. It looks at the files in the
package and expects to find the package unpacked in at the given file path.</p></div></div><div class="top"><p class="src"><a id="v:checkPackageContent" class="def">checkPackageContent</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Distribution-PackageDescription-Check.html#t:CheckPackageContentOps">CheckPackageContentOps</a> m -> <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -> m [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a>] <a href="src/Distribution-PackageDescription-Check.html#checkPackageContent" class="link">Source</a> <a href="#v:checkPackageContent" class="selflink">#</a></p><div class="doc"><p>Sanity check things that requires looking at files in the package.
This is a generalised version of <code><a href="Distribution-PackageDescription-Check.html#v:checkPackageFiles">checkPackageFiles</a></code> that can work in any
monad for which you can provide <code><a href="Distribution-PackageDescription-Check.html#t:CheckPackageContentOps">CheckPackageContentOps</a></code> operations.</p><p>The point of this extra generality is to allow doing checks in some virtual
file system, for example a tarball in memory.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:CheckPackageContentOps" class="def">CheckPackageContentOps</a> m <a href="src/Distribution-PackageDescription-Check.html#CheckPackageContentOps" class="link">Source</a> <a href="#t:CheckPackageContentOps" class="selflink">#</a></p><div class="doc"><p>A record of operations needed to check the contents of packages.
Used by <code><a href="Distribution-PackageDescription-Check.html#v:checkPackageContent">checkPackageContent</a></code>.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:CheckPackageContentOps" class="def">CheckPackageContentOps</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:doesFileExist" class="def">doesFileExist</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:doesDirectoryExist" class="def">doesDirectoryExist</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:getDirectoryContents" class="def">getDirectoryContents</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> m [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>]</dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:getFileContents" class="def">getFileContents</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></dfn><div class="doc empty"> </div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><a id="v:checkPackageFileNames" class="def">checkPackageFileNames</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a>] -> [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a>] <a href="src/Distribution-PackageDescription-Check.html#checkPackageFileNames" class="link">Source</a> <a href="#v:checkPackageFileNames" class="selflink">#</a></p><div class="doc"><p>Check the names of all files in a package for portability problems. This
should be done for example when creating or validating a package tarball.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>
|