[Haskell-cafe] Cabal dependencies

Stephen Hicks sdh33 at cornell.edu
Thu Jan 15 18:38:59 EST 2009


Hi,

I'm having some difficulty specifying dependencies in my .cabal file
for a package I'm looking to upload to hackage soon.  The difficulty
is as follows.  I basically want to specify
  parsec (>= 2.1 && < 3.0.0) || (> 3.0.0 && < 4)
The problem is that 3.0.0 as it exists on hackage is missing a
constructor that I need (namely, Postfix, in the compatibility
module).  The bug was fixed and will presumably work fine if a newer
version of parsec is ever uploaded to hackage, and my package works
fine with older parsecs as well - I just want to exclude this one
version.  How can I go about doing that?

A secondary question is this - I can actually compile with version
3.0.0 by just not using this constructor, although it does reduce the
package's functionality.  I've seen flags in various .cabal files, and
presumably I could invent a flag to make it work with 3.0.0, but I'm
confused about how these flags are set.  Specifically, cabal-install
has never asked me anything about flags, so what's the point?  Or does
it automatically set whichever flags satisfy the dependencies?

Thanks,
steve


More information about the Haskell-Cafe mailing list