Chapter 1. Introduction to GHC

Table of Contents

1.1. Meta-information: Web sites, mailing lists, etc.
1.2. Reporting bugs in GHC
1.3. GHC version numbering policy
1.4. Release notes for version 6.8.1
1.4.1. User-visible compiler changes
1.4.2. Profiling changes
1.4.3. GHCi changes
1.4.4. Boot Libraries
1.4.4.1. array
1.4.4.2. base
1.4.4.3. bytestring
1.4.4.4. Cabal
1.4.4.5. containers
1.4.4.6. directory
1.4.4.7. filepath
1.4.4.8. haskell98
1.4.4.9. hpc
1.4.4.10. old-locale
1.4.4.11. old-time
1.4.4.12. packedstring
1.4.4.13. pretty
1.4.4.14. process
1.4.4.15. random
1.4.4.16. readline
1.4.4.17. template-haskell
1.4.4.18. unix
1.4.4.19. Win32
1.4.5. GHC As A Library

This is a guide to using the Glasgow Haskell Compiler (GHC): an interactive and batch compilation system for the Haskell 98 language.

GHC has two main components: an interactive Haskell interpreter (also known as GHCi), described in Chapter 3, Using GHCi, and a batch compiler, described throughout Chapter 5, Using GHC. In fact, GHC consists of a single program which is just run with different options to provide either the interactive or the batch system.

The batch compiler can be used alongside GHCi: compiled modules can be loaded into an interactive session and used in the same way as interpreted code, and in fact when using GHCi most of the library code will be pre-compiled. This means you get the best of both worlds: fast pre-compiled library code, and fast compile turnaround for the parts of your program being actively developed.

GHC supports numerous language extensions, including concurrency, a foreign function interface, exceptions, type system extensions such as multi-parameter type classes, local universal and existential quantification, functional dependencies, scoped type variables and explicit unboxed types. These are all described in Chapter 8, GHC Language Features.

GHC has a comprehensive optimiser, so when you want to Really Go For It (and you've got time to spare) GHC can produce pretty fast code. Alternatively, the default option is to compile as fast as possible while not making too much effort to optimise the generated code (although GHC probably isn't what you'd describe as a fast compiler :-).

GHC's profiling system supports “cost centre stacks”: a way of seeing the profile of a Haskell program in a call-graph like structure. See Chapter 6, Profiling for more details.

GHC comes with a number of libraries. These are described in separate documentation.

1.1. Meta-information: Web sites, mailing lists, etc.

On the World-Wide Web, there are several URLs of likely interest:

We run the following mailing lists about Glasgow Haskell. We encourage you to join, as you feel is appropriate.

glasgow-haskell-users:

This list is for GHC users to chat among themselves. If you have a specific question about GHC, please check the FAQ first.

cvs-ghc:

The hardcore GHC developers hang out here. This list also gets commit message from the GHC darcs repository. There are other lists for other darcs repositories (most notably cvs-libraries).

There are several other haskell and GHC-related mailing lists served by www.haskell.org. Go to http://www.haskell.org/mailman/listinfo/ for the full list.

Some Haskell-related discussion also takes place in the Usenet newsgroup comp.lang.functional.