[cvs-nhc98] Partial support for traced named fields.
User olaf
olaf@sparud.net
Thu, 12 Apr 2001 16:53:37 +0200 (CEST)
olaf: Thu Apr 12 16:53:36 CEST 2001
Update of /usr/src/master/nhc/src/compiler98
In directory hinken:/tmp/cvs-serv2021/src/compiler98
Modified Files:
DbgDataTrans.hs DbgTrans.hs IExtract.hs Import.hs
Log Message:
Partial support for traced named fields.
Patterns with named fields work now (simple extension of transformation).
Using field names as selectors works. However, if the result of the selection is `undefined', because the datum does not contain the named field, then the traced program performs a segmentation fault.
Tracing field names as selectors is difficult, because although nhc distinguishes between a name used as selector or for construction/updating, nhc doesn't write the type of a selector into an interface file but determines it from the data definition. But for tracing the selector needs a differnt type. At the moment at every call site of the selector a wrapper is put round the original, untransformed selector. But that way we cannot handle errors caused by the selector ...