[jhc] flag to compile a single module?

Mark Wotton mwotton at gmail.com
Wed Sep 9 07:55:08 EDT 2009


On 09/09/2009, at 9:32 PM, David Roundy wrote:

> I was just thinking that it would be great jhc would compile just a
> single module (and its dependencies, of course) when that module was
> requested (instead of complaining about a lack of a main function).
> This would be handy for testing, but also could enable parallel
> builds, assuming that jhc won't trash the ho cache if two builds are
> run simultaneously (which is important anyhow... e.g. if building two
> versions of the same code at the same time).
>
> I'm imagining one could just request either a module or a hs file:
>
> jhc Foo.Bar
>
> or
>
> jhc Foo/Bar.hs
>
> Or am I missing something and is this already possible?

I think it's halfway there - compiling with '-D_JHC_STANDALONE=0' will  
make JHC not emit a main function.

mark


More information about the jhc mailing list