I am currently using Stack to create a project that has about 80 modules and 13,000 lines of code. Currently, compilation takes about 3 minutes for minor changes in my type files, which is unacceptable - this prevents me from quickly testing my code through the ghci stack. It also significantly slows down a number of things: for example, pair programming with peers or consultations with specialists.
I would like to know why compilation takes so long and what I can do to speed it up. Is there a way to profile compile time?
Also, how can I determine if it is a slow stack or ghc?
I know about installing -O0, although it doesn't seem to help compile time. I also know that TemplateHaskell and Typeclass Resolution may take some time - is there a way to get a better resolution on how long they take?
Note: I have seen speed up compilation in GHC , but this has been since 2013, and hdevtools does not currently work with my setup.
source share