unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Guile 1.4 hangs on syncase macro expansion
@ 2003-02-14 16:58 Arno Peters
  0 siblings, 0 replies; only message in thread
From: Arno Peters @ 2003-02-14 16:58 UTC (permalink / 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-02-14 16:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-14 16:58 Guile 1.4 hangs on syncase macro expansion Arno Peters

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).