id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	difficulty	ghcversion	platform
232	implement extended syntax for package version ranges	duncan	nominolo	"Revised proposal: http://www.haskell.org/pipermail/cabal-devel/2008-January/001786.html

Reproduced here:

In order to make it easy for package package authors to describe correct and robust dependencies we (Duncan Coutts and I) propose the following syntactical extension to version range specifications in package files.

== Wildcards ==

{{{
  ~ 1.2.*  ~~>  >= 1.2 && < 1.3
}}}

in general

{{{
  ~ x.y.*   ~~>   >= x.y && < x.(y+1)
}}}

The ""~"" operator should be read as ""in the range of"".  Another option would have been ""-"", but this is used to specify exact versions in other parts of the Cabal infrastructure , e.g., ""cabal install xmonad-0.5"".

This is the most common specification of package dependencies.  The assumption is that changes in the last version number indicate only backwards compatible changes, as is suggested in the new package versioning policy [1].  The use of ""*"" matches the common usage as a wildcard character.

== Upward Ranges ==

{{{
 ~ 1.2.1+  ~~>  >= 1.2.1 && < 1.3
}}}

in general

{{{
 ~ x.y.z+  ~~>  >= x.y.z && < x.(y+1)
}}}

The idea here is that sometimes packages need a certain patch level or, as in Cabal's case, a stable release and possible further bugfixes.  In those cases the wildcard notation is too liberal, however the explicit range description would be too noisy (and possibly error prone).  (Also, using ""+"" instead of ""*"" serves as better visual distinction.)
"	enhancement	closed	normal	Cabal-1.6	Cabal library	1.2.3.0	normal	fixed			normal	6.8.2	
