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
Simon Peyton Jones Microsoft, UKFile Attached
Matthew Pickering University of BristolMedia Attached
|Generalized Abstract GHC.Generics|
Ryan Scott Indiana University at Bloomington, USAFile Attached
|Lightning talk: CodeWorld: Teaching Haskell and mathematics to children|
Chris Smith Google, USA
|Lightning talk: CoreSpec: Verifying GHC with hs-to-coq|
|Lightning talk: The trick which makes exceptions-0.10.0 possible|
Samuel Gélineau SimSpaceMedia Attached