Skip to main content

IOG GHC Update #11

· 2 min read

Biweekly update from the GHC DevX team at IOG.

Previous updates can be found here.

JavaScript backend​

  • Sylvain: updated the MR implementing Template Haskell for the JS backend !9779 to start fixing the remaining recompilation avoidance issues.

  • Sylvain: prepared slides for the GHC workshop about the JS backend. See you there next week!

  • Luite: Continued working on support for the process package with the JS backend, moving JavaScript specific functionality into the System.Process.JavaScript module. Most functionality works, but sometimes tests hang, which seems to be caused by nodejs being inconsistent emitting events on child process creation.

  • Josh: merged changes to the JavaScript code rendering. Previously, we used GHC's SDoc system, which included a hack of using the layLeft function to remove indentation from rendered code to improve code size. Now, code is instead rendered on one line using GHC's new HLine system. HLine doesn't have to waste time on indentation logic, and instead simply concatenates very quickly. It also renders directly to a file handle, rather than spending memory on an intermediate ByteString.

    Additionally, the flag -ddisable-js-minifier is added in this MR, which causes JS code to be rendered with full human-readable indentation and whitespace.

    See: GHC!10500

  • Josh: fixed an issue where ghc --supported-extensions was incorrectly listing JavaScriptFFI. This issue had a workaround in Cabal for several years, but the workaround was causing issues for Cabal support in the JavaScript backend. Now, the extension is removed from non-JavaScript targets, allowing the Cabal workaround to be reverted for new versions of GHC.

    See:

Deprecation warnings​

  • Bartek: Deprecated exports proposal MR passes CI and has all the issues addressed, waiting for the MR to be accepted See GHC!10283

  • Bartek: Slight rework of parsing and storing the custom warnings so that it's more generalized (for the upcoming Deprecated Instances) See GHC!10531

  • Bartek: Parsing for the Deprecated Instances implemented, still waiting for the proposal to be accepted

Miscelleaneous​