Proposal: remove versionTags from Data.Version

Thomas Miedema thomasmiedema at
Tue Sep 23 21:57:47 UTC 2014

Version in Data.Version from base is defined as:

    data Version = Version { versionBranch :: [Int], versionTags ::
[String] }

    instance Eq Version where
      v1 == v2  =  versionBranch v1 == versionBranch v2
                    && sort (versionTags v1) == sort (versionTags v2)
                    -- tags may be in any order

    instance Ord Version where
      v1 `compare` v2 = versionBranch v1 `compare` versionBranch v2

## Proposal
Remove the `versionTags` field from this type.

## Motivation
* The Eq and Ord instances of Version don't agree whether two versions
with different
versionTags are equal or not [1]:

    > a = Version [1] ["a"]
    > b = Version [1] ["b"]
    > compare a b
    > a == b

* The Package versioning policy does not include version tags [2].
* Cabal no longer supports package version tags [3,4].

Discussion period: 2 weeks.

Note: this is not a proposal to ignore trailing zeros when comparing
versions. Neither is this is a proposal to change the Eq instance for
Version to only consider the versionBranch field. This is a proposal to
remove versionTags altogether.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list