MIN_VERSION_foo() macro vs. CABAL-flag directed API-adaption

Herbert Valerio Riedel hvr at gnu.org
Tue Sep 18 12:41:50 CEST 2012


Hello,

When I noticed the recently released HTTP-4000.2.5[1] package used a
CABAL-flag based approach[2] for what I expected the use of a macro
MIN_VERSION_network(2,4,0) to be more appropriate (see [3]), I wasn't
totally sure whether there was any down-side with the
MIN_VERSION_-approach. So my question is:

   Is it always desirable to prefer the MIN_VERSION_ approach over a
   CABAL-flag approach for supporting multiple API versions of a
   dependent package (if both ways are possible)? And if not, when
   should I prefer which approach?


 [1]: http://hackage.haskell.org/package/HTTP-4000.2.5
 [2]: https://github.com/haskell/HTTP/commit/7a266219284ff33d66fa5e3f67f406c2616feab5
 [3]: https://github.com/haskell/HTTP/pull/30


cheers,
  hvr
-- 



More information about the Libraries mailing list