guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] ice-9 receive without defmacro


From: Andreas Rottmann
Subject: [PATCH] ice-9 receive without defmacro
Date: Sat, 19 Jun 2010 14:10:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

From: Andreas Rottmann <address@hidden>
Subject: ice-9 receive without define-macro

* module/ice-9/receive.scm: Replace define-macro usage with syntax-rules.

---
 module/ice-9/receive.scm |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/module/ice-9/receive.scm b/module/ice-9/receive.scm
index d550c6f..f4f4d81 100644
--- a/module/ice-9/receive.scm
+++ b/module/ice-9/receive.scm
@@ -1,6 +1,6 @@
 ;;;; SRFI-8
 
-;;; Copyright (C) 2000, 2001, 2004, 2006 Free Software Foundation, Inc.
+;;; Copyright (C) 2000, 2001, 2004, 2006, 2010 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
@@ -21,8 +21,10 @@
   :no-backtrace
   )
 
-(define-macro (receive vars vals . body)
-  `(call-with-values (lambda () ,vals)
-     (lambda ,vars ,@body)))
+(define-syntax receive
+  (syntax-rules ()
+    ((receive vars vals . body)
+     (call-with-values (lambda () vals)
+       (lambda vars . body)))))
 
 (cond-expand-provide (current-module) '(srfi-8))
-- 
tg: (c399333..) t/receive-without-defmacro (depends on: master)
Regards,
-- 
Andreas Rottmann -- <http://rotty.yi.org/>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]