Patch/feature proposal: "Source plugins"

Luite Stegeman stegeman at
Tue Jun 11 13:52:19 CEST 2013

Sounds good, but for some reason we have HscAsm as a target at the moment
in GHCJS, and set it to HscNothing only after typechecking. I forgot why,
might have something to do with TH. Do you have an implementation of this
patch that i can test it with (even if it's not the final API or really


On Tue, Jun 11, 2013 at 10:43 AM, Edsko de Vries <edskodevries at>wrote:

> Luite,
> On Fri, Jun 7, 2013 at 2:08 PM, Luite Stegeman <stegeman at> wrote:
>> I'd also be very happy with some plugin interface that allows us to use
>> more GhcMake functionality from the GHC API. For GHCJS we would want to run
>> our own (STG -> JavaScript) code generator on sources that need to be
>> recompiled instead of letting GHC run its pipeline. Do you think that's
>> possible with your proposal?
> Probably; if you disable ghc's code generator (set hscTarget to
> HscNothing, ghcLink to NoLink) ghc will still do the dependency analysis,
> still process modules in the right order, and a source plugin still gets
> called on every module that gets typechecked correctly -- so you could
> potentially generate code at that point?
> Edsko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list