bug#38235: string-foldcase bug for trailing sigma

2019-11-16 Thread Andy Wingo
Given the following example, using (rnrs unicode): (string-foldcase "ΜΈΛΟΣ") The expected result is "μέλοσ"; see R6RS libraries section 1.2. However instead Guile's result is "μέλος". Note that although Σ usually downcases to σ, at the end of a string it's ς. This test shows a limitation of

bug#38236: R7RS reader does not support datum labels

2019-11-16 Thread Andy Wingo
R7RS defines a lexical feature called "datum labels"; see section 2.4 in the report. An example would be: #0=(a b c . #0#) Guile's reader doesn't support this feature and it's not clear if we should, in general. Note, datum literals appear to be incompatible with array literals. But we coul

bug#38237: I/O errors do not currently have their own exception type

2019-11-16 Thread Andy Wingo
For R7RS, this should be true: (file-error? (guard (exn (else exn)) (open-input-file " no such file "))) However currently an error during Guile's open-input-file doesn't raise a specific-enough exception for file-error? to be implementable. Something to fix.

bug#38238: (call-with-input-string "( . 42)" read) => 42

2019-11-16 Thread Andy Wingo
Guile has a strange syntax extension, as described in the bug title. It's not explicitly documented AFAIU and it seems it may simply be a mistake. We should consider making ( . 42) a lexical error.

bug#38239: hungry-eol-escapes reader option doesn't allow intraline whitespace

2019-11-16 Thread Andy Wingo
Guile supports the R7RS idiom whereby this: "foo\ bar" reads as "foobar" In the R6RS, this syntax is specified as allowing intraline whitespace (space, tab, and anything Unicode with category Zs) after the \ but before the newline. However in Guile we don't support this and signal an

bug#38236: R7RS reader does not support datum labels

2019-11-16 Thread John Cowan
I don't see where the incompatibility comes in, although more lookahead would be required. Per the Guile documentation, neither #n# nor #n= (where n is a sequence of digits) is a valid array tag. On Sat, Nov 16, 2019 at 3:50 PM Andy Wingo wrote: > R7RS defines a lexical feature called "datum la