Do some recompilation avoidance in GHC.loadModule
GHC.loadModule compiles a module after it has been parsed and typechecked explicity. If we are compiling to object code and there is a valid object file already on disk, then we can skip the compilation step. This is useful in Haddock, when processing a package that uses Template Haskell and hence needs actual compilation, and the package has already been compiled. As usual, the recomp avoidance can be disabled with -fforce-recomp.
Showing with 34 additions and 7 deletions