Patch/feature proposal: "Source plugins"

Austin Seipp aseipp at pobox.com
Mon Jul 8 19:42:25 CEST 2013


Looks simple enough in principle.

This patch only implements hooking, although I agree with your original
email that this would also be useful externally (with -fplugin.) However,
the core plugin mechanism is the opposite: it only has an external
interface, but I'm unsure if there's a similarly easy way to fiddle with
the core pipeline, using only the GHC API. Adding it to dynflags like you
did would be OK (barring other peoples' objections.)

So with that in mind, should we maybe take this time to consolidate the two
APIs a bit for coherency? Just a thought.

On Monday, July 8, 2013, Edsko de Vries wrote:

> Ok, sorry all for the delay. Attached is a "frontend plugins" patch for
> ghc 7.4.2. It will not work for ghc HEAD because the structure of the
> compiler has changed in various places, but I cannot currently compile my
> code against HEAD. Making this available now because it's been far too long
> already :) Comments/suggestions/feedback welcome. Hopefully the patch is
> pretty self-explanatory; and it's only small.
>
> -E
>
>
> On Mon, Jul 1, 2013 at 9:32 AM, Edsko de Vries <edskodevries at gmail.com>wrote:
>
> Yes, I fully intend to create a ticket with a detailed description and a
> first patch, but I've been struggling with the latest HEAD, and
> specifically the fact that it now uses dynamic libraries for TH. I (think I
> am) stuck at a Cabal bug and I cannot currently build my code at all :-/
> Duncan is looking into this though.
>
> Edsko
>
>
> On Fri, Jun 28, 2013 at 1:43 PM, Simon Peyton-Jones <simonpj at microsoft.com
> > wrote:
>
>  I’m confused as to details here.  ****
>
> **·         **Edsko is doing something; Nick is doing something else
> (attached for completeness).****
>
> **·         **I can’t locate a Trac Wiki page that describes the design***
> *
>
> ** **
>
> I’m more than happy to adopt patches that improve the plugin API, but
> you’ll have to lead me through it!****
>
> ** **
>
> No hurry, just when you are ready.****
>
> ** **
>
> Simon****
>
> ** **
>
> *From:* Edsko de Vries [mailto:edskodevries at gmail.com]
> *Sent:* 26 June 2013 09:21
> *To:* Luite Stegeman
> *Cc:* Simon Peyton-Jones; Thomas Schilling; ghc-devs at haskell.org
>
> *Subject:* Re: Patch/feature proposal: "Source plugins"****
>
>  ** **
>
> Hi Luite,****
>
> ** **
>
> I was fully planning on a first version of the patch yesterday, but so far
> my efforts were thwarted by annoying problems with dynamic libraries (not
> -- directly -- related to the patch at all). I will try again today :)****
>
> ** **
>
> Edsko****
>
>

-- 
Sent from my portable turning machine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130708/dc6accf0/attachment.htm>


More information about the ghc-devs mailing list