[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Guile 1.4 hangs on syncase macro expansion
From: |
Arno Peters |
Subject: |
Guile 1.4 hangs on syncase macro expansion |
Date: |
Fri, 14 Feb 2003 17:58:32 +0100 |
User-agent: |
Mutt/1.5.3i |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Guile 1.4 hangs on syncase macro expansion,
Arno Peters <=