Construct constructor/predicate names in the syntactic context of the record name, not the context of the invokation of define-record-type

This commit is contained in:
Marc Nieper-Wißkirchen 2018-12-05 12:15:17 +01:00
parent 152b20f244
commit 081a2a7b3f

View file

@ -10,12 +10,12 @@
(procs (cddr expr))
(make (car procs))
(make-name (if (eq? make #t)
(datum->syntax (car expr)
(datum->syntax name
(string->symbol (string-append "make-" name-str)))
(if (pair? make) (car make) make)))
(pred (cadr procs))
(pred-name (if (eq? pred #t)
(datum->syntax (car expr)
(datum->syntax name
(string->symbol (string-append name-str "?")))
pred))
(fields (cddr procs))