The Haskell CabalSource codeContentsIndex
Portability GHC
Stability alpha
Maintainer Isaac Jones <>
Explanation: Uses the parsed command-line from Distribution.Setup in order to build haskell tools using a backend build system based on Make.
module Distribution.Package
data License
| BSD3
| BSD4
| PublicDomain
| AllRightsReserved
| OtherLicense FilePath
data Version = Version {
versionBranch :: [Int]
versionTags :: [String]
defaultMain :: IO ()
defaultMainNoRead :: PackageDescription -> IO ()
module Distribution.Package
data License
OtherLicense FilePath
Read License
Show License
Eq License
data Version

A Version represents the version of a software entity.

An instance Eq is provided, which implements exact equality modulo reordering of the tags in the versionTags field.

The interpretation of ordering is dependent on the entity being versioned, and perhaps the application. For example, simple branch ordering is probably sufficient for many uses (see the versionBranch field), but some versioning schemes may include pre-releases which have tags pre1, pre2, and so on, and these would need to be taken into account when determining ordering. In some cases, date ordering may be more appropriate, so the application would have to look for date tags in the versionTags field and compare those.

Similarly, concrete representations of versions may differ, so we leave parsing and printing up to the application.

versionBranch :: [Int]

The numeric branch for this version. This reflects the fact that most software versions are tree-structured; there is a main trunk which is tagged with versions at various points (1,2,3...), and the first branch off the trunk after version 3 is 3.1, the second branch off the trunk after version 3 is 3.2, and so on. The tree can be branched arbitrarily, just by adding more digits.

We represent the branch as a list of Int, so version 3.2.1 becomes [3,2,1]. Lexicographic ordering (i.e. the default instance of Ord for [Int]) gives the natural ordering of branches.

versionTags :: [String]A version can be tagged with an arbitrary list of strings. The interpretation of the list of tags is entirely dependent on the entity that this version applies to.
Eq Version
Read Version
Show Version
defaultMain :: IO ()
defaultMainNoRead :: PackageDescription -> IO ()
Produced by Haddock version 0.6