
Hi All,
- VersionRange does not passes parse tests, iff more than two ranges is present. As far as I could see, the parse method is wired to handle only two ranges. Not corrected, because found no good solution. Need help on this!
Right, currently the parser only allows one conjunction and no brackets. There's an open ticket to allow more general expressions. http://hackage.haskell.org/trac/hackage/ticket/484 For the moment then it's ok for this test to fail. We can expect it'll be fixed when ticket #484 is completed.
I'm trying to solve this as well. http://sites.google.com/site/rizsotto/patches/cabal-ticket-484.v1.darcs-send For a start I modified the disp method only. I wanted to see what output shall be parsed. Please review it.
compat :: VersionRange compat = betweenVersionsInclusive (Version {versionBranch = [2,0,1], versionTags = []}) (Version {versionBranch = [2,3], versionTags = []})
brackets :: VersionRange brackets = unionVersionRanges compat compat
From the test values above it makes the following:
*Test Distribution.Text> show $ disp compat ">=2.0.1 && <=2.3" *Test Distribution.Text> show $ disp brackets "( >=2.0.1 && <=2.3 ) || ( >=2.0.1 && <=2.3 )" If it is the right way to do, I'm going to write the parser for it. Regards, Laszlo