TL;DR
Turbo Haskell Compiler (THC) is a new JIT compiler for Haskell that runs on the JVM, implementing all prim-ops from GHC 9.14.1. It supports advanced features and can produce executables through ahead-of-time compilation.
✦ Why It Matters
Explore THC for your Haskell projects to leverage JIT and AOT compilation benefits today.
Key Takeaways
Full Summary
THC, or Turbo Haskell Compiler, was developed as a joke but has evolved into a functional JIT compiler for Haskell, leveraging the Truffle and GraalVM frameworks. It builds upon the existing GHC (Glasgow Haskell Compiler) infrastructure, which handles parsing, typechecking, and optimization, while THC focuses on compiling and executing GHC Core, the intermediate representation of Haskell code.
THC fully supports advanced features like Template Haskell and Linear Haskell, making it versatile for various Haskell applications. It can JIT-compile Haskell programs, such as pandoc, and also offers ahead-of-time (AOT) compilation through Native Image, allowing for the creation of standalone executables.
This dual capability enhances the usability of Haskell in different environments, particularly for performance-sensitive applications.
Related