Closed
Description
A nice feature to add would be to share properties between targets. A common thing to see (even in cabal's .cabal
file):
library
exposed-modules: Blah, Bleh
ghc-options: -Wall -Wsomething
default-language: Haskell 2010
if flag(debug)
cpp-options: -DDEBUG
Test-Suite test
...
ghc-options: -Wall -Wsomething
default-language: Haskell 2010
if flag(debug)
cpp-options: -DDEBUG
Executable blah
...
ghc-options: -Wall -Wsomething
default-language: Haskell 2010
if flag(debug)
cpp-options: -DDEBUG
It would be nice to be able to declare the 4 lines as a set of options and just reference them on the different targets. With the new .cabal
looking more or less like:
Common-Properties commonflags
ghc-options: -Wall -Wsomething
default-language: Haskell 2010
if flag(debug)
cpp-options: -DDEBUG
library
exposed-modules: Blah, Bleh
include-properties: commonflags
Test-Suite test
...
include-properties: commonflags
Executable blah
...
include-properties: commonflags