... | ... | @@ -9,7 +9,7 @@ The compiler itself is written entirely in Haskell, and lives in the many sub-di |
|
|
- [Command line arguments](commentary/compiler/command-line-args)
|
|
|
- [The compilation pipeline](commentary/pipeline)
|
|
|
|
|
|
- **Compiling one module: HscMain**
|
|
|
- **Compiling one module: GHC.Driver.Main**
|
|
|
|
|
|
- [Overview](commentary/compiler/hsc-main) gives the big picture.
|
|
|
- Some details of the [parser](commentary/compiler/parser)
|
... | ... | @@ -72,7 +72,7 @@ Here is a block diagram of its top-level structure: |
|
|
|
|
|
|
|
|
|
|
|
The part called [HscMain](commentary/compiler/hsc-main) deals with compiling a single module. On top of this is built the **compilation manager** (in blue) that manages the compilation of multiple modules. It exports an interface called the **GHC API**. On top of this API are four small front ends:
|
|
|
[GHC.Driver.Main](commentary/compiler/hsc-main)(formerly known as HscMain) deals with compiling a single module. On top of this is built the **compilation manager** (in blue) that manages the compilation of multiple modules. It exports an interface called the **GHC API**. On top of this API are four small front ends:
|
|
|
|
|
|
|
|
|
- GHCi, the interactive environment, is implemented in [ghc/GHCi/UI.hs](https://gitlab.haskell.org/ghc/ghc/blob/master/ghc/GHCi/UI.hs) and [compiler/GHC/Runtime/Eval.hs](https://gitlab.haskell.org/ghc/ghc/blob/master/compiler/GHC/Runtime/Eval.hs). It sits squarely on top of the GHC API.
|
... | ... | @@ -86,7 +86,7 @@ The part called [HscMain](commentary/compiler/hsc-main) deals with compiling a s |
|
|
- `-M`, the Makefile dependency generator, is also a client of the GHC API and is implemented in [compiler/GHC/Driver/MakeFile.hs](https://gitlab.haskell.org/ghc/ghc/blob/master/compiler/GHC/Driver/MakeFile.hs).
|
|
|
|
|
|
- The "one-shot" mode, where GHC compiles each file on the command line separately (eg. `ghc -c Foo.hs`). This mode bypasses the GHC API, and is implemented
|
|
|
directly on top of [HscMain](commentary/compiler/hsc-main), since it compiles only one file at a time. In fact, this is all that
|
|
|
directly on top of [GHC.Driver.Main](commentary/compiler/hsc-main), since it compiles only one file at a time. In fact, this is all that
|
|
|
GHC consisted of prior to version 5.00 when GHCi and `--make` were introduced.
|
|
|
|
|
|
|
... | ... | |