Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Loading
  • Takenobu Tani's avatar
    0b01a354
    Update `$(TOP)/*.md` documents · 0b01a354
    Takenobu Tani authored and Marge Bot's avatar Marge Bot committed
    I updated the top documents to the latest status:
    
      - HACKING.md:
        - Modify Phabricator to GitLab infomation
        - Remove old Trac information
        - Add link to GitLab activity
    
      - MAKEHELP.md:
        - Add link to hadrian wiki
        - Fix markdown format
    
      - INSTALL.md:
        - Modify boot command to remove python3
        - Fix markdown format
    
      - README.md:
        - Modify tarball file suffix
        - Fix markdown format
    
    I checked the page display on the GitHub and GitLab web.
    
    [skip ci]
    0b01a354
    History
    Update `$(TOP)/*.md` documents
    Takenobu Tani authored and Marge Bot's avatar Marge Bot committed
    I updated the top documents to the latest status:
    
      - HACKING.md:
        - Modify Phabricator to GitLab infomation
        - Remove old Trac information
        - Add link to GitLab activity
    
      - MAKEHELP.md:
        - Add link to hadrian wiki
        - Fix markdown format
    
      - INSTALL.md:
        - Modify boot command to remove python3
        - Fix markdown format
    
      - README.md:
        - Modify tarball file suffix
        - Fix markdown format
    
    I checked the page display on the GitHub and GitLab web.
    
    [skip ci]
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
README.md 5.41 KiB

The Glasgow Haskell Compiler

pipeline status

This is the source tree for GHC, a compiler and interactive environment for the Haskell functional programming language.

For more information, visit GHC's web site.

Information for developers of GHC can be found on the GHC issue tracker.

Getting the Source

There are two ways to get a source tree:

  1. Download source tarballs

    Download the GHC source distribution:

    ghc-<version>-src.tar.xz

    which contains GHC itself and the "boot" libraries.

  2. Check out the source code from git

    $ git clone --recursive git@gitlab.haskell.org:ghc/ghc.git

    Note: cloning GHC from Github requires a special setup. See Getting a GHC repository from Github.

See the GHC team's working conventions regarding how to contribute a patch to GHC. First time contributors are encouraged to get started by just sending a Merge Request.

Building & Installing

For full information on building GHC, see the GHC Building Guide. Here follows a summary - if you get into trouble, the Building Guide has all the answers.

Before building GHC you may need to install some other tools and libraries. See, Setting up your system for building GHC.

NB. In particular, you need GHC installed in order to build GHC, because the compiler is itself written in Haskell. You also need Happy, Alex, and Cabal. For instructions on how to port GHC to a new platform, see the GHC Building Guide.

For building library documentation, you'll need Haddock. To build the compiler documentation, you need Sphinx and Xelatex (only for PDF output).

Quick start: the following gives you a default build:

$ ./boot
$ ./configure
$ make         # can also say 'make -jX' for X number of jobs
$ make install

On Windows, you need an extra repository containing some build tools. These can be downloaded for you by configure. This only needs to be done once by running:

$ ./configure --enable-tarballs-autodownload

(NB: Do you have multiple cores? Be sure to tell that to make! This can save you hours of build time depending on your system configuration, and is almost always a win regardless of how many cores you have. As a simple rule, you should have about N+1 jobs, where N is the amount of cores you have.)

The ./boot step is only necessary if this is a tree checked out from git. For source distributions downloaded from GHC's web site, this step has already been performed.