From: Arno Peters <a.w.peters@ieee.org>
Subject: Guile 1.4 hangs on syncase macro expansion
Date: Fri, 14 Feb 2003 17:58:32 +0100 [thread overview]
Message-ID: <20030214165832.GA21746@duronbox> (raw)
Hi,
I have discovered a not-so-nice interaction between modules and
macros. To demonstrate this bug, I have included bug.scm and
identity.scm below; note the relative directories.
$ guile --version
Guile 1.4
[...]
$ guile -s bug.scm
Before call to identity
At this point, Guile hangs.
Now, if we edit bug/identity.scm and enable export-syntax, we see the
following:
$ guile -s bug.scm
Before call to identity
identity
After call to identity
Again, disable export-syntax, but now enable the line with slib,
disable the line with syncase and enable the line with require.
Running Guile again produces:
$ guile -s bug.scm
Before call to identity
identity
After call to identity
I can only conclude that the hygienic macro implementation (syncase)
included with Guile 1.4 produces undesirable program behaviour when
used with the module system. Seeing that SLIB manages perfectly well
without it is an indication something is definitely wrong.
Regards,
--
Arno Peters
The required files to show the buggy behaviour:
-------------------------------------------------- ./bug.scm
(use-modules (bug identity))
(display "Before call to identity\n")
(display (identity 'identity)) (newline)
(display "After call to identity\n")
-------------------------------------------------- ./bug.scm
-------------------------------------------------- ./bug/identity.scm
(define-module (bug identity)
:use-module (ice-9 syncase)
;; :use-module (ice-9 slib)
)
;;(require 'macro-by-example)
(export identity)
;;(export-syntax identity-macro)
(define-syntax identity-macro
(syntax-rules ()
((_ x) x)))
(define (identity x)
(identity-macro x))
-------------------------------------------------- ./bug/identity.scm
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
reply other threads:[~2003-02-14 16:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030214165832.GA21746@duronbox \
--to=a.w.peters@ieee.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).