44df7eccb26fea2e20cc5d5384c9d21bc339e374
[ghc-hetmet.git] / README
1 The Glasgow Haskell Compiler
2 ============================
3
4 This is the source tree for GHC, a compiler and interactive
5 environment for the Haskell functional programming language.
6
7 For more information, visit GHC's web site:
8
9   http://www.haskell.org/ghc/
10
11 Information for developers of GHC can be found here:
12
13   http://hackage.haskell.org/trac/ghc/
14
15
16 Getting the Source
17 ==================
18
19 There are two ways to get a source tree:
20
21   1. Download source tarballs
22   ---------------------------
23
24   Download the GHC source distribution:
25
26       ghc-<version>-src.tar.bz2
27
28   which contains GHC itself and the "boot" libraries.
29
30   2. Check out the source code from darcs
31   ---------------------------------------
32
33   The recommended way to get a darcs checkout is to start off by
34   downloading a snapshot with a name like:
35
36       ghc-HEAD-2009-09-09-ghc-corelibs-testsuite.tar.bz2
37
38   from:
39
40       http://darcs.haskell.org/
41
42   and then untar it and bring it up-to-date with:
43
44      $ cd ghc
45      $ ./darcs-all get
46
47
48   Alternatively you can use darcs to get the repos, but it will take a
49   lot longer. First get the GHC darcs repository:
50
51     $ darcs get http://darcs.haskell.org/ghc/
52
53   Then run the darcs-all script in that repository
54   to get the other repositories:
55
56      $ cd ghc
57      $ chmod +x darcs-all
58      $ ./darcs-all get
59
60   This checks out the "boot" packages.
61
62
63 Building & Installing
64 =====================
65
66 For full information on building GHC, see the GHC Building Guide [3].
67 Here follows a summary - if you get into trouble, the Building Guide
68 has all the answers.
69
70 NB. you need GHC installed in order to build GHC, because the compiler
71 is itself written in Haskell.  It is possible to build GHC using just
72 a C compiler, but we don't recommend this as the normal route.  If you
73 *really* want to do it this way, then see the Building Guide.
74
75 If you're building from darcs sources (as opposed to a source
76 distribution) then you also need to install Happy [4] and Alex [5].
77
78 For building library documentation, you'll need Haddock [6].  To build
79 the compiler documentation, you need a good DocBook XML toolchain.
80
81 Quick start:  the following gives you a default build:
82
83     $ sh boot
84     $ ./configure
85     $ make
86     $ make install
87
88 The "sh boot" step is only necessary if this is a tree checked out
89 from darcs.  For source distributions downloaded from GHC's web site,
90 this step has already been performed.
91
92 If you want the documentation too then use these commands instead:
93
94     $ echo "XMLDocWays   = html" > mk/build.mk
95     $ echo "HADDOCK_DOCS = YES" >> mk/build.mk
96     $ sh boot
97     $ ./configure
98     $ make
99     $ make install
100     $ make install-docs
101
102 These steps give you the default build, which includes everything
103 optimised and built in various ways (eg. profiling libs are built).
104 It can take a long time.  To customise the build, see the file
105 HACKING.
106
107
108
109 References
110 ==========
111
112  [1] http://www.haskell.org/ghc/                        GHC Home Page
113  [2] http://hackage.haskell.org/trac/ghc                GHC Developer's Wiki
114  [3] http://hackage.haskell.org/trac/ghc/wiki/Building  Building Guide
115  [4] http://www.haskell.org/happy/                      Happy
116  [5] http://www.haskell.org/alex/                       Alex
117  [6] http://www.haskell.org/haddock/                    Haddock
118
119
120 Contributors
121 ============
122
123 Please see
124
125    http://www.haskell.org/ghc/contributors.html