Does it sound a good idea to implement "backend plugins"?

Ben Gamari ben at smart-cactus.org
Thu Oct 4 15:22:09 UTC 2018


"Shao, Cheng" <cheng.shao at tweag.io> writes:

> Hi all,
>
> I'm thinking of adding "backend plugins" in the current Plugins
> mechanism which allows one to inspect/modify the IRs post simplifier
> pass (STG/Cmm), similar to the recently added source plugins for HsSyn
> IRs. This can be useful for anyone creating a custom GHC backend to
> target an experimental platform (e.g. the Asterius compiler which
> targets WebAssembly), and previously in order to retrieve those IRs
> from the regular pipeline, we need to use Hooks which is somewhat
> hacky.
>
> Does this sound a good idea to you? If so, I can open a trac ticket
> and a Phab diff for this feature.
>
Yes, during the Implementors' Workshop this year it seemed like there
was considerable interest in such a mechanism. However, as Matthew said,
the devil is in the details; before starting an implementation I would
recommend that you open a ticket describing the specifics of the
proposed interface. It also wouldn't hurt to motivate the proposal with
a discussion of the concrete use-cases that the interface is meant to
address.

Cheers,

- Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20181004/ef46d2a2/attachment.sig>


More information about the ghc-devs mailing list