23Skidoo / ghc-parmake

A parallel wrapper for 'ghc --make'.
BSD 3-Clause "New" or "Revised" License
10 stars 2 forks source link

Use GHC API instead of calling 'ghc -M' twice #10

Open 23Skidoo opened 11 years ago

23Skidoo commented 11 years ago

Right now ghc-parmake is calling ghc -M twice to extract the information about external and internal deps. This is a bit inefficient.

This can be solved by writing a GHC API-based helper that will output the dependency graph in a more parseable format.

Additionally, this change will allow us to find out whether there exists a module Main in the input set (see the large comment in Main.hs above guessOutputFilename).

nh2 commented 11 years ago

Some people argue that the GHC API is too much of a moving target to be recommended, even for normal projects. For projects that are supposed to work with multiple GHC versions (like cabal / parmake) this will probably mean a lot of #ifs.

Not sure if that's a real argument against it, but they do have some point.

23Skidoo commented 11 years ago

Well, we will have to use it for the persistent server anyway. Hopefully I'll be able to keep this part small.