I often have situations where I leave main :: IO () functions in tests. I can run these fine with runghc, but sometimes I want to compile them (e.g. for running on another platform). Is there a way to do this? If I run, for example,
ghc --make Test.Haar
where Test/Haar.hs has a main method, then nothing happens, it just creates the .o file.
1 Answer