unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* [r6rs] expansion bug, probably free-identifier=? related
@ 2011-02-28  6:56 Marco Maggi
  2011-02-28 22:22 ` Andy Wingo
  2011-04-29 14:56 ` Andy Wingo
  0 siblings, 2 replies; 3+ messages in thread
From: Marco Maggi @ 2011-02-28  6:56 UTC (permalink / raw)
  To: guile-user

The following little package:

<http://github.com/downloads/marcomaggi/nausicaa/synrec6-1.0.1.tar.gz>

works with  Larceny, Mosh,  Petite Chez, Racket,  Vicare and
Ypsilon; with Guile 2.0 it fails with:

GUILE_LOAD_PATH=.: guile -l guile-r6rs-setup.scm --auto-compile -s ./test-flatt-syntactic.sps; GUILE_LOAD_PATH=.: guile -l guile-r6rs-setup.scm --auto-compile -s ./test-synrec6.sps;
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/marco/src/devel/scheme/icaro/src/standalone/synrec6/./test-flatt-syntactic.sps
;;; WARNING: compilation of /home/marco/src/devel/scheme/icaro/src/standalone/synrec6/./test-flatt-syntactic.sps failed:
;;; key r6rs:exception, throw_args (#<r6rs:record:&raise-object-wrapper>)
Backtrace:
In module/ice-9/boot-9.scm:
 170: 13 [catch #t #<catch-closure 822a5d0> ...]
In unknown file:
   ?: 12 [catch-closure]
In module/ice-9/boot-9.scm:
  62: 11 [call-with-prompt prompt0 ...]
In module/ice-9/eval.scm:
 389: 10 [eval # #]
In module/ice-9/boot-9.scm:
1917: 9 [save-module-excursion #<procedure 80a2320 at module/ice-9/boot-9.scm:3341:3 ()>]
3348: 8 [#<procedure 80a2320 at module/ice-9/boot-9.scm:3341:3 ()>]
1189: 7 [%start-stack load-stack ...]
1194: 6 [#<procedure 8723ac8 ()>]
In unknown file:
   ?: 5 [primitive-load "/home/marco/src/devel/scheme/icaro/src/standalone/synrec6/./test-flatt-syntactic.sps"]
In module/ice-9/eval.scm:
 458: 4 [#<procedure 813b680 at module/ice-9/eval.scm:452:4 (exp)> #]
In module/ice-9/psyntax.scm:
1066: 3 [chi-top (six.define-record-type # # #) () (#) ...]
1007: 2 [syntax-type (six.define-record-type # # #) () (#) ...]
1303: 1 [chi-macro #<procedure 8704ab0 (stx)> (six.define-record-type # # #) () ...]
In unknown file:
   ?: 0 [#<procedure 8704ab0 (stx)> #(syntax-object # # #)]

ERROR: In procedure #<procedure 8704ab0 (stx)>:
ERROR: ERROR: R6RS exception:
  1. &who: define-record-type
  2. &message: "invalid clause in record type definition"
  3. &syntax:
      form: (six.define-record-type (point make-point point?) (six.fields (six.immutable x point-x) (six.mutable y point-y set-point-y!)) (six.nongenerative point-4893d957-e00b-11d9-817f-00111175eb9e))
      subform: (six.fields (six.immutable x point-x) (six.mutable y point-y set-point-y!))

Some deprecated features have been used.  Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information.  Set it to "no" to suppress
this message.
-- 
Marco Maggi



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [r6rs] expansion bug, probably free-identifier=? related
  2011-02-28  6:56 [r6rs] expansion bug, probably free-identifier=? related Marco Maggi
@ 2011-02-28 22:22 ` Andy Wingo
  2011-04-29 14:56 ` Andy Wingo
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2011-02-28 22:22 UTC (permalink / raw)
  To: Marco Maggi; +Cc: guile-user

Indeed, it seems free-id=? should look up the identifiers in their
modules, and compare the bindings (variables), if present, for
eq?-ness.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [r6rs] expansion bug, probably free-identifier=? related
  2011-02-28  6:56 [r6rs] expansion bug, probably free-identifier=? related Marco Maggi
  2011-02-28 22:22 ` Andy Wingo
@ 2011-04-29 14:56 ` Andy Wingo
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2011-04-29 14:56 UTC (permalink / raw)
  To: Marco Maggi; +Cc: guile-user

Hello Marco,

I have a branch pending to fix free-identifier=? in Guile.  It will
probably go in 2.0.2.

However, even with this patch, test-flatt-syntactic.sps still fails
because of two things, one difficult and the other even more so:

  1) Bug https://savannah.gnu.org/bugs/?31472 -- the introduced
     "the-parent-rtd" identifier gets resolved relative to the (synrec6)
     module rather than the module of the expanded form.  This will be
     fixed at some point.

  2) Guile does not hygienically introduce toplevel bindings.  I would
     like to fix it, but it will not be fixed in 2.0.x, as it would
     break ABI.  You can work around this one as Guile's own srfi-9
     does, if you so wish, by generating a temporary yourself.

Regards,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-29 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-28  6:56 [r6rs] expansion bug, probably free-identifier=? related Marco Maggi
2011-02-28 22:22 ` Andy Wingo
2011-04-29 14:56 ` Andy Wingo

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