[cvs-nhc98] patch applied (hat): Parts of parser and renamer modified to handle extended positions correctly.

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Oct 10 07:28:30 EDT 2006


Fri Jul 30 11:57:25 PDT 2004  olaf
  * Parts of parser and renamer modified to handle extended positions correctly.
  This work is not yet complete.
  
  Some tricky things not yet solved:
  - some constructs may include optional semicolons or curly brackets, e.g.
    do { x <- myRead; putStr x; }
    these are currently not included in the position,
    so the do expression ends at the last "x".
  - the syntax does not include enough positions to give positions to everything.
    E.g. now the position of a function declaration DeclFun describes the full
    declaration, there is no position for the function variable itself.
  - some syntactic constructs are immediately desugared, for example list
    comprehensions; now every component of the translation gets the position
    of the full list comprehension. This makes it easy to map parts of the
    syntax tree to the source code, but impossible to map part of the source code
    uniquely to the part of the syntax tree that describes it completely. So
    hat-observe will find it hard to give for a marked list comprehension
    just the values of the full list comprehension, not intermediate internal
    values.

    M ./src/compiler98/Extra.hs +4
    M ./src/compiler98/MkSyntax.hs -6 +8
    M ./src/compiler98/Parse.hs -8 +13
    M ./src/compiler98/Rename.hs -6 +10
    M ./src/compiler98/SyntaxPos.hs -73 +63


More information about the Cvs-nhc98 mailing list