Changes between Version 1 and Version 2 of Commentary/Compiler/HscMain


Ignore:
Timestamp:
Sep 7, 2006 4:02:30 PM (8 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/HscMain

    v1 v2  
    11[ Up: [wiki:Commentary] ] 
    22 
    3 = Compiling one module: HscMain = 
     3= Compiling one module: !HscMain = 
    44 
    55Here we are going to look at the compilation of a single module. 
     
    1111 
    1212 * {{{HsSyn}}} is parameterised over the types of the variables it contains.  The first three passes of the compiler work like this: 
    13    * The '''parser''' produces {{{HsSyn}}} parameterised by [wiki:Commentary/Compiler/RdrName {{{RdrName}}].  To a first approximation, a {{{RdrName}}} is just a string. 
    14    * The '''renamer''' transforms this to {{{HsSyn}}} parameterised by [wiki:Commentary/Compiler/Name {{{Name}}].  To a first appoximation, a {{{Name}}} is a string plus a {{{Unique}}} (number) that uniquely identifies it. 
    15    * The '''typechecker''' transforms this further, to {{{HsSyn}}} parameterised by [wiki:Commentary/Compiler/Id {{{Id}}].  To a first approximation, an {{{Id}}} is a {{{Name}}} plus a type. 
     13   * The '''parser''' produces {{{HsSyn}}} parameterised by [wiki:Commentary/Compiler/RdrNameType {{{RdrName}}].  To a first approximation, a {{{RdrName}}} is just a string. 
     14   * The '''renamer''' transforms this to {{{HsSyn}}} parameterised by [wiki:Commentary/Compiler/NameType {{{Name}}].  To a first appoximation, a {{{Name}}} is a string plus a {{{Unique}}} (number) that uniquely identifies it. 
     15   * The '''typechecker''' transforms this further, to {{{HsSyn}}} parameterised by [wiki:Commentary/Compiler/IdType {{{Id}}].  To a first approximation, an {{{Id}}} is a {{{Name}}} plus a type. 
    1616 These three data types are very important, and have their own pages. 
    1717