[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: r6rs standard libraries

From: Julian Graham
Subject: Re: r6rs standard libraries
Date: Mon, 8 Feb 2010 11:02:01 -0500

Hi Andy,

> Will do, and thanks!!

No problem!

I'm running into some trouble, though, and I could use your (or
somebody's) help.  I'm a little shaky on the details with regard to
the syntax-case expansion process, but I think the issue is that
during the expansion of a single top-level expression, the expansion
environment is constant.  So the following (which is approximately
what "native" Guile modules do):

(define-module (my-module))
(use-modules ((my-syntax-transformer)))

...will properly expand and compile, since the expansion environment
for [transformable-syntax] reflects the updates to the module-uses
list made by `use-modules', whereas the following (which is
approximately what our R6RS library transformer produces):

  (define-module (my-module))
  (use-modules ((my-syntax-transformer)))

...won't properly expand macros whose transformers are defined in the
`(my-syntax-transformer)' module.

Does this sound plausible?  I spent most of this past weekend trying
to grok this and work around it (via various `eval'-based
incantations) without much luck.  (The weird part is, I don't recall
this happening with my old `(ice-9 r6rs-libraries)' module
implementation, but I could be wrong.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]