Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GHC compile progress information

Tags:

haskell

ghc

Suppose I have ten modules in my project and GHC is going to recompile the third and fifth, I will see something like the following:

[3 of 10] Compiling C      ( A.hs, dist/build/p/p/A.o )
[5 of 10] Compiling E      ( B.hs, dist/build/p/p/B.o )

I have no idea how many more it's going to compile.

How can I get it to display progress of the compile process?

like image 597
Christopher Done Avatar asked Oct 12 '22 16:10

Christopher Done


2 Answers

GHC does not know in advance how many modules will need to be recompiled. It uses a fairly sophisticated mechanism for checking whether recompilation is needed. In you example, module 4 of 10 has been found to need no recompilation. In short, GHC is going to compile up to 10 modules, or less if you're lucky.

like image 178
nominolo Avatar answered Dec 19 '22 07:12

nominolo


I don't think you can, short of supplying -fforce-recomp. I don't think the GHC authors would mind a patch, though (but are probably too busy to do it themselves). All the information needed should be (relatively) easy available.

like image 26
barsoap Avatar answered Dec 19 '22 07:12

barsoap