Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is the exact compile command using ghc?

Command exact GHC
0
Posted

What is the exact compile command using ghc?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123