Skip to main content

GHC DevX July 2022 Update

ยท 2 min read

This is the July 2022 monthly update from the GHC DevX team at IOG.

JavaScript Backend for GHCโ€‹

For a few months we have been merging GHCJS (Haskell to JavaScript compiler) into GHC. We set our first milestone to be the ability to compile and to run the usual "Hello World" program. This month we finally reached it!

We are now focusing on:

  • fixing failing tests in GHC's testsuite (~2800 unexpected failures). To do that, we have to implement new primops, to fix bugs we introduced while we ported the code from GHCJS, etc.

  • implementing support for the "js-sources" Cabal stanza in Hadrian. Currently the JS backend finds the JS sources required for the RTS and for base into explicitly defined location. It was only a stop-gap measure and we now need to implement proper support for user-provided JavaScript files.

  • documenting and refactoring the source code and making it similar to other GHC modules. As an example, GHCJS used the text package which isn't a boot package. Hence we first switched to use GHC's ShortText implementation and now we switched to a FastString based implementation.

  • adding back GHCJS's features that we haven't ported for some reasons (e.g. the compactor, TH, etc.).

You can follow our progress on our development branch here.

Blog postsโ€‹

For the time being, we will focus blog post topics on GHCJS internals and related topics. A few of these blog posts are currently under review and should be published shortly.