How can I get GHC Core output via stack?

1k Views Asked by At

How do I get a stack build command to dump the GHC Core? I've tried this, to no avail:

stack build :hello_world --ghc-options '-ddump-simpl'
1

There are 1 best solutions below

2
On BEST ANSWER

Make sure to clean before, or force recompilation via the stack option --force-dirty and ghc option -fforce-recomp.

The files are dumped somewhere around .stack-work/dist/.../build/hello_world/hello_world-tmp/.