Module Structure of GHC
This page summarises the overall structure of the GHC compiler (exclude the runtime system).
Compiler modules
Here is a block diagram of its top-level structure:
The boxes are the GHC.XXX top-level module prefixes. For example, the box Hs
stands for a module GHC.Hs
and a collection of sub-module (e.g. GHC.Hs.Pat
, GHC.Hs.Expr
etc).
The arrows indicate allowed dependencies between groups of modules.
You could browse the GHC API on the web (follow the GHC API link).
Historical note
The GHC module hierarchy was refined by Sylvain Henry. See Make GHC codebase more modular and issue #13009.
Tracking old file names and module names
When you want to know the change history of modules and file names, see Proposed renaming or ghc-api-compat.
You can also track it with git command like this:
$ git log --oneline --name-status --diff-filter=RAD