[cvs-nhc98] patch applied (hat): Implemented correct matching of newtype data constructors and ~ in portable transformation.

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Oct 10 07:14:01 EDT 2006


Fri Mar  1 06:04:54 PST 2002  olaf
  * Implemented correct matching of newtype data constructors and ~ in portable transformation.
  
  The main work is actually done by auxLabelSyntaxTree. The same variable can now appear both as a let and a lambda bound variant (hence they need different prefixes in the transformation). All variables in pattern are considered as lambda bound (however, for simplicity auxLabelSyntaxTree may mark some as let bound). For a variable x occurring in an irrefutable pattern, auxLabelSyntaxTree adds an equation x = x to the syntax tree, where the lhs is let bound and the rhs is lambda bound. All usages of x will use the let bound variant. The normal transformation of the equation x = x will assure that x always has a trace, even if it is never demanded.
  
  To avoid recursive modules the module AuxTypes had to be created.
  
  Needed to extend the .hx format slightly to record if a data constructor belongs to a newtype or a data type. Hence all libraries including prelude need to be retransformed.
  
  Now distinguish between lambda bound variables and let bound variables with arity 0.
  
  Corrected a bug: A single let-bound variable on a rhs should not be surrounded by an indirection. It is not a projection.

    M ./src/compiler98/AuxFile.hs -163 +115
    M ./src/compiler98/AuxFixity.hs -1 +1
    M ./src/compiler98/AuxLabelAST.hs -20 +61
    A ./src/compiler98/AuxTypes.hs
    M ./src/compiler98/Makefile -1 +1
    M ./src/compiler98/PrettySyntax.hs -9 +8
    M ./src/compiler98/TraceId.hs -23 +34
    M ./src/compiler98/TraceTrans.hs -59 +83
    M ./src/hatlib/Makefile -1 +1
    M ./src/hatlib/PreludeBuiltinTypes.hx -19 +19
    M ./src/hattrans/AuxFile.hs -163 +115
    M ./src/hattrans/AuxFixity.hs -1 +1
    M ./src/hattrans/AuxLabelAST.hs -20 +61
    A ./src/hattrans/AuxTypes.hs
    M ./src/hattrans/TraceId.hs -23 +34
    M ./src/hattrans/TraceTrans.hs -59 +83


More information about the Cvs-nhc98 mailing list