Heap profiling on Windows doesn't work
C:\Temp>type Main.hs main = print "neil" C:\Temp>ghc --make -prof -auto-all Main.hs [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main.exe ... C:\Temp>main +RTS -hc "neil" C:\Temp>hp2ps main hp2ps: cannot open main.exe.hp
This can be fixed by either renaming the generated main.hp to main.exe.hp, or running "main.exe +RTS -hc" in the first place. I guess you are using argv as the basis of where to put the heap profiling information, and using the executable name as the basis of where to find it.
My suggestion would be that heap profiling information should always go at basename.hp (so main.hp), ignoring any extension. This would require fixing up both the RTS and the hp2ps utility.