unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Cc: guile-devel@gnu.org
Subject: Re: guile-1.7 + cygwin + (ice-9 syncase)
Date: Fri, 28 Jan 2005 08:18:36 +1100	[thread overview]
Message-ID: <87y8eer2oj.fsf@zip.com.au> (raw)
In-Reply-To: C833F6C0EF3DD24DA46FADF0A87466931E9F4B@fe-mail18.de.bosch.com

[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

"Pach Roman (GS-EC/ESA4) *" <Roman.Pach@de.bosch.com> writes:
>
> guile> (use-syntax (ice-9 syncase))
> guile> (while #f)
> ERROR: invalid syntax ()

Thanks, I made the workaround below.  I think it's a bug or misfeature
in syncase.



[-- Attachment #2: boot-9.scm.while.diff --]
[-- Type: text/plain, Size: 1248 bytes --]

--- boot-9.scm.~1.343.~	2005-01-11 09:41:14.000000000 +1100
+++ boot-9.scm	2005-01-28 08:08:55.000000000 +1100
@@ -1,6 +1,6 @@
 ;;; installed-scm-file
 
-;;;; Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+;;;; Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005
 ;;;; Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
@@ -2754,6 +2754,16 @@
 ;; `while' even when recursing.  `while-helper' is an easy way to keep the
 ;; `key' binding away from the cond and body code.
 ;;
+;; FIXME: This is supposed to have an `unquote' on the `do' the same used
+;; for lambda and not, so as to protect against any user rebinding of that
+;; symbol, but unfortunately an unquote breaks with ice-9 syncase, eg.
+;;
+;;     (use-modules (ice-9 syncase))
+;;     (while #f)
+;;     => ERROR: invalid syntax ()
+;;
+;; This is probably a bug in syncase.
+;;
 (define-macro (while cond . body)
   (define (while-helper proc)
     (do ((key (make-symbol "while-key")))
@@ -2763,7 +2773,7 @@
 			(lambda () (throw key #f))))
 		(lambda (key arg) arg)))))
   `(,while-helper (,lambda (break continue)
-		    (,do ()
+		    (do ()
 			((,not ,cond))
 		      ,@body)
 		    #t)))

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

      reply	other threads:[~2005-01-27 21:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-27  6:31 guile-1.7 + cygwin + (ice-9 syncase) Pach Roman (GS-EC/ESA4) *
2005-01-27 21:18 ` Kevin Ryde [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y8eer2oj.fsf@zip.com.au \
    --to=user42@zip.com.au \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).