parallelizing ghc

Mikhail Glushenkov the.dead.shall.rise at gmail.com
Tue Jan 24 13:45:25 CET 2012


Hi,

On Tue, Jan 24, 2012 at 4:53 AM, Evan Laforge <qdunkan at gmail.com> wrote:
> So ghc --make provides two things: a dependency chaser and a way to
> keep the compiler resident as it compiles new files.  Since the
> dependency chaser will never be as powerful as a real build system, it
> occurs to me that the only reasonable way forward is to split out the
> second part, by adding an --interactive flag to ghc.  It would then
> read filenames on stdin, compiling each one in turn, only exiting when
> it sees EOF.
>
> Then a separate program, ghc-fe, can wrap ghc and acts like a drop-in
> replacement for ghc.

One immediate problem I see with this is linking - 'ghc --make
Main.hs' is able to figure out what packages a program depends on,
while 'ghc Main.o ... -o Main' requires the user to specify them
manually with -package. So you'll either need to pass this information
back to the parent process, or use 'ghc --make' for linking (which
adds more overhead).

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments



More information about the Glasgow-haskell-users mailing list