
Hi, #1 I would like to know if there is any context grammar or syntax for the package dependencies that are allowed in buildDepends in each .cabal file? AnyVersion and WildcardVersion are consistent. But, I see quite a bit of variations in what is included in UnionVersionRange and IntersectVersionRange. For example: * Two WildcardVersions in a UnionVersionRange (fixed-point 0.5.0.1) [1] * UnionVersionRange and WildcardVersion in a IntersectVersionRange (hlint 1.6.12) [2] #2 Is there a way to cross-check if the defined dependencies are in fact correct, or is it left to the package owner to write them? #3 Some dependencies have an 'or' for the same package (bytestring 0.9) [3], like "base (<3) or array, base (≥3)", and the cabal file says: library if flag(split-base) build-depends: base >= 3, array else build-depends: base < 3 I use the a script [4] to convert the .cabal files to .json, then the .json lists both the build-depends! Appreciate any inputs in this regard! Thanks! SK [1] fixed-point 0.5.0.1 (see base). http://hackage.haskell.org/packages/archive/fixed-point/0.5.0.1/fixed-point.... [2] hlint 1.6.12 (see uniplate). http://hackage.haskell.org/packages/archive/hlint/1.6.12/hlint.cabal [3] bytestring 0.9. http://hackage.haskell.org/package/bytestring-0.9 [4] Cabal2json.hs. http://shakthimaan.fedorapeople.org/SOURCES/Cabal2json.hs -- Shakthi Kannan http://www.shakthimaan.com

On Wed, Jan 4, 2012 at 2:29 AM, Shakthi Kannan
#2 Is there a way to cross-check if the defined dependencies are in fact correct, or is it left to the package owner to write them?
Generally speaking, this is undecidable (if I remember my complexity classes correctly...). The semantics of a function may change between versions without altering any aspect of the API. (eg: imagine succ x = x + 2 changing to succ x = x + 1 during a bug fix). Someone did write a tool that checks a library against the package version policy, though (based on changes to the API, exposed functions, etc.). I can't recall the name, but someone else on here might. --Rogan
participants (2)
-
Rogan Creswick
-
Shakthi Kannan