# The Glasgow Haskell Compiler (GHC) Commentary [v0.12]

Manuel M. T. Chakravarty
Sigbjorn Finne
Simon Marlow
Simon Peyton Jones
Julian Seward
Reuben Thomas

This document started as a collection of notes describing what I learnt when poking around in the GHC sources. During the Haskell Implementers Workshop in January 2001 it was decided to put the commentary into GHC's CVS repository to allow the whole developer community to add their wizardly insight to the document.

The document is still far from being complete - help it grow!

## Before the Show Begins

- Feedback
- Other Sources of Wisdom

## Genesis

- Outline of the Genesis
- Mindboggling Makefiles
- GHC's Marvellous Module Structure

## The Beast Dissected

- The Glorious Driver
- Primitives and the Prelude
- Just Syntax
- The Basics
- Modules, ModuleNames and Packages
- The truth about names: Names and OccNamesd
- The Real Story about Variables, Ids, TyVars, and the like
- The Glorious Renamer
- Checking Types
- Sugar Free: From Haskell To Core
- The Mighty Simplifier
- The Evil Mangler
- Alien Functions
- The Native Code Generator
- GHCi
- Implementation of `foreign export`

## RTS & Libraries

- Spineless Tagless C
- Primitives
- Prelude Foundations
- Cunning Prelude Code
- On why we have `ForeignPtr`
- Non-blocking I/O for Win32
- Supporting multi-threaded interoperation

## Extensions, or Making a Complicated System More Complicated

- Parallel Arrays

## The Source

The online master copy of the Commentary is at

> http://www.cse.unsw.edu.au/~chak/haskell/ghc/comm/

This online version is updated from CVS daily.

Last modified: Mon Apr 22 11:00:01 EST 2002