[Haskell-cafe] Compiler constraints in cabal

wren ng thornton wren at freegeek.org
Sun Nov 7 18:58:35 EST 2010

On 11/7/10 11:54 AM, Henning Thielemann wrote:
> Awful - I would not like to complicate my Cabal files this way. This is
> like copying the Build-Depends enumeration to all depending packages.

Oh, I agree :)

I wonder if you can include ghc in the build-tools: field and whether 
cabal-install bases its decisions on that field...

Another option might be to have users set the preference: field in 
~/.cabal/config. Though that requires user action again...

Why is the package ghc version specific anyways? Is it just a language 
extension thing?

> Does the LanguageExtensions field prevent building a package, if the
> installed compiler cannot handle that? I'm afraid, LanguageExtensions is
> just a list of flags that is passed to GHC. But it sounds like a good
> idea, if Cabal would also check, whether the used compiler supports the
> required LanguageExtensions at all.

If you just wanted to ensure that things don't build on the wrong 
version, then you could always use a custom Setup.hs and use CPP to 
choose between exitSuccess and exitFailure somewhere along the way.

Live well,

More information about the Haskell-Cafe mailing list