Proposal: remove versionTags from Data.Version
Duncan Coutts
duncan.coutts at googlemail.com
Wed Sep 24 08:21:20 UTC 2014
On Wed, 2014-09-24 at 00:01 +0200, Henning Thielemann wrote:
> On Tue, 23 Sep 2014, Thomas Miedema wrote:
>
> > ## 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].
>
>
> How are versions of pkg-config handled? pkg-config does not always return
> numeric versions.
The pkg-config versions with string (e.g. 0.9.8b) do not map cleanly
onto the Version type, neither with tags nor without. The strings in
pkg-config versions are part of the version and are included in the
(complicated) ordering rules, where as Data.Version version tags are
explicitly an unordered set, so the pkg-config alphanumeric versions do
not map onto those tags.
Basically pkg-config style versions need handling specially if you want
to cover the full alphanumeric versions. In practice Cabal has always
done this wrong, by only handling the common numeric subset. It's never
been a high enough priority to handle in full. Except for old versions
of OpenSSL this has not been too much of problem in practice.
Duncan
More information about the Libraries
mailing list