[Hackage] #369: Version ranges should be simplified before
printing
Hackage
trac at galois.com
Sun Feb 8 10:24:10 EST 2009
#369: Version ranges should be simplified before printing
----------------------------+-----------------------------------------------
Reporter: nominolo | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Cabal-1.8
Component: Cabal library | Version: HEAD
Severity: minor | Resolution:
Keywords: | Difficulty: very easy (<1 hour)
Ghcversion: | Platform:
----------------------------+-----------------------------------------------
Changes (by duncan):
* difficulty: normal => very easy (<1 hour)
* ghcversion: 6.9 =>
* milestone: => Cabal-1.8
Comment:
Sometimes these are quite entertainingly long. For example with happstack-
server:
{{{
cabal: Unresolved dependencies: base >=3&&<4, base >=3&&<4,
base >=3&&<4, base >=3&&<4, base >=3&&<4, base >=3&&<4,
base >=3&&<4, base >=3&&<4, base >=3&&<4
}}}
No, really. :-)
With the new version intervals adt we've got a function:
{{{
simplifyVersionRange :: VersionRange -> VersionRange
}}}
which should make this stuff easy. Just take the intersection of version
constraints per-package and simplify and print. A slightly more
sophisticated approach would be to check that taking intersections does
not end up with an empty range, ie that the constraints are necessarily
unsatisfiable irrespective of potential available packages. The intervals
adt also makes this check easy and efficient.
--
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/369#comment:3>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects
More information about the cabal-devel
mailing list