Key data types
The key to understanding GHC is to understand its key data types. There are pages describing many of them here (please add new pages!). The diagram below shows their inter-dependencies.
- The source language: HsSyn
- RdrNames, Modules, and OccNames
- ModIface, ModDetails, ModGuts
- Uniques: Not drawn in the diagram, because nearly everything depends on Uniques.
- Entities: variables, type constructors, data constructors, and classes.
- Types: Type and Kind, equality types and coercions
- The core language
- The STG language
- The Cmm language
- Back end types