Skip to main content

IOG GHC Update #37

ยท 2 min read

Triweekly update from the GHC DevX team at IOG.

Previous updates can be found here.

High-level Summaryโ€‹

The team has been working on providing patches for GHC to fix the cardano regression mentioned in previous updates.

See details below for the more general maintenance and improvement fixes.

Detailsโ€‹

Performanceโ€‹

Sylvain: improved performance of codes using user event tracing (e.g. traceEvent) when tracing is disabled, putting an end to a long saga of merge requests by different people (GHC!3323, GHC!5316, GHC!12302). I mostly did the menial work of making the latest MR pass CI and of getting it approved by the CLC because it impacts base (CLC!291). See GHC!13295 and GHC#17949.

Luite: Attempted to find the right conditions in the coreprep pass to modify speculative evaluation optimization to fix the regression preventing us from upgrading Cardano to GHC 9.6. Unfortunately it turned out that a working fix would also affect optimizations elsewhere, making it risky to backport. We decided to add flags to GHC for directly controlling the speculative evaluation optimization instead, with the intention of backporting them to GHC 9.6+. See GHC!13556 and GHC#25284.

Jeff: Refined the SrcLoc type to be unpacked and strict. This was the second attempt to close out CLC proposal CLC#55. This is now merged in GHC!13381 and reduced binary sizes for almost every compiler artifact.

Toolchainโ€‹

Sylvain: fixed Stack support for the upcoming GHC 9.12. See hi-file-parser#21 and hi-file-parser!23. Almost every release of GHC makes some changes to the interface file (.hi) format. Stack parses these files to get dependency tracking right. This solution is fragile but there isn't another option currently: see stack#5134, GHC#17620, and GHC-proposal#245.

Maintenanceโ€‹

Sylvain: simplified the handling of the virtual GHC.Prim module by the build system. The build systems no longer have to special-case the handling of this module: it is all done in GHC which was already treating it differently internally anyway. See GHC!13477.

Luite: Fixed a small issue with non-ASCII characters in the parser breaking HLS. See GHC#25396, GHC!13461.

Jeff: Has been working towards splitting base and GHC with CLC proposal CLC#289. This has been implemented in GHC!13428 and GHC!13343. GHC will be a little less coupled to base in 9.14 :)