Long compilation times are a challenge for large Haskell projects. After tricks like giving GHC more memory are exhausted, users have a few levers within their code to speed up compilation:
- Reducing the time it takes to compile a module (e.g. removing unnecessary
deriving
statements, deleting unused code, etc.) - Improving parallelism, which currently is done at the module level.
- Improving caching via incremental builds (mostly unrelated to this feature request)
However, users don't have great insight into what modules are slow to compile, and where compilation is bottlenecked on fewer than the available CPU cores, leading to fruitless StackOverflow questions like this one: https://stackoverflow.com/questions/47444097/is-there-a-way-to-profile-compilation-time-per-module-with-ghc