recompilation check in 6.4
Serge D. Mechveliani
mechvel at botik.ru
Sun Jun 5 06:58:17 EDT 2005
People, who knows, please, how to fix re-compilation in ghc-6.4
?
Porting my program dm from 6.2.2 to 6.4,
I see that the 6.4 system re-compiles many modules when
re-processing the Makefile to build dm.
For example, let Foo.hs from dm contain an error
"value v not in scope".
Running make dm
for the first time compiles all the modules before Foo in
50 seconds.
Then, I fix an error in Foo.hs and repeat "make dm".
The options are set so that ghc-6.2.2 gets to Foo.hs in less
than 1 second when doing this repeated `make'.
It does consider each module before Foo and each time decides that
there is no need in recompilation. It keeps on going this way:
--------
Considering whether compilation is required for Prelude0:
Skipping Prelude0 ( ./Prelude0.hs, /foo/source/export/Prelude0.o )
--------
and so on, by the scheme
"Considering ..XX -- {Checking usages .. --} Skipping XX".
The compiler applies this way:
--------------------
/foo/ghc/6.2.2/inst/bin/ghc -fglasgow-exts
-fallow-undecidable-instances
-fallow-overlapping-instances -fno-warn-overlapping-patterns
-fwarn-unused-binds -fwarn-unused-matches -fwarn-unused-imports
-idemotest
-odir /home/mechvel/dm/1.02/dm/source/export
-hidir /home/mechvel/dm/1.02/dm/source/export
-ddump-hi-diffs
--make DExport -package-name dm
--------------------
Now, when ghc-6.4 does such a repeated `make', it re-compiles
all the `previous' modules under the above options:
---------
Chasing modules from: DExport
Source file changed or recompilation check turned off
Compiling Prelude0 ( ./Prelude0.hs, /.../source/export/Prelude0.o )
Interface file unchanged
...
---------
(And when setting to Foo a _syntax_ error, 6.4 finds this error
without compiling `previous' modules).
Something has changed in 6.4, maybe, the default for the recompilation
check, I do not know.
6.2.2 did what was intended in Makefile.
Who knows, please, how to fix this recompilation point in 6.4 ?
Thank you in advance for explanation.
-----------------
Serge Mechveliani
mechvel at botik.ru
More information about the Glasgow-haskell-users
mailing list