I would like my cabalised program to have a --version
switch.
I would like it to report the same version as is present in the .cabal file.
If I have to update the version number separately in my Haskell source code as well as in the .cabal file, I will eventually get them out of sync.
So, how can my program, while being compiled under cabal, get its version number from the .cabal file?
.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/autogen/
(thex86_64-osx
part changes according to your architecture). – Briggs