Changes between Version 1 and Version 2 of ExternalCore


Ignore:
Timestamp:
Oct 16, 2006 7:53:06 PM (9 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ExternalCore

    v1 v2  
    11
    22
    3 = The {{ExternalCore}} type =
     3= The {{{ExternalCore}}} type =
    44
    55The {{{ExternalCore}}} data type is used by GHC to communicate code represented in the [wiki:Commentary/Compiler/CoreSynType Core] data type with the outside world. It comes with an external syntax, a parser, a pretty printer, and code to convert between Core and External Core. Unfortunately, External Core has not been widely used, and the code has bit-rotted. The recent changes in Core to use [wiki:Commentary/Compiler/FC System FC] have exacerbated the problem. This page documents the process of getting ExternalCore and Core back in sync.
     
    88== Relevant files ==
    99The main source files related to External Core:
    10   * [[GhcFile(compiler/coreSyn/ExternalCore.hs)]]: The definition of the External Core data type.
    11   * [[GhcFile(compiler/coreSyn/MkExternalCore.hs)]]: Some code to convert Core to External Core.
    12   * [[GhcFile(compiler/coreSyn/PprExternalCore.hs)]]: Some code to pretty-print ExternalCore.
     10  * [[GhcFile(compiler/coreSyn/ExternalCore.lhs)]]: The definition of the External Core data type.
     11  * [[GhcFile(compiler/coreSyn/MkExternalCore.lhs)]]: Some code to convert Core to External Core.
     12  * [[GhcFile(compiler/coreSyn/PprExternalCore.lhs)]]: Some code to pretty-print ExternalCore.
    1313  * [[GhcFile(compiler/parser/LexCore.hs)]]: The lexer for External Core.
    14   * [[GhcFile(compiler/parser/ParserCore.hs)]]: The parser for External Core.
     14  * [[GhcFile(compiler/parser/ParserCore.y)]]: The parser for External Core.
    1515  * [[GhcFile(compiler/parser/ParserCoreUtils.hs)]]: Some additional utility functions used by ParserCore.hs.
    1616  * [[GhcFile(utils/ext-core/)]]:
    1717
    1818Other files that contain some reference to External Core or are otherwise relevant:
    19   * [[GhcFile(compiler/coreSyn/PprCore.hs)]]: Some code to pretty-print the Core data type.
    20   * [[GhcFile(compiler/hsSyn/HsSyn.hs)]]: Top-level syntax tree representations for various things GHC can read, including External Core.
     19  * [[GhcFile(compiler/coreSyn/PprCore.lhs)]]: Some code to pretty-print the Core data type.
     20  * [[GhcFile(compiler/hsSyn/HsSyn.lhs)]]: Top-level syntax tree representations for various things GHC can read, including External Core.
    2121  * [[GhcFile(compiler/main/DriverPhases.hs)]]: Includes code to decide how to parse things based on file extension.
    22   * [[GhcFile(compiler/main/HscMain.hs)]]: The main compiler pipeline.
     22  * [[GhcFile(compiler/main/HscMain.lhs)]]: The main compiler pipeline.
    2323
    2424== Documentation ==
     
    3535  * Update the ExternalCore data type to be compatible with the current Core data type.
    3636  * Define an external text representation for ExternalCore (which will probably be simply a minor modification of the old format)
    37   * Update LexCore.hs, ParserCore.y, and ParserCoreUtils.hs to support the new data type and external syntax.
    38   * Update MkExternalCore.hs to support both the current Core and the new ExternalCore.
    39   * Update PprExternalCore.hs to print stuff that LexCore and ParserCore can understand.
     37  * Update {{{LexCore.hs}}}, {{{ParserCore.y}}}, and {{{ParserCoreUtils.hs}}} to support the new data type and external syntax.
     38  * Update {{{MkExternalCore.lhs}}} to support both the current Core and the new ExternalCore.
     39  * Update {{{PprExternalCore.lhs}}} to print stuff that {{{LexCore}}} and {{{ParserCore}}} can understand.
    4040  * Convert the current External Core documentation (in LaTeX) into a chapter (in XML) in the User's Guide.