[gambit-list] Incomplet and/or inkorrect implementation of SRFI-9
Bradley Lucier
lucier at math.purdue.edu
Thu Nov 30 21:41:05 EST 2006
Marc:
You have defined in _nonstd.scm:
> (define-runtime-macro (define-record-type name constructor
> predicate . fields)
> `(define-type ,name
> constructor: ,constructor
> predicate: ,predicate
> , at fields))
which I presume is meant to implement SRFI-9. However, SRFI-9 has
the inconvenient passage:
> <type name> is bound to a representation of the record type itself.
> Operations on record types, such as defining print methods,
> reflection, etc. are left to other SRFIs.
and your implementation of define-record-type doesn't do this:
> (define-record-type :pare
(kons x y)
pare?
(x kar set-kar!)
(y kdr))
> :pare
*** ERROR IN (console)@13.1 -- Unbound variable: :pare
Do you have any quick suggestions about how to fix this?
Brad
More information about the Gambit-list
mailing list