[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-155-g2d6a3
From: |
Mark H Weaver |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-155-g2d6a314 |
Date: |
Wed, 15 Jan 2014 08:24:53 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=2d6a3144a122982d5b6a9365943f73891bdb87d3
The branch, stable-2.0 has been updated
via 2d6a3144a122982d5b6a9365943f73891bdb87d3 (commit)
from da81e75d3e65445fa56865a28f83b07391853a0a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2d6a3144a122982d5b6a9365943f73891bdb87d3
Author: Mark H Weaver <address@hidden>
Date: Wed Jan 15 03:08:32 2014 -0500
Document that we support srfi-46 and add it to %cond-expand-features.
* module/ice-9/boot-9.scm (%cond-expand-features): Add srfi-46.
* doc/ref/srfi-modules.texi (SRFI-0): Add srfi-46 to the list of core
features.
(SRFI-46): New node.
* doc/ref/api-macros.texi (Syntax Rules): Mention that the custom
ellipsis identifier support is specified by SRFI-46.
* test-suite/tests/syntax.test ("syntax-rules"): Add ellipsis hygiene
test from SRFI-46.
-----------------------------------------------------------------------
Summary of changes:
doc/ref/api-macros.texi | 6 +++---
doc/ref/srfi-modules.texi | 11 +++++++++++
module/ice-9/boot-9.scm | 1 +
test-suite/tests/syntax.test | 17 +++++++++++++++--
4 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/doc/ref/api-macros.texi b/doc/ref/api-macros.texi
index 030daed..acfbc65 100644
--- a/doc/ref/api-macros.texi
+++ b/doc/ref/api-macros.texi
@@ -1,7 +1,7 @@
@c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009,
2010, 2011, 2012, 2013
address@hidden Free Software Foundation, Inc.
address@hidden Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009,
2010, 2011,
address@hidden 2012, 2013, 2014 Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions.
@node Macros
@@ -392,7 +392,7 @@ templates. For example:
When writing macros that generate macro definitions, it is convenient to
use a different ellipsis identifier at each level. Guile allows the
desired ellipsis identifier to be specified as the first operand to
address@hidden, as per R7RS. For example:
address@hidden, as specified by SRFI-46 and R7RS. For example:
@example
(define-syntax define-quotation-macros
diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi
index 6f1ed05..66d5bd1 100644
--- a/doc/ref/srfi-modules.texi
+++ b/doc/ref/srfi-modules.texi
@@ -48,6 +48,7 @@ get the relevant SRFI documents from the SRFI home page
* SRFI-41:: Streams.
* SRFI-42:: Eager comprehensions
* SRFI-45:: Primitives for expressing iterative lazy
algorithms
+* SRFI-46:: Basic syntax-rules Extensions.
* SRFI-55:: Requiring Features.
* SRFI-60:: Integers as bits.
* SRFI-61:: A more general `cond' clause
@@ -154,6 +155,7 @@ srfi-16
srfi-23
srfi-30
srfi-39
+srfi-46
srfi-55
srfi-61
srfi-62
@@ -4658,6 +4660,15 @@ apply @code{force} to arguments of deconstructors (e.g.,
@code{car},
wrap procedure bodies with @code{(lazy ...)}.
@end itemize
address@hidden SRFI-46
address@hidden SRFI-46 Basic syntax-rules Extensions
address@hidden SRFI-46
+
+Guile's core @code{syntax-rules} supports the extensions specified by
+SRFI-46/R7RS. Tail patterns have been supported since at least Guile
+2.0, and custom ellipsis identifiers have been supported since Guile
+2.0.10. @xref{Syntax Rules}.
+
@node SRFI-55
@subsection SRFI-55 - Requiring Features
@cindex SRFI-55
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 640229e..e4b3b58 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -4041,6 +4041,7 @@ when none is available, reading FILE-NAME with READER."
srfi-23 ;; `error` procedure
srfi-30 ;; nested multi-line comments
srfi-39 ;; parameterize
+ srfi-46 ;; basic syntax-rules extensions
srfi-55 ;; require-extension
srfi-61 ;; general cond clause
srfi-62 ;; s-expression comments
diff --git a/test-suite/tests/syntax.test b/test-suite/tests/syntax.test
index 5c2a703..a1129e9 100644
--- a/test-suite/tests/syntax.test
+++ b/test-suite/tests/syntax.test
@@ -1,7 +1,7 @@
;;;; syntax.test --- test suite for Guile's syntactic forms -*- scheme -*-
;;;;
;;;; Copyright (C) 2001, 2003, 2004, 2005, 2006, 2009, 2010,
-;;;; 2011, 2012, 2013 Free Software Foundation, Inc.
+;;;; 2011, 2012, 2013, 2014 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
@@ -1209,7 +1209,20 @@
'((((x y) â¦) ...)
(((x y) ...) â¦)))))))
(define-syntax bar (foo x y z))
- (bar a b c))))
+ (bar a b c)))
+
+ ;; This test is given in SRFI-46.
+ (pass-if-equal "custom ellipsis is handled hygienically"
+ '((1) 2 (3) (4))
+ (let-syntax
+ ((f (syntax-rules ()
+ ((f ?e)
+ (let-syntax
+ ((g (syntax-rules --- ()
+ ((g (??x ?e) (??y ---))
+ '((??x) ?e (??y) ---)))))
+ (g (1 2) (3 4)))))))
+ (f ---))))
(with-test-prefix "syntax-error"
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-155-g2d6a314,
Mark H Weaver <=