[Haskell-cafe] How to determine correct dependency versions for a library?

Janek S. fremenzone at poczta.onet.pl
Fri Nov 9 17:15:26 CET 2012


Recently I started developing a Haskell library and I have a question about package dependencies. 
Right now when I need my project to depend on some other package I only specify the package name 
in cabal file and don't bother with providing the package version. This works because I am the 
only user of my library but I am aware that if the library were to be released on Hackage I would 
have to supply version numbers in the dependencies. The question is how to determine proper 
version numbers?

I can be conservative and assume that version of libraries in my system are the minimum required 
ones. This is of course not a good solution, because my library might work with earlier versions 
but I don't know a way to check that. What is the best way to determine a minimal version of a 
package required by my library?

I also don't see any sane way of determining maximum allowed versions for the dependencies, but 
looking at other packages I see that this is mostly ignored and package maintainers only supply 
lower versions. Is this correct approach?

Janek



More information about the Haskell-Cafe mailing list