In abstract, the job of ghc --make
is very simple: compute a dependency graph between modules, and rebuild the ones that have changed. Unfortunately, the code in GhcMake
is quite a bit more complicated than that, and some of this complexity is essential to the design of GHC:
- Interaction with GHCi involves mutating process-global state.