| Title | Dynamically Loaded Plugins for the Glasgow Haskell Compiler |
|---|---|
| Student | Maximilian Conroy Bolingbroke |
| Mentor | Sean Seefried |
| Abstract | |
|
I will augment the Glasgow Haskell Compiler (GHC) with support for dynamically loaded plugins. This would make it simple for end users to add many interesting capabilities to the compiler, such as:
* Allow Haskell code to be selectively run on GPUs * Idiosyncratic application-specific optimization passes * Analysis of Haskell programs for research purposes * And whatever clever ideas the community comes up with! I envisage a plugin framework for the compiler allowing end users to write and install passes that modify the "Core" representation of Haskell that is used by GHCs "middle end". This would enable all of the scenarios outlined in the "Goal" section at a low cost, as Core is already designed around the idiom of composable correctness-preserving transformations. However, there is scope to extend this into a framework which allows plugins to modify the front end (i.e. the lexing/parsing/renaming/typechecking/desugaring stages) of the compiler too, leveraging work by Sean Seefried (http://www.cse.unsw.edu.au/~sseefried/papers/papers.html). This would enable plugins that actually augment the user-level language itself, so: * Far richer embedded DSLs could be defined than are currently possible * Experimentation with the design of the Haskell language could take place to some extent without modifying GHC, hence reducing the cost of such experiments I have put together an initial technical design for the Core plugins system on the GHC Wiki at http://hackage.haskell.org/trac/ghc/wiki/Plugins. |
|