
This proposal is now accepted, with support from Duncan, Herbert and
myself. No objections were raised.
If all goes well, versionTags will be deprecated in GHC 7.10, and removed
in GHC 7.12.
Code review: https://phabricator.haskell.org/D395
Ticket: https://ghc.haskell.org/trac/ghc/ticket/2496
On Tue, Sep 23, 2014 at 11:57 PM, Thomas Miedema
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 EQ > a == b False
* 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.
[1] https://ghc.haskell.org/trac/ghc/ticket/2496 [2] http://www.haskell.org/haskellwiki/Package_versioning_policy [3] https://github.com/haskell/cabal/issues/890 [4] http://www.haskell.org/cabal/users-guide/developing-packages.html#package-na...