Notes on Haskell Programming (Part 162): The GHC compiler artefacts

Generated by NotebookLM based on this blog post: https://www.kianmeng.org/2026/06/note... This text explores the structural layout and purpose of GHC compiler artefacts found within the dist-newstyle directory of a Haskell project. The author explains that this modern directory format replaced legacy systems to better manage multiple configurations and various compiler versions without requiring frequent clean builds. Key file extensions such as .hi and .o represent static interface and object files, while their dyn_ counterparts facilitate dynamic linking. These generated files serve as a content-addressable cache, allowing the Cabal build tool to perform efficient incremental recompilation by identifying specific changes. By producing both static and dynamic versions of machine code, the compiler ensures that executable binaries can be linked flexibly to balance file size and dependency management. This overview effectively demystifies how Haskell's build system organises compiled metadata and machine instructions for developers.