FW: GHC API: Problems with implementing ":reload" for "ghc --make"

Ian Lynagh igloo at earth.li
Fri Nov 24 08:41:55 EST 2006


Hi Brian,

Sorry for the delayed response.

> My goal is to write a program GhcRemake that works like "ghc --make."
> However, instead of terminating after compilation is done, I want the
> program to stay open and wait for me to hit <ENTER>. When I hit
> <ENTER>, GhcRemake rebuilds the project, just as if I had called "ghc
> --make" again with the same arguments. The benefit of such a program
> is that GhcRemake should be able to cache a lot of data in memory
> between invocations and hopefully be able to do the subsequent
> re-makes much faster.

Nice idea!

> My program seems to work fine when run on itself and when run on
> Cabal. But, these two packages seem to be too small to notice any
> reduction of building time. So, I decided to test my program by
> building the GHC API with it. Unfortunately, it seems like every build
> after the first one in the session does the dependency analysis badly,
> and things get recompiled unnecessarily.

It looks like the problem is caused by recursive module imports. I've
added a bug (#1027) with a smaller example of it.


Thanks
Ian



More information about the Glasgow-haskell-users mailing list