unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
Subject: use-syntax / transformer doc bugs
Date: Mon, 04 Oct 2004 22:10:30 +0200	[thread overview]
Message-ID: <1096920630.3932.137.camel@localhost> (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


             reply	other threads:[~2004-10-04 20:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-04 20:10 Andy Wingo [this message]
2004-12-22 16:00 ` use-syntax / transformer doc bugs Marius Vollmer
2004-12-22 20:19   ` Rob Browning
2005-01-09 23:35 ` Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1096920630.3932.137.camel@localhost \
    --to=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).