I have a program, say src/sample.hs, and I want it to compile (using ghc --make) to build/sample.exe.
I’ve figured out how to map the .hi and .o files over to the build folder, but I can’t seem to find anything on how to compile the executable to a different directory. Does anyone know how to do this?
Thanks!
How about explicitly setting the output filename including the directory? Works over here, I haven’t tested on Windows so I’m not sure if you need the .exe extension or not.
Also worth noting:
--makeis enabled by default as of GHC 7.0.