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).
I wanted to add a comment, but stackoverflow tells me that I need 50 reputation to comment!
You should be able to do this with a custom
Setup.hs
file. Here is an example that might help you: https://hackage.haskell.org/package/base-noprelude-4.7.0.0/src/Setup.hs