[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Improve support for R6/R7 SRFI module name formats.

From: Taylan Kammer
Subject: [PATCH] Improve support for R6/R7 SRFI module name formats.
Date: Mon, 10 May 2021 18:58:42 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

Hi Guile devs,

This patch improves Guile's support for SRFI module names in the R6RS
and R7RS formats, i.e. (srfi :n) and (srfi n).

Copying from the commit message:

It was already possible to import an SRFI module by referencing it
as (srfi :n) which is automatically translated to (srfi srfi-n), but
this conversion was only done during import.  After this change, it's
also possible to define a library as (srfi :n) which is automatically
translated to (srfi srfi-n) during definition.

It was not possible at all to define or import SRFI module names in the
R7RS format, (srfi n), where n is a non-negative exact integer.  It is
now possible both to define and import them as such, realized through
the same kind of conversion to a canonical (srfi srfi-n) name.

The patch is attached as a MIME attachment in git format-patch format.

Note, by the way, that there was already a little bit of code in
module/ice-9/r6rs-libraries.scm to support module names like (srfi n),
but it didn't work in practice because syntax-case guards in all the
"entry points" barred the possibility of using that format.

Another note: r6rs-libraries.scm uses both 'identifier?' and the form
'sym?' which is defined as '(symbol? (syntax->datum x))'.  It's unclear
to me what the difference is and I hope my use of 'sym?' is correct.

Relevant bug reports:

- (fixed)

- (partly fixed)


Attachment: 0001-Improve-support-for-R6-R7-SRFI-module-name-formats.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]