RFC: Extended version-range descriptions for Cabal

Ian Lynagh igloo at earth.li
Mon Sep 24 17:02:28 EDT 2007


On Mon, Sep 24, 2007 at 09:53:16PM +0200, Thomas Schilling wrote:
>
> can lead to rather awkward descriptions of common version ranges, for
> example,
> 
>   base >= 1 && < 2 

I don't think anything more is needed, but...

> (1) Wildcards:
> 
>   1.*   ~~>   >= 1 && < 2
> 
> in general
> 
>   m.n.o.*   ~~>    >= m.n.o && < m.n.(o+1) 

I have no objections to this.

> Note, that the translation is not ">= 1.0 && < 2", because that would
> exclude version "1", as [1] < [1,0] == True.

I'm not convinced that that isn't a bug.

> (2) Ranges:
> 
>   1 - 2.1   ~~>    >= 1 && <= 2.1

I don't like that. I don't think someone writing that means to not
include 2.1.0.0.1.

> If the upper limit is supposed to be exclusive, this can be combined
> with (1):
> 
>   1 - 2.0.*  ~~>  >= 1 && < 2.1

This reads very oddly to me.

> I'd like include this into Cabal-1.2 which is scheduled with the next
> ghc release, so it can fearlessly be used when getting packages ready
> for GC 6.8.1.

I'd prefer we had more time to consider the syntax, as we don't want to
be stuck with supporting whatever we come up with in the eleventh hour.


Thanks
Ian



More information about the Libraries mailing list