[GHC] #1027: GHC-as-a-library does too much recompilation when given recursive module imports

GHC trac at galois.com
Fri Nov 24 08:31:34 EST 2006


#1027: GHC-as-a-library does too much recompilation when given recursive module
imports
-------------------------+--------------------------------------------------
    Reporter:  igloo     |       Owner:         
        Type:  bug       |      Status:  new    
    Priority:  normal    |   Milestone:  6.8    
   Component:  Compiler  |     Version:  6.6    
    Severity:  normal    |    Keywords:         
  Difficulty:  Unknown   |    Testcase:         
Architecture:  Unknown   |          Os:  Unknown
-------------------------+--------------------------------------------------
In
 http://www.haskell.org/pipermail/glasgow-haskell-users/2006-
 October/011219.html
 (the archives seem to have lost the actual body text unfortunately) Brian
 Smith reports that the GHC API seems to do too much recompilation when
 used on the GHC sources. It looks like recursive module imports are the
 cause, as shown by the attached files. The session below shows 3
 recompilations of A that should not be necessary; I'm not sure if we can
 also avoid the need to look at the hs-boot files again (perhaps by making
 a .hi-boot purely for timestamping purposes?).

 {{{
 $ rm *.o *.hi
 $ ghc -package ghc foo.hs -o foo -Wall
 $ ./foo
 [1 of 4] Compiling C[boot]          ( C.hs-boot, nothing )
 [2 of 4] Compiling B                ( B.hs, B.o )

 B.hs:6:0: Warning: Definition but no type signature for `b'
 [3 of 4] Compiling A                ( A.hs, A.o )

 A.hs:6:0: Warning: Definition but no type signature for `a'
 [4 of 4] Compiling C                ( C.hs, C.o )

 C.hs:6:0: Warning: Definition but no type signature for `c'

 Succeeded!

 [1 of 4] Compiling C[boot]          ( C.hs-boot, nothing )
 [3 of 4] Compiling A                ( A.hs, A.o )

 A.hs:6:0: Warning: Definition but no type signature for `a'

 Succeeded!

 [1 of 4] Compiling C[boot]          ( C.hs-boot, nothing )

 Succeeded!

 [1 of 4] Compiling C[boot]          ( C.hs-boot, nothing )

 Succeeded!

 $ ./foo
 [1 of 4] Compiling C[boot]          ( C.hs-boot, nothing )
 [3 of 4] Compiling A                ( A.hs, A.o )

 A.hs:6:0: Warning: Definition but no type signature for `a'

 Succeeded!

 [1 of 4] Compiling C[boot]          ( C.hs-boot, nothing )
 [3 of 4] Compiling A                ( A.hs, A.o )

 A.hs:6:0: Warning: Definition but no type signature for `a'

 Succeeded!

 [1 of 4] Compiling C[boot]          ( C.hs-boot, nothing )

 Succeeded!

 [1 of 4] Compiling C[boot]          ( C.hs-boot, nothing )

 Succeeded!
 $
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1027>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list