This is the twenty-first edition of our GHC activities report, which describes the work on GHC and related projects that we are doing at Well-Typed. The current edition covers roughly the months of October and November 2023. You can find the previous editions collected under the ghc-activities-report tag.
Many thanks to our sponsors who make this work possible: Anduril, Hasura and Juspay. In addition, we are grateful to Mercury for funding specific work on improved performance for GHC, HLS and related projects.
Of course, GHC is a large community effort, and Well-Typed’s contributions are just a small part of this. This report does not aim to give an exhaustive picture of all GHC work that is ongoing, and there are many fantastic features currently being worked on that are omitted here simply because none of us are currently involved in them. Furthermore, the aspects we do mention are still the work of many people. In many cases, we have just been helping with the last few steps of integration. We are immensely grateful to everyone contributing to GHC!
The GHC team at Well-Typed consists of Ben Gamari, Andreas Klebinger, Matthew Pickering, Zubin Duggal, Sam Derbyshire, Finley McIlwaine and Rodrigo Mesquita. Many others within Well-Typed are contributing to GHC more occasionally.
Thanks to funding from the Sovereign Tech Fund, several of our team members have been working on Cabal over the last few months, coming up with a plan to address longstanding architectural issues. Check out our post announcing the project and the detailed HF Tech Proposal.
Ben released GHC 9.8.1, the first release in a new major series.
Zubin released GHC 9.4.8, fixing a few bugs in the stable 9.4 series.
Performance and optimisation
Andreas finished up a bugfix to the logic that determines whether to unpack a field of a datatype. GHC now correctly takes into consideration the runtime representation of the field (!9724).
Finley has been experimenting with ways to improve the observability of performance improvements resulting from type class specialisation. A side effect of these efforts is the addition of “late plugins,” which are compiler plugins that may access and modify the core of a module without affecting optimization or inlining (#24254, !11765).
Andreas finished up Jaro’s patch implementing common 64-bit operations in the 32-bit X86 NCG backend. This substantially improves the performance of common
Word64operations (such as comparison) on 32-bit x86 platforms (!10771).
Ben investigated a possible memory leak (#23949).
Ben started migrating parts of
ghc-internal, continuing efforts towards better separating GHC implementation details and experimental features from the more stable
Ben began drafting a plan for making
template-haskell) reinstallable packages. This would allow new GHC versions to compile programs using older library interfaces, greatly easing the pain of library-induced churn when upgrading GHC.
Adam’s proposal to redesign
HasFieldwas accepted by the GHC Steering Committee.
Build system and CI
Ben finished up Matthew’s work ironing out remaining bugs in
Rodrigo improved the error message reported when reading an invalid
Matthew restructured some dependencies within Hadrian so that the
ghclibrary can be built without building the
ghcexecutable in more contexts, e.g. during cross-compilation (!11404).
Matthew continued working on building stage 2 cross compilers. We are down to a few CI failures and hopefully this work will be completed early in the new year.
Matthew implemented infrastructure to monitor file sizes, such as the sizes of the object files and interface files that GHC produces (!11612).