Control GHC build parameters from an environment variable using Cabal (Haskell)

Is it possible to build a Haskell project using Cabal and control GHC flags from an environment variable?

in my project.cabal file there is a "GHC-Options" section that controls the flags, but I would like them to add them from the command line.

+7
compilation environment-variables haskell ghc cabal
source share
1 answer

If you only have on / off flags, you should use Cabal flags .

+1
source share

All Articles