From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Transform R6RS SRFI module name on definition. Date: Thu, 03 Dec 2015 10:14:57 +0100 Message-ID: <871tb3ao6m.fsf@T420.taylan> References: <87vbapueqe.fsf@T420.taylan> <877fkvaomy.fsf@T420.taylan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1449134036 21334 80.91.229.3 (3 Dec 2015 09:13:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Dec 2015 09:13:56 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Dec 03 10:13:55 2015 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a4Pxa-0005T9-9j for guile-devel@m.gmane.org; Thu, 03 Dec 2015 10:13:54 +0100 Original-Received: from localhost ([::1]:34154 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4PxZ-0004wK-N5 for guile-devel@m.gmane.org; Thu, 03 Dec 2015 04:13:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4PxP-0004qN-BL for guile-devel@gnu.org; Thu, 03 Dec 2015 04:13:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4PxO-0008F0-FY for guile-devel@gnu.org; Thu, 03 Dec 2015 04:13:43 -0500 Original-Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:36760) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4PxO-0008Ev-8e for guile-devel@gnu.org; Thu, 03 Dec 2015 04:13:42 -0500 Original-Received: by wmww144 with SMTP id w144so12217778wmw.1 for ; Thu, 03 Dec 2015 01:13:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=QUNsWeO87+ywZCB/019uWz9LahqA1gC2DRyUvMy5meM=; b=ClxaecRSQiN75OtRk1/D9IBmlflFEL+Kb3KDFBj/He03IOhAnjHxnSqbrUsl2vrbHk Dv79DMhrFZyh5Y9ReESKCDEF8qPor/2kMIcgYq7Yw8nT4F85Mtz2gf0gbw8BOY71dd6y f3yEZ25iY40KgG4TME43V5HqPYdXF/pHbGZLlDvCrECpTyVOeD+4GDgvx+m3+WBry64d Y2A4vswSgFy0VTqQ3VD/kY1GPEaUuFIjiKsYF3ZDAFtu6j6JjAvWX1QOyq/JudgGaCg2 qRJap7WtrIzcUKircosGxPAvYfM0WiwQuytKqhvcWelnudDLBN1YGMBiQlNJIlNPkqYc Y7YA== X-Received: by 10.28.148.147 with SMTP id w141mr11599138wmd.14.1449134021577; Thu, 03 Dec 2015 01:13:41 -0800 (PST) Original-Received: from T420.taylan ([2a02:908:c32:4740:221:ccff:fe66:68f0]) by smtp.gmail.com with ESMTPSA id s189sm7000065wmf.16.2015.12.03.01.13.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Dec 2015 01:13:40 -0800 (PST) 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") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22c X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:18082 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable taylanbayirli@gmail.com (Taylan Ulrich "Bay=C4=B1rl=C4=B1/Kammer") writes: > Ping. Oh and here's a version of the patch without copyright by me. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Transform-R6RS-SRFI-module-names-on-definition.patch >From f4d509cf09c2771c4962745d0f04ab297a8647c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= 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 --=-=-=--