
On 2011/1/2 Peter Simons
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. -- Rémy.