Turbo Haskell runs GHC itself on the JVM
Edward Kmett built THC, a Turbo Haskell compiler that takes GHC Core and JITs it onto the JVM via Truffle and GraalVM. It implements every GHC 9.14.1 prim-op, supports Template Haskell, Linear Haskell, and polyglot FFI to Python, Ruby, R, and JavaScript. It can compile pandoc, happy, alex, and now GHC itself. Performance ranges from 3× faster to 3× slower than GHC, mostly 10–20% slower.
THC is capable of JIT- or AOT-compiling a number of Haskell programs, including pandoc, happy, alex, and, as of today, even GHC itself!
- cosmic_quanta
Coincidentally, the author has just been interviewed on the Haskell Interlude podcast:
- BalinKing
Only tangentially related, but I'm reminded of Frege[0], a Haskell dialect for the JVM that I stumbled across at one point and thought looked really cool.... I see recent commits but the releases are all really old, so I can't tell what the state of the project is.
- zerr
I was expecting some Turbo Vision based TUI IDE.
- woadwarrior01
The polyglot FFI feature (thanks to GraalVM) might be very useful for implementing "functional core, imperative shell" style designs.
- draven
FYI the article links a discussion on Reddit, which has answers for several comments made here.