wingo pushed a commit to branch master
in repository guile.
commit bb7075dc1a9084305160b690ad918cf98401e1dd
Author: Mark H Weaver <[email protected]>
Date: Thu Sep 3 02:51:00 2015 -0400
psyntax: Fix bug in match-each+.
Reported by Panicz Maciej Godek <[email protected]> in
<http://lists.gnu.org/archive/html/guile-user/2015-09/msg00017.html>.
* module/ice-9/psyntax.scm (match-each+): Fix the case where a non-pair
syntax object is encountered in a dotted tail.
* module/ice-9/psyntax-pp.scm: Regenerate.
---
module/ice-9/psyntax-pp.scm | 3 ++-
module/ice-9/psyntax.scm | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/module/ice-9/psyntax-pp.scm b/module/ice-9/psyntax-pp.scm
index 0d30b7c..3cd6035 100644
--- a/module/ice-9/psyntax-pp.scm
+++ b/module/ice-9/psyntax-pp.scm
@@ -2509,7 +2509,8 @@
(values '() (cdr y-pat) (match (car e) (car y-pat) w
r mod)))
(values #f #f #f)))))
((syntax-object? e)
- (f (syntax-object-expression e) (join-wraps w e)))
+ (f (syntax-object-expression e)
+ (join-wraps w (syntax-object-wrap e))))
(else (values '() y-pat (match e z-pat w r mod)))))))
(match-each-any
(lambda (e w mod)
diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm
index 0bc6024..a45353a 100644
--- a/module/ice-9/psyntax.scm
+++ b/module/ice-9/psyntax.scm
@@ -2849,7 +2849,8 @@
(match (car e) (car y-pat) w r mod)))
(values #f #f #f)))))
((syntax-object? e)
- (f (syntax-object-expression e) (join-wraps w e)))
+ (f (syntax-object-expression e)
+ (join-wraps w (syntax-object-wrap e))))
(else
(values '() y-pat (match e z-pat w r mod)))))))