Sophie

Sophie

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

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.Check</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-Check.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.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="../base-4.5.1.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="../base-4.5.1.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="../base-4.5.1.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="../base-4.5.1.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> -&gt; <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; [<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> -&gt; [<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> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="../base-4.5.1.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="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Distribution-PackageDescription-Check.html#t:CheckPackageContentOps">CheckPackageContentOps</a> m -&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; 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="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:doesDirectoryExist">doesDirectoryExist</a> :: <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li></ul>}</li><li class="src short"><a href="#v:checkPackageFileNames">checkPackageFileNames</a> :: [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>] -&gt; [<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 name="t:PackageCheck" class="def">PackageCheck</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 name="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><dl><dt class="src"><a name="v:explanation" class="def">explanation</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="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><dl><dt class="src"><a name="v:explanation" class="def">explanation</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="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 determental 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><dl><dt class="src"><a name="v:explanation" class="def">explanation</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="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><dl><dt class="src"><a name="v:explanation" class="def">explanation</a> :: <a href="../base-4.5.1.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:PackageCheck" class="caption collapser" onclick="toggleSection('i:PackageCheck')">Instances</p><div id="section.i:PackageCheck" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:checkPackage" class="def">checkPackage</a> :: <a href="Distribution-PackageDescription.html#t:GenericPackageDescription">GenericPackageDescription</a> -&gt; <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</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 apsects 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="../base-4.5.1.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 name="v:checkConfiguredPackage" class="def">checkConfiguredPackage</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</a>]</p></div><h2 id="g:2">Checking package contents
</h2><div class="top"><p class="src"><a name="v:checkPackageFiles" class="def">checkPackageFiles</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</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 filepath.
</p></div></div><div class="top"><p class="src"><a name="v:checkPackageContent" class="def">checkPackageContent</a> :: <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Distribution-PackageDescription-Check.html#t:CheckPackageContentOps">CheckPackageContentOps</a> m -&gt; <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; m [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</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 name="t:CheckPackageContentOps" class="def">CheckPackageContentOps</a> m </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 name="v:CheckPackageContentOps" class="def">CheckPackageContentOps</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:doesFileExist" class="def">doesFileExist</a> :: <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:doesDirectoryExist" class="def">doesDirectoryExist</a> :: <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:checkPackageFileNames" class="def">checkPackageFileNames</a> :: [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>] -&gt; [<a href="Distribution-PackageDescription-Check.html#t:PackageCheck">PackageCheck</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.11.0</p></div></body></html>