Skip to content
0:00 / 0:00

#ghc#haskell#mu

[HIW'22] Compiling Mu with GHC: Halfway Down the Rabbit Hole

ACM SIGPLAN

11K subscribers • 61 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Gergo Erdi, Standard Chartered Bank

Advanced. Deep dive for people who know the field.

538 views4 years ago2 recommendations

Programming languagesSystems programmingCompilers and interpretersLanguage design and type systems

Gergo Erdi shares an experience report on compiling Mu, a strict Haskell dialect, by customizing and patching the Glasgow Haskell Compiler.

Compiling Mu with GHC: Halfway Down the Rabbit Hole Gergo Erdi (Standard Chartered Bank) 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.

Why it's here

2 people recommend this

What people say. Recommended as a technical experience report on customizing and patching GHC for proprietary language requirements.

u/ruudkootin r/haskell • Recommends

On “Haskell jobs at Standard Chartered, various locations and seniority”

I think this is all we have presented publicly: HIW 2022: Compiling Mu with GHC: Halfway Down the Rabbit Hole (talk) HIW 2021: Haskell reinterpreted – large-scale real-world experience with the Mu compiler HS 2016: Experience report: types for a relational algebra library CUFP 2011: Pragmatic Haskell

u/gergoerdiin r/haskell • Recommends

On “Do you think Haskell will become more mainstream?”

It's not my company lol, it's publicly traded and I'm just employed by them. Fluff big-picture stuff: https://icfp24.sigplan.org/details/icfp-2024-papers/10/Functional-Programming-in-Financial-Markets-Experience-Report- More tech details but smaller scope: link to this video

u/gergoerdiin r/haskell • Recommends

On “August 20 ACM TechTalk with José Pedro Magalhães on Functional Programming in Financial Markets”

Relevant links: * ICFP 2024 experience report talk, paper * Large-scale real-world experience with the Mu compiler * Wrestling GHC intoc ompiling Mu * Haskell in the large