From c968074b325dea3cf0701be0cb5142865337e02a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 22 Feb 2008 15:55:36 +0000 Subject: [PATCH] Fix `(ice-9 match)' for lists of lists. --- NEWS | 7 ++++++- ice-9/ChangeLog | 39 ++++++++++++++++++++++++--------------- ice-9/match.scm | 3 ++- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/NEWS b/NEWS index 62f97b45e..4ac2bcfd9 100644 --- a/NEWS +++ b/NEWS @@ -9,7 +9,12 @@ Changes in 1.8.5 (since 1.8.4) * Bugs fixed -** `scm add_slot ()' no longer segfaults (fixes bug #22369) +** `scm_add_slot ()' no longer segfaults (fixes bug #22369) +** Fixed `(ice-9 match)' for patterns like `((_ ...) ...)' + +Previously, expressions like `(match '((foo) (bar)) (((_ ...) ...) #t))' +would trigger an unbound variable error for `match:andmap'. + ** Fixed build issue for GNU/Linux on IA64 ** Fixed build issue on NetBSD 1.6 diff --git a/ice-9/ChangeLog b/ice-9/ChangeLog index e55130a4a..84f1a45be 100644 --- a/ice-9/ChangeLog +++ b/ice-9/ChangeLog @@ -1,3 +1,9 @@ +2008-02-22 Ludovic Courtès + + * match.scm: Export `match:andmap'. This fixes evaluation of + expressions like `(match expr (((_ ...) ...) #t))' where a list + of lists is to be matched. + 2008-01-22 Neil Jerram * COPYING: Removed. @@ -12,7 +18,7 @@ * boot-9.scm (duplicate-handlers)[warn, warn-override-core]: Send warnings to `stderr' instead of `stdout'. -2007-08-08 Ludovic Courtès +2007-08-08 Ludovic Courtès * boot-9.scm (%record-type-check): Renamed to `%record-type-error'. @@ -21,7 +27,7 @@ overhead. (record-modifier): Likewise. -2007-06-13 Ludovic Courtès +2007-06-13 Ludovic Courtès * boot-9.scm (module-make-local-var!): Simplified. No need to check for the value of a same-named imported binding since the @@ -91,7 +97,7 @@ where `futures' should become `threads' from Marius' change of 2006-01-29. -2006-03-04 Ludovic Courtès +2006-03-04 Ludovic Courtès * ice-9/boot-9.scm (make-autoload-interface): Don't call `set-car!' if the autoload interface has already been removed from MODULE's uses. @@ -113,7 +119,7 @@ * boot-9.scm (try-module-autoload): Make sure that module code is loaded with the default reader (current-reader #f). Thanks to - Ludovic Courtès for pointing this problem out. + Ludovic Courtès for pointing this problem out. * stack-catch.scm (stack-catch): Use catch pre-unwind handler instead of lazy-catch. @@ -121,7 +127,7 @@ * boot-9.scm (error-catching-loop): Use catch pre-unwind handler instead of lazy-catch. -2006-02-01 Ludovic Courtès +2006-02-01 Ludovic Courtès * deprecated.scm (make-uniform-array): Fill the returned vector with PROT, per guile 1.6 behaviour. @@ -137,7 +143,7 @@ 2006-01-13 Neil Jerram * boot-9.scm (repl-reader): Use value of current-reader fluid to - do the read, if set. (Thanks to Ludovic Courtès for the patch.) + do the read, if set. (Thanks to Ludovic Courtès for the patch.) 2005-12-14 Neil Jerram @@ -153,7 +159,7 @@ * boot-9.scm (%cond-expand-features): Add srfi-61. -2005-10-27 Ludovic Courtès +2005-10-27 Ludovic Courtès * networking.scm (sockaddr:flowinfo, sockaddr:scopeid): New functions. @@ -1182,7 +1188,7 @@ 2002-01-12 Marius Vollmer - More options for pretty-print. Thanks to Matthias Köppe! + More options for pretty-print. Thanks to Matthias Köppe! * pretty-print.scm (generic-write): New per-line-prefix argument. (pretty-print): Check whether the new keyword argument style is @@ -1259,7 +1265,7 @@ * session.scm (arity): Use new `arglist' procedure property to present a more detailed argument list. - Thanks to Matthias Köppe! + Thanks to Matthias Köppe! 2001-09-07 Thien-Thi Nguyen @@ -1478,12 +1484,12 @@ * optargs.scm (lambda*): Make sure that BODY is always put into a real body context so that it can contain internal definitions. - Thanks to Matthias Köppe! + Thanks to Matthias Köppe! * format.scm: Use (ice-9 and-let-star). (format:out): Initialize format:output-col with current column of `port', if it has one. Else leave it alone. Thanks to Matthias - Köppe! + Köppe! 2001-06-05 Marius Vollmer @@ -1588,7 +1594,7 @@ * boot-9.scm (define-module): Return the new module. (process-define-module): Use `spec' instead of `module-name' when - getting the syntax transformer. Thanks to Matthias Köppe! + getting the syntax transformer. Thanks to Matthias Köppe! 2001-05-21 Marius Vollmer @@ -1698,7 +1704,7 @@ * boot-9.scm (error-catching-repl): Call the E ("eval'er") procedure via call-with-values and call the P - ("printer") for each produced value. Thanks to Matthias Köppe! + ("printer") for each produced value. Thanks to Matthias Köppe! 2001-05-14 Martin Grabmueller @@ -2219,7 +2225,7 @@ 2000-08-14 Mikael Djurfeldt * format.scm (format:obj->str): Made tail-recursive. (Thanks to - Matthias Köppe.) + Matthias Köppe.) 2000-08-13 Mikael Djurfeldt @@ -2318,7 +2324,7 @@ 2000-06-20 Mikael Djurfeldt * session.scm (make-fold-modules): Detect circular references in - module graph. (Thanks to Matthias Köppe.) + module graph. (Thanks to Matthias Köppe.) 2000-06-20 Mikael Djurfeldt @@ -4780,3 +4786,6 @@ Fri Apr 19 13:53:08 1996 Tom Lord * The more things change... +;; Local Variables: +;; coding: utf-8 +;; End: diff --git a/ice-9/match.scm b/ice-9/match.scm index 2e10c3923..e6fe56063 100644 --- a/ice-9/match.scm +++ b/ice-9/match.scm @@ -1,6 +1,6 @@ ;;; installed-scm-file -;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. +;;;; Copyright (C) 2001, 2006, 2008 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 @@ -22,6 +22,7 @@ :export (match match-lambda match-lambda* match-define match-let match-let* match-letrec define-structure define-const-structure + match:andmap match:error match:set-error match:error-control match:set-error-control match:structure-control match:set-structure-control