An example using the C preprocessor =================================== file: tests/cpp/executable.hs main = if DATA then putStrLn "It works." else putStrLn "Ooops." Here's the ``Setup.hs`` file. file: tests/cpp/Setup.hs import Distribution.Franchise configure = do defineAs "DATA" "True" ghcFlags ["-cpp"] main = build [] configure (executable "executable" "executable.hs" []) And finally we'll test that this executable actually builds and runs. file: tests/cpp/cpp.sh ....set -ev runghc Setup.hs build ...../executable ./executable | grep works