Strip angle brackets off record-type name when printing record.
authorChris Hanson <org/chris-hanson/cph>
Sun, 27 Sep 2009 10:40:14 +0000 (03:40 -0700)
committerChris Hanson <org/chris-hanson/cph>
Sun, 27 Sep 2009 10:40:14 +0000 (03:40 -0700)
src/runtime/record.scm

index bd3b56f5cf9ed1d34b63bc7477c8d5a03cadaf3e..78301dfd418085530fba6c5c791b2ecdb4302527 100644 (file)
@@ -87,7 +87,11 @@ USA.
        (let ((tag (cadr tags)))
          (cond ((record-type? (dispatch-tag-contents tag))
                 (standard-unparser-method
-                 (%record-type-name (dispatch-tag-contents tag))
+                 (let ((name (%record-type-name (dispatch-tag-contents tag))))
+                   (if (and (string-prefix? "<" name)
+                            (string-suffix? ">" name))
+                       (substring name 1 (fix:- (string-length name) 1))
+                       name))
                  #f))
                ((eq? tag record-type-type-tag)
                 (standard-unparser-method 'RECORD-TYPE