views:

49

answers:

1

I'm a beginner Haskell programmer. I have written some useful code for the last six month. And I want to release a library from it. The code will use system installation cabal as any Haskell library. A library is released with cabal has a meta data file where there is a logical predicate from the libraries and their versions.

A developer usually uses one set libraries. It tediously care a set of the sets libraries. How to know either my library is compiled successfully or not for some subset libraries?

+1  A: 

I'd say the best way to check the version range specified in a .cabal file is to try installing the package.

Cabal will ignore any packages you have installed on your machine that are not specifically referred to from your package description file.

For example, if you have somepackage-2.1 installed, but your .cabal file specifies somepackage >= 1.0 && < 2.0, cabal-install will try to download a version of the package from that range. This means that you won't accidentally use a package that is on your machine, but not specified in the package description.

Installing a package is easy, you can just run cabal install from the directory containing the .cabal file.

Tom Lokhorst