unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* use-syntax / transformer doc bugs
@ 2004-10-04 20:10 Andy Wingo
  2004-12-22 16:00 ` Marius Vollmer
  2005-01-09 23:35 ` Kevin Ryde
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Wingo @ 2004-10-04 20:10 UTC (permalink / raw)


Some bugs:

scm:eval-transformer was removed in HEAD without a corresponding 
ChangeLog entry in ice-9. This is confusing when digging into history.

The documentation on module transformers and the "system transformer"
is a bit shaky. For one, there doesn't seem to be a system transformer
any more. Second, the purpose of the module transformer isn't well
documented; for example, it's always #f unless syncase is loaded
(afaict). One should note that it is for implementing alternate syntax
packages, notably syncase, but also including language translation. (Is 
that right?)

It's not clear from the docs that what (use-syntax (foo bar)) actually
does is uses the (foo bar) module, then installs the procedure bound to
`bar' as (module-transformer (current-module)). That seems like a bit of
a hack, but whatever. It should be noted that the user should only call
`use-syntax' for a module that actually implements a transformer, not
for modules that just export syntax. Also, it should cross-reference to
the paragraph describing the idea of a syntax transformer.

(And why are #:export and #:export-syntax different if they don't act
differently?)

In guile 1.6.4, (define-module (foo) #:use-syntax (ice-9 syncase)) won't
work because of this in boot-9.scm:1756:

	  (case (car kws)
	    ((#:use-module #:use-syntax)
             [...]
	       (and (eq? (car kws) 'use-syntax)

This is fixed in HEAD, but it would be nice if we could
s/'use-syntax/#:use-syntax/ in the 1.6 branch. Although strictly
speaking it might introduce incompatibilities with existing programs.
You can always get around it with (use-syntax (ice-9 syncase)). It
should be noted somewhere, at least.

Regards,
-- 
Andy Wingo <wingo@pobox.com>
http://ambient.2y.net/wingo/


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


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

end of thread, other threads:[~2005-01-09 23:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-04 20:10 use-syntax / transformer doc bugs Andy Wingo
2004-12-22 16:00 ` Marius Vollmer
2004-12-22 20:19   ` Rob Browning
2005-01-09 23:35 ` Kevin Ryde

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