Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,265
    • Issues 4,265
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 419
    • Merge Requests 419
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Wiki
    • Commentary
  • module structure

Last edited by Takenobu Tani Jun 12, 2020
Page history New page

module structure

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:

ghc_modules.svg

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
Clone repository

GHC Home
GHC User's Guide

Joining In

Newcomers info
Mailing Lists & IRC
The GHC Team

Documentation

GHC Status Info
Working conventions
Building Guide
Debugging
Commentary

Wiki

Title Index
Recent Changes