
#369: Version ranges should be simplified before printing ----------------------------+----------------------------------------------- Reporter: nominolo | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: minor | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.9 | Platform: ----------------------------+----------------------------------------------- Changes (by duncan): * summary: Version range printing is inconsistent => Version ranges should be simplified before printing Comment: If we look at `scion.cabal` we find (simplified): {{{ executable test build-depends: base >= 4 && < 5, ghc-paths >= 0.1 && < 0.2, ghc >= 6.10 && < 6.12 executable test_get_imports build-depends: base >= 4 && < 5, ghc-paths >= 0.1 && < 0.2, ghc >= 6.10 && < 6.12, ghc-syb >= 0.1 && < 0.2, directory >= 1.0 && < 1.1 }}} Note that `ghc-paths >= 0.1 && < 0.2` is mentioned in both executable stanzas. The dependencies of the package as a whole are the combination of the dependencies of each stanza. It may be sensible for complexity of presentation purposes to simplify version ranges. We could add a function {{{ VersionRange.simplify :: VersionRange -> VersionRange }}} which should satisfy the property {{{ forall vr v. eval (simplify vr) v == eval vr v where eval = flip withinRange }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/369#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects