Index: typed-records.scm =================================================================== --- typed-records.scm (revision 37805) +++ typed-records.scm (working copy) @@ -15,7 +15,13 @@ (rename defstruct (defstruct defstruct1))) (import-for-syntax (srfi 1) (chicken base)) + (import (only chicken.syntax define-for-syntax)) + (define-for-syntax (get-tag plain-name) + (if (##sys#current-module) + (symbol-append + (##sys#module-name (##sys#current-module)) '|#| plain-name) + plain-name)) (define-syntax define-record (er-macro-transformer @@ -51,7 +57,7 @@ (,@(map cdr names/types) -> (struct ,name)) (,(map cdr names/types) (##sys#make-structure - ',name + ',(get-tag name) ,@(list-tabulate (length names/types) (lambda (i) `#(,(add1 i))))))) @@ -138,7 +144,7 @@ ctor)))) (cdr ctor)) (##sys#make-structure - ',name + ',(get-tag name) ,@(let lp [(names (map first accs/mods/types)) (l '())] (if (null? names)