I'm setting up a build system for my Haskell project and would like to build both debug and release versions without modifying the code every time. In other words, I am looking for something similar to GCC's -D flag so that I can have a certain value be False by default and True if that flag is passed to GHC. If the value is True, the app will use the production environment instead of dev.
I could have the environment switch be either on the command-line or test for the presence of a file, but this is not ideal.
What can you guys recommend?
Thanks :-)