+ <title>Getting started: compiling programs</title>
+
+ <para>
+ In this chapter you'll find a complete reference to the GHC
+ command-line syntax, including all 400+ flags. It's a large and
+ complex system, and there are lots of details, so it can be
+ quite hard to figure out how to get started. With that in mind,
+ this introductory section provides a quick introduction to the
+ basic usage of GHC for compiling a Haskell program, before the
+ following sections dive into the full syntax.
+ </para>
+
+ <para>
+ Let's create a Hello World program, and compile and run it.
+ First, create a file <filename>hello.hs</filename> containing
+ the Haskell code:
+ </para>
+
+<programlisting>
+main = putStrLn "Hello, World!"
+</programlisting>
+
+ <para>To compile the program, use GHC like this:</para>
+
+<screen>
+$ ghc hello.hs</screen>
+
+ <para>(where <literal>$</literal> represents the prompt: don't
+ type it). GHC will compile the source
+ file <filename>hello.hs</filename>, producing
+ an <firstterm>object
+ file</firstterm> <filename>hello.o</filename> and
+ an <firstterm>interface
+ file</firstterm> <filename>hello.hi</filename>, and then it
+ will link the object file to the libraries that come with GHC
+ to produce an executable called <filename>hello</filename> on
+ Unix/Linux/Mac, or <filename>hello.exe</filename> on
+ Windows.</para>
+
+ <para>
+ By default GHC will be very quiet about what it is doing, only
+ printing error messages. If you want to see in more detail
+ what's going on behind the scenes, add <option>-v</option> to
+ the command line.
+ </para>
+
+ <para>
+ Then we can run the program like this:
+ </para>
+
+<screen>
+$ ./hello
+Hello World!</screen>
+
+ <para>
+ If your program contains multiple modules, then you only need to
+ tell GHC the name of the source file containing
+ the <filename>Main</filename> module, and GHC will examine
+ the <literal>import</literal> declarations to find the other
+ modules that make up the program and find their source files.
+ This means that, with the exception of
+ the <literal>Main</literal> module, every source file should be
+ named after the module name that it contains (with dots replaced
+ by directory separators). For example, the
+ module <literal>Data.Person</literal> would be in the
+ file <filename>Data/Person.hs</filename> on Unix/Linux/Mac,
+ or <filename>Data\Person.hs</filename> on Windows.
+ </para>
+ </sect1>
+
+ <sect1>