Do some recompilation avoidance in GHC.loadModule
authorSimon Marlow <marlowsd@gmail.com>
Tue, 12 Jan 2010 22:58:53 +0000 (22:58 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 12 Jan 2010 22:58:53 +0000 (22:58 +0000)
commitce426964baf58f76ad4681d8a26f671c10ad4f7e
tree00c6419bafcedc632e417586c78d098509ac5e2d
parenta4bef988fe1fcc2f6e59d9f8ccb54bcbc893958e
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.
compiler/main/GHC.hs
compiler/main/HscMain.lhs