I am trying to write a package in Haskell. This package contains a library and an executable file. I indicate this in the Cabal file. There are three main components of the library:
1) There are open library modules
2) There are internal assembly dependencies that should not be exported as part of the library
3) There are external build dependencies.
The Cabal file is slightly overlapping. For the library, I write:
open modules: list of open modules
other modules: List of other modules
build-depends: list of build dependencies
Then for the executable file Other modules: a list of open modules and other modules is needed in the executable file build-depends: list of build dependencies
Which would be nice if Cabal allows me to have a variable.
V1 = List of open modules
V2 = List of other modules
V3 = Build list dependencies
Then in the executable, for example, I could do
other modules: V1, V2
build-depends: V3
As an alternative, I would recommend using Cabal better!
source share