Skip to main content

IOG GHC Update #34

ยท 3 min read

Triweekly update from the GHC DevX team at IOG.

Previous updates can be found here.

High-level Summaryโ€‹

Some people from Input Output are attending ICFP and Haskell Symposium in Milan, including Luite from the GHC team. If you are there, come to the Input Output table and talk with James Chapman, Kevin Hammond or Luite Stegeman.

Detailsโ€‹

Sylvain: opened merge requests backporting patches to GHC 9.8 and GHC 9.10 that we need to build Cardano. Broken STM package in GHC 9.8.2 (GHC#25171, GHC!13163); CoreToSTG error in 9.10 (GHC#25033, GHC!13162).

Sylvain: opened a merge request to upstream a patch from haskell.nix adding support for extra symbols in the RTS linker to use with the external interpreter when cross-compiling. Added documentation and a test. GHC#25155 and GHC!13129.

Jeff and Sylvain: opened a merge request to upstream a patch from haskell.nix adding some support for hidden symbols in the RTS linker for ELF binaries. Added a test. GHC#25191 and GHC!13013.

Jeff: published the philosophies of optimization chapter of the Haskell Optimization Handbook.

Jeff: investigated an error with the entropy package in nixpkgs. This turned out to be a non-issue.

Sylvain: ghc-up failed to build with the latest release of my haskus-utils-variant package because I forgot to make a new release of one of its dependencies (haskus-utils-data). Managing several packages like this is a pain so I've released a new variant package which has minimal dependencies. I've implemented compatibility and added CI for GHC releases from 8.10 to 9.10 so it has become a much more reliable package to depend on.

Sylvain: GHC's JS backend was failing when compiling statistics package GHC#25177. This was due to the case of rubbish-literals not be properly handled in the generation of statically allocated literals. Fixing it was easy but making a reproducing test case was more involved. See GHC!13151.

Sylvain: refactored GHC's linker code (on the Haskell side, not in the RTS) to add documentation and better types (GHC!13142). This was done in preparation for a fix for GHC#24886 which will likely require merging some the JS linker code with the native linker code. For now they are still totally different code paths.

Sylvain: upgrading GHC to use a new release of directory and file-io failed because the JS backend offered partial or no support for some POSIX functions: openat, unlinkat, fstatat, dup... Sadly there is no NodeJS API for those functions and there doesn't seem to be a plan to implement them. Emscripten (C to JS compiler) implements these functions by maintaining a mapping table between file descriptors and file paths, which is a hack because there is no guarantee that a file path still corresponds to a given file descriptor (that's the whole point of these "new" *at functions). I've implemented a fix using another less invasive hack but that probably only works on Linux for now. See GHC#25190, GHC!13122.

Luite: prepared communication materials for ICFP (poster, flyers)