[arch-haskell] Adding another data file for dependency "hints"

Xyne xyne at archlinux.ca
Sat Oct 12 07:37:52 UTC 2013


On 2011-01-02 12:18 +0100 (00:7)
Rémy Oudompheng wrote:

> On 2011/1/2 Peter Simons <simons at cryp.to> wrote:
> > Rémy Oudompheng writes:
> >
> >  > https://github.com/archhaskell/cabal2arch/issues#issue/19.
> >
> > the gist of this issue is that "parsec >= 3.0 || == 2.1.*" is translated to
> > "parsec>=3.0", which is just plain wrong. Now, wouldn't it be easiest to
> > modify cabal2arch so that it translates that specification to "parsec>=2.1"?
> > A straight-forward algorithm to accomplish that would be to use the *lowest*
> > version bound in these kinds of alternatives. Right now, cabal2arch appears
> > to be using the *first* version bound, which is not exactly optimal.
> >
> > Am I missing something?
> 
> Dependencies are expressed as a union of intervals : here
>   [2.1, 2.2) union [3.0, infinity)
> (square brackets mean inclusive, parentheses mean exclusive bounds).
> 
> * how should multiple intervals be treated ? I currently use the last
> one, Peter suggests to use the first one, maybe we should use the
> convex hull of possible dependencies ?
> * when the dependency spec is reduced to a single interval [a,b]
> should we output >=a or <=b ? if the interval is unbounded then there
> is no problem.

The wording of your reply implies that you are unaware that you can specify
single intervals. Perhaps that was unintentional, but in case it wasn't I give
the following example: depends=('foo>=a' 'foo<=b'). You can also use ">" and
"<", so a single interval, bounded or unbounded, is not a problem. For multiple
versions it makes sense to use the one that is satisfiable by the current set
of packages.

If that doesn't work, can you give an example of when a package actually needs
multiple intervals?




More information about the arch-haskell mailing list