[cvs-nhc98] patch applied (hat): Implemented labelled fields fully.

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Oct 10 07:13:02 EDT 2006


Wed Feb  6 04:28:54 PST 2002  olaf
  * Implemented labelled fields fully.
  
  Data type definition, use of labels as selectors, construction and update with fields are now handled by hat-trans.
  
  Because there is no appropriate structure in the Hat trace file format, construction is encoded as normal construction of a data constructor and update is encoded as a "case". The latter can lead to weird expressions in hat-trail
  (e.g. "f main |> case C True undefined undefined";
  "f (case C True undefined) undefined" would be clearer).
  
  Field labels only appear as selector functions in the trace.
  
  Selection and update can cause runtime errors if a field label is not present. To allow a simpler transformation, these runtime errors are not caught. A general solution to runtime errors is needed anyway.

    M ./src/compiler98/Extra.hs +3
    M ./src/compiler98/Syntax.hs +13
    M ./src/compiler98/SyntaxPos.hs +4
    M ./src/compiler98/TraceTrans.hs -28 +113
    M ./src/hatlib/Hat.hs -1 +16
    M ./src/hattrans/TraceTrans.hs -28 +113


More information about the Cvs-nhc98 mailing list