small refactoring on <record-type>
This commit is contained in:
parent
9316ba468b
commit
0f89e04548
|
@ -748,18 +748,18 @@
|
|||
|
||||
(import (picrin record))
|
||||
|
||||
(define <record-type>
|
||||
(let ((<record-type> (make-record #t))) ; bootstrap
|
||||
(let ((type-type (make-record <record-type>)))
|
||||
(record-set! <record-type> '@@type type-type)
|
||||
(record-set! type-type 'name '<record-type>)
|
||||
<record-type>)))
|
||||
(define <record-type> #t) ; bootstrap
|
||||
|
||||
(define (make-record-type name)
|
||||
(let ((rectype (make-record <record-type>)))
|
||||
(record-set! rectype 'name name)
|
||||
rectype))
|
||||
|
||||
(set! <record-type>
|
||||
(let ((<record-type> (make-record-type '<record-type>)))
|
||||
(record-set! <record-type> '@@type <record-type>)
|
||||
<record-type>))
|
||||
|
||||
(define-syntax define-record-constructor
|
||||
(ir-macro-transformer
|
||||
(lambda (form inject compare?)
|
||||
|
|
Loading…
Reference in New Issue