Christopher Done
Christopher Done

Reputation: 5974

GHC compile progress information

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?

Upvotes: 5

Views: 311

Answers (3)

nominolo
nominolo

Reputation: 5155

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.

Upvotes: 2

Alvivi
Alvivi

Reputation: 3331

Try with -dshow-passes or other verbosity flag.

Upvotes: 1

barsoap
barsoap

Reputation: 3376

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.

Upvotes: 1

Related Questions