sequent-core- Alternative Core language for GHC plugins
Safe HaskellNone



An example GHC optimizer plugin using Sequent Core. Simply translates the given Core code to Sequent Core, passes it through Lint, dumps it to the screen, then translates back. This allows inspection of the Sequent Core code for a module and also tests the translation and linting functions.

Note that translating to Sequent Core and back should give an equivalent program, but it may vary slightly. The effects should be benign, such as a let floating around in an expression (but never across a lambda).



plugin :: Plugin Source

The plugin. A GHC plugin is a module that exports a value called plugin with the type Plugin.