I am involved in a Haskell project which involves a lot of C FFI. Thus, for every src/HaskellFile.hs I have in my project, I have a corresponding src/HaskellFile.c C source file. This means I have to manually this all of these C sources in my cabal project:
C-sources: src/HaskellFile1.c, src/HaskellFile2.c
...and so forth.
Question: Is it possible to programmatically list out these files in my cabal project file? Something like:
C-sources: src/*.c
..? (For the record, I tried the above and it didn't work).
Sorry, no programming is allowed in cabal files. This level of simplicity has some drawbacks, as you note, but it also has some benefits: tools are more predictable, and it is drop-dead simple to read somebody else's cabal file (you don't have to turn on your programmer brain!).