GHC 9.6: Interface Files with Core Definitions and -fprefer-byte-code

Recently we have published a blog post which describes a new feature of GHC-9.6 which can significantly improve compilation time on large industrial code bases.


In this post, I will explain a new feature which allows GHC to store the Core definitions of entire modules in interface files. The motivation is severalfold: faster GHCi start-times, faster Template Haskell evaluation times and the possibility of using the definitions for other program analysis tasks.

This feature is implemented in MR !7502 and will appear in GHC 9.6. The work was funded by Mercury who benefited from a 40% improvement to compilation times on their Template Haskell heavy code base.