~/talk

Compiling Mu with GHC: Halfway Down the Rabbit Hole

Talkat HIW 2022 · on Sunday, 2022-09-11· [compilers-and-language-design]
slides:none on file

Migrating the Mu compiler to use GHC as a frontend targets a 4.5 million‑line codebase and already compiles real Mu programs, including complex GUI apps, after about two years of work. The pipeline uses the GHC API (via a vendored GHC tree), some upstream patches, a few local GHC patches, and type‑checker plugins for Mu features. Key runtime mismatches: Mu/Cortex are mostly strict, lack parametricity, and require explicit instantiation, so the build performs whole‑program monomorphization and aggressive specialization before emitting Cortex bytecode.

AI-written summary · about

  1. 0:00Introduction to Mu and Cortex
  2. 1:32Compiler project goals
  3. 5:15Mu language features
  4. 9:24Cortex runtime semantics
  5. 14:44Integrating the GHC API
  6. 18:37Compilation challenges
  7. 22:35Lessons and reflections
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.