[Haskell-cafe] Optional C dependencies / build-time feature toggles

Brandon Allbery allbery.b at gmail.com
Sun Dec 11 19:20:45 UTC 2016

On Sun, Dec 11, 2016 at 11:53 AM, Tobias Dammers <tdammers at gmail.com> wrote:

> And, regarding feature toggles, this bit in the Cabal FAQ baffles me a
> little:
> > Question: I like to let the user enable extended functionality using a
> > Cabal flag. Is this the right way?
> >
> > Answer: Certainly not. Since other packages can distinguish packages
> > only according to their name and their version, it is not a good idea
> > to allow different APIs for the same package version. Cumbersome as it
> > is you have to move extra features to a separate package.
> Moving the features to a separate package wouldn't really solve anything
> AFAICT, because I'd still have to bring them together somehow.

This is the same as the variants problem with MacPorts: you can't have
another port depend on a variant, because then dependency calculation
(already nightmarish) gets a combinatorial explosion on top of all the
existing problems.

brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20161211/f97b3f49/attachment.html>

More information about the Haskell-Cafe mailing list