[gambit-list] Incomplet and/or inkorrect implementation of SRFI-9
lucier at math.purdue.edu
Thu Nov 30 21:41:05 EST 2006
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)
(x kar set-kar!)
*** ERROR IN (console)@13.1 -- Unbound variable: :pare
Do you have any quick suggestions about how to fix this?
More information about the Gambit-list