From: taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer)
To: guile-devel@gnu.org
Subject: Re: [PATCH] Transform R6RS SRFI module name on definition.
Date: Thu, 03 Dec 2015 10:14:57 +0100 [thread overview]
Message-ID: <871tb3ao6m.fsf@T420.taylan> (raw)
In-Reply-To: <877fkvaomy.fsf@T420.taylan> ("Taylan Ulrich \=\?utf-8\?Q\?\=5C\=22Bay\=C4\=B1rl\=C4\=B1\=2FKammer\=5C\=22\=22's\?\= message of "Thu, 03 Dec 2015 10:05:09 +0100")
[-- Attachment #1: Type: text/plain, Size: 146 bytes --]
taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:
> Ping.
Oh and here's a version of the patch without copyright by me.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Transform-R6RS-SRFI-module-names-on-definition.patch --]
[-- Type: text/x-diff, Size: 1988 bytes --]
From f4d509cf09c2771c4962745d0f04ab297a8647c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
<taylanbayirli@gmail.com>
Date: Fri, 2 Oct 2015 23:29:08 +0200
Subject: [PATCH] Transform R6RS SRFI module names on definition.
* module/ice-9/r6rs-libraries.scm (library): Transform the names of
defined SRFI modules from (srfi :n ...) to (srfi srfi-n ...).
---
module/ice-9/r6rs-libraries.scm | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/module/ice-9/r6rs-libraries.scm b/module/ice-9/r6rs-libraries.scm
index a68df3c..934332d 100644
--- a/module/ice-9/r6rs-libraries.scm
+++ b/module/ice-9/r6rs-libraries.scm
@@ -1,6 +1,6 @@
;;; r6rs-libraries.scm --- Support for the R6RS `library' and `import' forms
-;; Copyright (C) 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2010, 2015 Free Software Foundation, Inc.
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
@@ -158,7 +158,22 @@
(else
(lp #'rest (cons #'id e) r x))))))))
- (syntax-case stx (export import)
+ (syntax-case stx (export import srfi)
+ ;; (srfi :n ...) -> (srfi srfi-n)
+ ((_ (srfi colon-n name ...) rest ...)
+ (and (and-map identifier? #'(srfi name ...))
+ (symbol? (syntax->datum #'colon-n))
+ (eqv? (string-ref (symbol->string (syntax->datum #'colon-n)) 0)
+ #\:))
+ (let ((srfi-n (datum->syntax
+ #'colon-n
+ (string->symbol
+ (string-append
+ "srfi-"
+ (substring (symbol->string (syntax->datum #'colon-n))
+ 1))))))
+ #`(library (srfi #,srfi-n name ...)
+ rest ...)))
((_ (name name* ...)
(export espec ...)
(import ispec ...)
--
2.6.3
prev parent reply other threads:[~2015-12-03 9:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-02 21:45 [PATCH] Transform R6RS SRFI module name on definition Taylan Ulrich Bayırlı/Kammer
2015-12-03 9:05 ` Taylan Ulrich Bayırlı/Kammer
2015-12-03 9:14 ` Taylan Ulrich Bayırlı/Kammer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871tb3ao6m.fsf@T420.taylan \
--to=taylanbayirli@gmail.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).