GHC 9.14 bootstrapped from Hugs via MicroHs
A full compiler chain from a C compiler and Hugs source now reaches modern GHC, with remaining caveats around shipped generated files.
A complete bootstrap path from the Hugs interpreter to GHC 9.14.1 has been demonstrated, starting only from a C compiler and Hugs sources. Andrea Bedini published a Nix-driven chain that builds each compiler from the previous one: Hugs produces MicroHs, MicroHs builds GHC 6.2.2, and successive historical GHC releases step forward through 6.x, 7.x, 8.x, and 9.x up to 9.14.1.
The work matters for anyone who wants a GHC binary whose trust rests on source review rather than an existing GHC install. Haskell’s main compiler has long needed a prior GHC to build, which leaves a circular dependency that bootstrappable-builds projects try to break. Bedini followed an approach sketched earlier by Joachim Breitner, inserting Lennart Augustsson’s MicroHs where Hugs alone was not enough.
Two concrete obstacles dominated. MicroHs’s own bootstrap through Hugs failed on pattern guards, which classic Hugs never implemented; Bedini added them so the rebuilt MicroHs matched its shipped C output byte for byte. Early GHC releases also leaned on unboxed string literals and primops that MicroHs did not provide. Redefining the relevant macros over ordinary boxed strings, plus a shim layer and a modest set of patches, let 6.2.2 compile and then rebuild itself to a fixed point. From there each hop simply chose the newest GHC release that still accepted the previous binary as its boot compiler.
The result is not yet a pure “gold star” bootstrap. GHC 6.2.2 still ships a pregenerated Alex lexer, and release trees include configure scripts that would need regeneration from autoconf. Replicators have also hit packaging friction preparing the 6.2.2 sources. Even so, the leap from an interpreter-era toolchain to a current GHC in one connected chain is far more progress than most observers expected in a single effort.