From b2669c41a771ca7ceed2d02737d124a476ab281b Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 21 May 2010 23:34:54 +0200 Subject: [PATCH] define* in make-record-type * module/ice-9/boot-9.scm (make-record-type): Use define*. --- module/ice-9/boot-9.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 12006a4dd..4a115eabf 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -640,7 +640,7 @@ If there is no handler at all, Guile prints an error and then exits." (define (record-type? obj) (and (struct? obj) (eq? record-type-vtable (struct-vtable obj)))) -(define (make-record-type type-name fields . opt) +(define* (make-record-type type-name fields #:optional printer) ;; Pre-generate constructors for nfields < 20. (define-syntax make-constructor (lambda (x) @@ -695,8 +695,7 @@ If there is no handler at all, Guile prints an error and then exits." (make-struct-layout (apply string-append (map (lambda (f) "pw") fields))) - (or (and (pair? opt) (car opt)) - default-record-printer) + (or printer default-record-printer) type-name (copy-tree fields)))) (struct-set! rtd (+ vtable-offset-user 2)