GHCVM is a compiler that translates GHC 7.10.3’s Haskell to Java bytecodes, using a slightly modified version of GHC [1]. It aims to reduce the entry barrier for companies who wish to deploy Haskell but are bound to the JVM. The code generator and runtime system were carefully modeled after GHC, translating the primitive concepts to Java equivalents.
I will discuss the progress so far and highlight the key design decisions that were made to preserve GHC’s semantics on the JVM. Additionally, I will discuss future directions of GHCVM including an intermediate representation for simplifying bytecode compilation, support for an external interpreter and Template Haskell, and utilizing the recent developments in the JVM for performance boosts.
[1] The GHC API was used initially, but the rigidity of the API forced me to inline the entire GHC frontend into the GHCVM codebase.