Go to the first, previous, next, last section, table of contents.
You invoke the Glasgow Haskell compilation system through the
driver program `ghc'. For example, if you had typed a
literate "Hello, world!" program into `hello.lhs', and you then
invoked:
ghc hello.lhs
the following would happen:
-
The file `hello.lhs' is run through the literate-program
code extractor `unlit', feeding its output to
-
The Haskell compiler proper `hsc', which produces
input for
-
The assembler (or that ubiquitous "high-level assembler," a C
compiler), which produces an object file and passes it to
-
The linker, which links your code with the appropriate libraries
(including the standard prelude), producing an executable program in
the default output file named `a.out'.
You have considerable control over the compilation process. You feed
command-line arguments (call them "options," for short) to the
driver, `ghc'; the "types" of the input files (as encoded in
their names' suffixes) also matter.
Here's hoping this is enough background so that you can read the rest
of this guide!
Go to the first, previous, next, last section, table of contents.