Cabal-1.4.0.1: A framework for packaging Haskell softwareContentsIndex
Distribution.PackageDescription.Check
Portabilityportable
Stabilityalpha
MaintainerLennart Kolmodin <kolmodin@gentoo.org>
Contents
Package Checking
Description
This module provides functionality to check for common mistakes.
Synopsis
data PackageCheck
= PackageBuildImpossible {
explanation :: String
}
| PackageBuildWarning {
explanation :: String
}
| PackageDistSuspicious {
explanation :: String
}
| PackageDistInexcusable {
explanation :: String
}
checkPackage :: GenericPackageDescription -> Maybe PackageDescription -> [PackageCheck]
checkConfiguredPackage :: PackageDescription -> [PackageCheck]
checkPackageFiles :: PackageDescription -> FilePath -> IO [PackageCheck]
Package Checking
data PackageCheck

Results of some kind of failed package check.

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.

Constructors
PackageBuildImpossibleThis package description is no good. There's no way it's going to build sensibly. This should give an error at configure time.
explanation :: String
PackageBuildWarningA 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.
explanation :: String
PackageDistSuspiciousAn 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.
explanation :: String
PackageDistInexcusableAn 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.
explanation :: String
show/hide Instances
checkPackage :: GenericPackageDescription -> Maybe PackageDescription -> [PackageCheck]

Check for common mistakes and problems in package descriptions.

This is the standard collection of checks covering all apsects except for checks that require looking at files within the package. For those see checkPackageFiles.

It requires the GenericPackageDescription and optionally a particular configuration of that package. If you pass Nothing then we just check a version of the generic description using flattenPackageDescription.

checkConfiguredPackage :: PackageDescription -> [PackageCheck]
checkPackageFiles :: PackageDescription -> FilePath -> IO [PackageCheck]
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.
Produced by Haddock version 0.8