small refactoring on <record-type>

This commit is contained in:
Yuichi Nishiwaki 2014-08-06 16:27:12 +09:00
parent 9316ba468b
commit 0f89e04548
1 changed files with 6 additions and 6 deletions

View File

@ -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?)