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

Rémy Oudompheng remyoudompheng at gmail.com
Sat Oct 12 07:37:51 UTC 2013

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.

I can suggest the attached patch, that would lead to the output you want.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Less-restrictive-version-requirements-in-output.patch
Type: text/x-patch
Size: 3109 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/arch-haskell/attachments/20131012/27136587/attachment.bin>

More information about the arch-haskell mailing list