Compiling Mu with GHC: Halfway Down the Rabbit Hole
Mu and Cortex are, respectively, a dialect of Haskell and a runtime system used at Standard Chartered Bank for financial modeling and analytics. The Mu compiler is a proprietary implementation in use since 2009. In 2021 we started work on a new implementation based on the Glasgow Haskell Compiler.
Mu and Cortex differ from GHC’s assumptions about its source language and compilation target in interesting ways: among others, Mu uses strict evaluation, and Cortex supports polymorphic definitions but doesn’t adhere to parametricity. We address some of these challenges with creative use of the public API of GHC, and others by patching GHC itself.
This talk is an experience report of this work-in-progress effort, explaining the important aspects of Mu and Cortex, the compilation pipeline of the original Mu compiler, and our design for a new compilation pipeline using GHC as the frontend. We also present the customizations we apply to GHC, some of which may turn out to be of general interest for upstream GHC development.
Slides (HIW2022-Compiling_Mu_with_GHC.pdf) | 171KiB |
Sun 11 SepDisplayed time zone: Belgrade, Bratislava, Budapest, Ljubljana, Prague change
11:00 - 12:30 | |||
11:00 30mTalk | Compiling Mu with GHC: Halfway Down the Rabbit Hole HIW Gergo Erdi Standard Chartered Bank File Attached | ||
11:30 30mTalk | A Termination Checker for Haskell Rewrite Rules HIW Makoto Hamana Gunma University, Japan | ||
12:00 30mTalk | Annotating Deeply Embedded Languages HIW |