[Haskell-beginners] Can I set Cabal conditional options for all build targets
defigueiredo at ucdavis.edu
Wed Nov 12 00:47:11 UTC 2014
Is there a way to set a conditional in a .cabal file that applies to all
the build targets in the file?
I have many build targets and repeating the conditional for each of them
doesn't make sense.
But I get an error message when doing that.
For example, I can do this in my example.cabal file:
-- the conditional flag I want to use
Description: Attempts to get production env
So I have to specify the options once per target. I get an error message
if I move the "if flag(production)" outside an "executable" block. And
the docs "seem to indicate" that's not possible.
PS. I'm using cabal "184.108.40.206"
More information about the Beginners