wingo pushed a commit to branch master in repository guile. commit a758ba075a589b688c07384ab8282dc703f9364d Author: Andy Wingo <wi...@pobox.com> AuthorDate: Thu Feb 25 10:27:22 2021 +0100
Fix read-syntax on vectors and arrays * module/ice-9/read.scm (%read): Strip annotations from reading the array elements. --- module/ice-9/read.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/ice-9/read.scm b/module/ice-9/read.scm index 5b375e1..0724c66 100644 --- a/module/ice-9/read.scm +++ b/module/ice-9/read.scm @@ -403,7 +403,7 @@ (error "unknown character name ~a" tok)))))))) (define (read-vector) - (list->vector (read-parenthesized #\)))) + (list->vector (map strip-annotation (read-parenthesized #\))))) (define (read-srfi-4-vector ch) (read-array ch)) @@ -438,7 +438,7 @@ (expect #\u) (expect #\8) (expect #\() - (u8-list->bytevector (read-parenthesized #\)))) + (u8-list->bytevector (map strip-annotation (read-parenthesized #\))))) ;; FIXME: We should require a terminating delimiter. (define (read-bitvector) @@ -532,7 +532,7 @@ (define (read-elements ch rank) (unless (eqv? ch #\() (error "missing '(' in vector or array literal")) - (let ((elts (read-parenthesized #\)))) + (let ((elts (map strip-annotation (read-parenthesized #\))))) (if (zero? rank) (begin ;; Handle special print syntax of rank zero arrays; see