Patch/feature proposal: "Source plugins"

Simon Peyton-Jones simonpj at
Tue Jun 11 15:21:53 CEST 2013


I'm not following the details here, but I'm open to suggestions (patches, even) that improve the GHC API.  


| -----Original Message-----
| From: ghc-devs-bounces at [mailto:ghc-devs-bounces at]
| On Behalf Of Thomas Schilling
| Sent: 11 June 2013 12:53
| To: Edsko de Vries
| Cc: ghc-devs at
| Subject: Re: Patch/feature proposal: "Source plugins"
| On 5 June 2013 13:51, Edsko de Vries <edskodevries at> wrote:
| > It is a little bit messy mostly because parts of the AST get lost
| along the
| > way: quasi-quotes in the renamer, data type declarations and other
| things
| > during type checking. A more ideal way, but also more time consuming,
| would
| > be to change this so that the renamer leaves evidence of the quasi-
| quotes in
| > the tree, and the type checker returns the entire tree type checked,
| rather
| > than just a subset. I think that ultimately this is the better
| approach, at
| > least for our purposes -- I'm not sure about other tools, but since
| this
| > would be a larger change that affects larger parts of the ghc pipeline
| I'm
| > not sure that I'll be able to do it.
| I needed something similar.  In particular, I built a custom code
| generator, but now I need a similar feature for extracting information
| from a Haskell file (for IDE features).
| Since I needed to modify one-shot compilation mode I couldn't use the
| GHC API.  For the IDE stuff I'm using Shake as the build manager, so
| that also needs a customized one-shot mode.  For my current
| implementation I just copied and adapted the necessary parts of
| HscMain, DriverPipeline, etc.  That's very messy, fragile and breaks
| on every GHC release so I'd really like to see the necessary features
| put into GHC.
| Do you have a working patch somewhere?
| _______________________________________________
| ghc-devs mailing list
| ghc-devs at

More information about the ghc-devs mailing list