[Haskell-cafe] Dependency trickery

Andrew Coppin andrewcoppin at btinternet.com
Sun Jan 17 05:09:14 EST 2010


Suppose I write some code that can work with Gtk2hs or wxHaskell. How do 
I go about making that into a package?

Specifically, how do I make it so that you don't have to install Gtk2hs 
*and* wxHaskell to build it? Do I have to actually make it into two 
seperate packages to do that?

Also, supposing we have another package which requires the first, but 
doesn't care whether it's using Gtk2hs or wxHaskell. How do I do that? 
Obviously the answer depends on what happens in the previous step. If I 
make two seperate packages, for example, and they both export the same 
module, can I just add optional dependancies on both? Does Cabal support 
that?

Not that I'm attempting to *do* this, you understand. I'd just like to 
know if it's possible...



More information about the Haskell-Cafe mailing list