Source plugins are new in GHC 8.6 and provide a convenient mechanism for a user to inspect and modify the internal source code representation of a Haskell program. They are an extension to the existing plugins mechanism which adds passes which run after parsing, renaming and typechecking. This allows users to extend the compiler without having to modify GHC itself.
In this talk I will briefly explain the new extension points before demonstrating and explaining some different source plugins that I have experimented with. Some examples: a reimplementation of the graphmod
library which is used to visualise a module graph of a package; a plugin to find unused names in an executable and a plugin which fills in specific instances for the Lift type class. Others have also implemented plugins which explain assertion failures and one which implements idiom brackets.
Tooling implemented using source plugins is robust and versatile. Plugins are invoked by passing additional options to GHC and so if your tool is implemented as a plugin, anyone can use it whether they use nix, cabal, stack or GHC manually.
Source plugins were implemented by Boldizsár Németh but the idea was previously suggested by Edsko de Vries.
Sun 23 SepDisplayed time zone: Guadalajara, Mexico City, Monterrey change
10:20 - 12:00 | |||
10:20 25mTalk | GHC Update HIW Simon Peyton Jones Microsoft, UK File Attached | ||
10:45 25mTalk | Source Plugins HIW Matthew Pickering University of Bristol Media Attached | ||
11:10 25mTalk | Generalized Abstract GHC.Generics HIW Ryan Scott Indiana University at Bloomington, USA File Attached | ||
11:35 8mTalk | Lightning talk: CodeWorld: Teaching Haskell and mathematics to children HIW Chris Smith Google, USA | ||
11:43 8mTalk | Lightning talk: CoreSpec: Verifying GHC with hs-to-coq HIW File Attached | ||
11:51 9mTalk | Lightning talk: The trick which makes exceptions-0.10.0 possible HIW Samuel Gélineau SimSpace Media Attached |