darcs patch: Fix the version-range parser to allow arbitrary expres...

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Thu Sep 10 16:14:02 EDT 2009


On Thu, 2009-09-10 at 20:15 +0100, Malcolm.Wallace at cs.york.ac.uk wrote:
> Thu Sep 10 20:09:12 BST 2009  Malcolm.Wallace at cs.york.ac.uk
>   * Fix the version-range parser to allow arbitrary expressions over constraints.
>   Previously, only a single conjunction (&&) or disjunction (||) was
>   parseable, despite an internal representation that permits arbitrary
>   combinations.  Now, any sequence of (&&) and (||) combining forms is
>   parsed.  (&&) binds more tightly than (||).

Thanks Malcolm, this is good. The only extra thing we need is a check in
Distribution.PackageDescription.Check to make sure that if you're using
the more general syntax that the .cabal file specify "cabal-version: >=
1.8". It should be fairly straightforward to do that since we just look
at all the VersionRange expressions in the GenericPackageDescription
(and it must be the GenericPackageDescription not the flattened
PackageDescription) and see if any are using the more general expression
forms.

Duncan



More information about the cabal-devel mailing list