Improving Compilation time: Insights from Elm Compiler Internals

Ah, I should have written more about it.

To determine which functions are consuming resources in a Haskell program, you have to build the program with profiling option by following instruction in the link, and run it with something like
~/compiler/dist-newstyle/build/x86_64-osx/ghc-8.6.5/elm-0.19.1/x/elm/build/elm/elm make +RTS -p -RTS --output /tmp/main.js src/Main.elm .

It’s a bit cumbersome, but this process gives you all about the performance.

1 Like