diff --git a/lib/ikarus.boot b/lib/ikarus.boot index a614d09..3a9d686 100644 Binary files a/lib/ikarus.boot and b/lib/ikarus.boot differ diff --git a/lib/libchezio.ss b/lib/libchezio.ss index f859c26..454beea 100644 --- a/lib/libchezio.ss +++ b/lib/libchezio.ss @@ -1,7 +1,6 @@ (let () - (include "unsafe-record.ss") ;;; ;;; GENERIC PORTS: BASIC PRIMITIVES ;;; diff --git a/lib/psyntax-7.1.ss b/lib/psyntax-7.1.ss index 3da9824..8a45f1d 100644 --- a/lib/psyntax-7.1.ss +++ b/lib/psyntax-7.1.ss @@ -4638,58 +4638,6 @@ "~s is not a record of type ~s" x 'rtd)))) ... )))]))) - -(define-syntax $define-record-syntax - (lambda (x) - (syntax-case x () - [(_ name (field* ...)) - (let* ([namestr (symbol->string (syntax-object->datum #'name))] - [fields (syntax-object->datum #'(field* ...))] - [fieldstr* (map symbol->string fields)] - [rtd (make-record-type namestr fields)]) - (with-syntax ([constr - (datum->syntax-object #'name - (string->symbol - (string-append "make-" namestr)))] - [pred - (datum->syntax-object #'name - (string->symbol - (string-append namestr "?")))] - [(i ...) - (datum->syntax-object #'name - (let f ([i 0] [f* fieldstr*]) - (cond - [(null? f*) '()] - [else (cons i (f (fxadd1 i) (cdr f*)))])))] - [(getters ...) - (datum->syntax-object #'name - (map (lambda (x) - (string->symbol - (string-append namestr "-" x))) - fieldstr*))] - [(setters ...) - (datum->syntax-object #'name - (map (lambda (x) - (string->symbol - (string-append "set-" namestr "-" x "!"))) - fieldstr*))] - [rtd rtd]) - #'(begin - (define-syntax name (cons '$rtd 'rtd)) - (define-syntax constr - (syntax-rules () - [(_ field* ...) ($record 'rtd field* ...)])) - (define-syntax pred - (syntax-rules () - [(_ x) ($record/rtd? x 'rtd)])) - (define-syntax getters - (syntax-rules () - [(_ x) ($record-ref x i)])) ... - (define-syntax setters - (syntax-rules () - [(_ x v) ($record-set! x i v)])) ... - )))]))) - (define-syntax trace (lambda (x) (syntax-case x () diff --git a/lib/unsafe-record.ss b/lib/unsafe-record.ss deleted file mode 100644 index e3f0376..0000000 --- a/lib/unsafe-record.ss +++ /dev/null @@ -1,51 +0,0 @@ - -(define-syntax $define-record-syntax - (lambda (x) - (syntax-case x () - [(_ name (field* ...)) - (let* ([namestr (symbol->string (syntax-object->datum #'name))] - [fields (syntax-object->datum #'(field* ...))] - [fieldstr* (map symbol->string fields)] - [rtd (make-record-type namestr fields)]) - (with-syntax ([constr - (datum->syntax-object #'name - (string->symbol - (string-append "$make-" namestr)))] - [pred - (datum->syntax-object #'name - (string->symbol - (string-append "$" namestr "?")))] - [(i ...) - (datum->syntax-object #'name - (let f ([i 0] [f* fieldstr*]) - (cond - [(null? f*) '()] - [else (cons i (f (fxadd1 i) (cdr f*)))])))] - [(getters ...) - (datum->syntax-object #'name - (map (lambda (x) - (string->symbol - (string-append "$" namestr "-" x))) - fieldstr*))] - [(setters ...) - (datum->syntax-object #'name - (map (lambda (x) - (string->symbol - (string-append "$set-" namestr "-" x "!"))) - fieldstr*))] - [rtd rtd]) - #'(begin - (define-syntax name (cons '$rtd 'rtd)) - (define-syntax constr - (syntax-rules () - [(_ field* ...) ($record 'rtd field* ...)])) - (define-syntax pred - (syntax-rules () - [(_ x) ($record/rtd? x 'rtd)])) - (define-syntax getters - (syntax-rules () - [(_ x) ($record-ref x i)])) ... - (define-syntax setters - (syntax-rules () - [(_ x v) ($record-set! x i v)])) ... - )))])))