Write a Blog >>
ICFP 2018
Sun 23 - Sat 29 September 2018 St. Louis, Missouri, United States
Sun 23 Sep 2018 10:45 - 11:10 at Illinois Central - GHC Chair(s): Ben Gamari

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 Sep

hiw-2018-papers
10:20 - 12:00: HIW 2018 - GHC at Illinois Central
Chair(s): Ben GamariWell-Typed LLP
hiw-2018-papers10:20 - 10:45
Talk
Simon Peyton JonesMicrosoft, UK
File Attached
hiw-2018-papers10:45 - 11:10
Talk
Matthew PickeringUniversity of Bristol
Media Attached
hiw-2018-papers11:10 - 11:35
Talk
Ryan ScottIndiana University at Bloomington, USA
File Attached
hiw-2018-papers11:35 - 11:43
Talk
Chris SmithGoogle, USA
hiw-2018-papers11:43 - 11:51
Talk
File Attached
hiw-2018-papers11:51 - 12:00
Talk
Media Attached