The Glasgow Haskell Compiler is a state-of-the-art, open source compiler and interactive environment for the functional language Haskell.
The documentation below relates to using GHC. For documentation about GHC's internals and building GHC, head over to the GHC Developer Wiki.
These documents relate to the latest released version of GHC. For earlier released versions click the relevant version on the downloads page. For release candidates, look at the GHC download directory.
- The User's Guide
- The User's Guide has all you need to know about using GHC: command line options, language extensions, GHCi, etc.
- Download: | HTML.tar.xz | PDF | PS |
- An infrastructure for building and distributing Haskell software.
GHC is a big system. We try to document the core functionality (above), but you can help by writing documentation yourself. This section collects documentation written in a collaborative way, by users and developers together. Please help by adding new sections, and by clarifying and improving existing ones.
- Using GHC
- How to write a Haskell program
- GHC FAQ
- Error messages
- Guidelines for upgrading your GHC
- Using GHCi
- The GHCi debugger
- Using Cabal (including with DLLs)
- The Haskell Performance Resource, for advice on improving the performance of your code
- Mutually recursive modules
- Memory management and garbage collection
- Memory footprint on the heap of common data-structures
- Evaluation order and state tokens
- Inlining and Specialisation
- Platform related matters
- GHC extensions
- Type system extensions in GHC
- Using GHC as a library
- Concurrent programming in GHC
- 24 Days of GHC Extensions, a series of blog articles.
- Template Haskell is a (GHC) extension to Haskell that adds compile-time metaprogramming facilities.
- Quasiquotation allows the ability for user-definable parsers to provide new concrete syntax for any datatype.
- Dynamically loaded Haskell modules: Don Stewart's hs-plugins library (Web Archive)
- Using the Foreign Function Interface
- GUI programming in GHC
- Using RULES in GHC
- Data Parallel Haskell: using nested data parallelism in GHC
- Roles are GHC's way of discerning the difference between compile-time type equality (created by type synonyms and type families) and runtime type equality (created by newtypes).