... | ... | @@ -9,7 +9,7 @@ There is a picture that goes with this description, which appears at the bottom |
|
|
You can also watch a **video** of Simon Peyton-Jones explaining the compilation pipeline here: [Compiler Pipeline II](http://www.youtube.com/watch?v=Upm_kYMgI_c&list=PLBkRCigjPwyeCSD_DFxpd246YIF7_RDDI) (10'16")
|
|
|
|
|
|
|
|
|
Look at the picture first. The yellow boxes are compiler passes, while the blue stuff on the left gives the data type that moves from one phase to the next. The entire pipeline for a single module is run by a module called HscMain ([compiler/GHC/Driver/Main.hs](https://gitlab.haskell.org/ghc/ghc/blob/master/compiler/GHC/Driver/Main.hs)). Each data type's representation can be dumped for further inspection using a `-ddump-*` flag. (Consider also using `-ddump-to-file`: some of the dump outputs can be large!) Here are the steps it goes through:
|
|
|
Look at the picture first. The yellow boxes are compiler passes, while the blue stuff on the left gives the data type that moves from one phase to the next. The entire pipeline for a single module is run by a module called GHC.Driver.Main ([compiler/GHC/Driver/Main.hs](https://gitlab.haskell.org/ghc/ghc/blob/master/compiler/GHC/Driver/Main.hs)). Each data type's representation can be dumped for further inspection using a `-ddump-*` flag. (Consider also using `-ddump-to-file`: some of the dump outputs can be large!) Here are the steps it goes through:
|
|
|
|
|
|
- The **Front End** processes the program in the [big HsSyn type](commentary/compiler/hs-syn-type). `HsSyn` is parameterised over the types of the term variables it contains. The first three passes (the front end) of the compiler work like this:
|
|
|
|
... | ... | |