What is the exact compile command using ghc?
You can use: ghc -O GP_Imp.hs GP_Main.hs -o gp This creates an executable gp that you can then run. If you get error messages about undefined symbols in hunit, remove the import HUnit from GP_Imp.hs and also remove any test cases in GP_Imp.hs. To compile for profiling, use: ghc -prof -auto-all GP_Imp.hs GP_Main.hs -o gp You could then run the executable using gp +RTS -p. The file gp.prof will be generated containing the profiling results. • I made a change to GP_Imp.hs, yet the compile command ghc won’t recompile the code (it says the code is already compiled). Try deleting the files GP_Imp.o, GP_Main.o, gp and then recompile.