From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.user Subject: (ice-9 syncase) Date: Mon, 04 Oct 2004 22:18:26 +0200 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <1096921106.3932.139.camel@localhost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1096959532 17907 80.91.229.6 (5 Oct 2004 06:58:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 5 Oct 2004 06:58:52 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Oct 05 08:58:44 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CEjHX-0002dO-00 for ; Tue, 05 Oct 2004 08:58:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CEjOA-0002ZD-LU for guile-user@m.gmane.org; Tue, 05 Oct 2004 03:05:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CEjO4-0002XA-4N for guile-user@gnu.org; Tue, 05 Oct 2004 03:05:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CEjO2-0002Vp-Ps for guile-user@gnu.org; Tue, 05 Oct 2004 03:05:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CEjO2-0002Vi-ML for guile-user@gnu.org; Tue, 05 Oct 2004 03:05:26 -0400 Original-Received: from [216.166.232.203] (helo=johnson-resources.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CEjH4-0005nv-0E for guile-user@gnu.org; Tue, 05 Oct 2004 02:58:14 -0400 Original-Received: from localhost (mantis.schoolnet.na [::ffff:196.44.140.238]) (AUTH: LOGIN wingo) by johnson-resources.com with esmtp; Tue, 05 Oct 2004 02:57:06 -0400 id 001201C4.416245C5.00007B3E Original-Received: from wingo by localhost with local (Exim 3.36 #1 (Debian)) id 1CEZIF-0001wx-00 for ; Mon, 04 Oct 2004 22:18:47 +0200 Original-To: Guile Users X-Mailer: Evolution 1.5.93 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:3509 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:3509 Hey all, I've been having some problems lately with syncase macros and modules. Now, a specific problem that completely stumps me. I am getting SSAX to work with r5rs macros. Part of SSAX's API are a set of macros to create custom SAX parsers. They don't work, though: guile> ssax:make-parser $1 = # guile> (ssax:make-parser) ERROR: invalid syntax (find k-args (DOCTYPE . default) DOCTYPE val . others) ABORT: (misc-error) This same code me a more proper error about not putting the right arguments if I put myself in the (sxml ssax) module first. This error isn't very informative due to syncase stack cutting. ssax:make-parser is a macro made by another macro, ssax:define-labeled- arg-macro, which is also exported, and it starts off like this: (define-syntax ssax:define-labeled-arg-macro (syntax-rules () ((ssax:define-labeled-arg-macro labeled-arg-macro-name (positional-macro-name (arg-name . arg-def) ...)) (define-syntax labeled-arg-macro-name (syntax-rules () ((labeled-arg-macro-name . kw-val-pairs) (letrec-syntax ((find (syntax-rules (arg-name ...) [...] The interesting thing is that `find' is actually a local syntactic binding. I could maybe understand if find were a toplevel binding, then one would expect information about it to be stored in the module somewhere (apparently on the variable). However, it's not toplevel. Perhaps this is affected by the note on psyntax.ss:203: ;;; "let-syntax" and "letrec-syntax" are also treated as splicing ;;; constructs, in violation of the R4RS appendix and probably the R5RS ;;; when it comes out. A consequence, let-syntax and letrec-syntax do ;;; not create local contours, as do let and letrec. Although the ;;; functionality is greater as it is presently implemented, we will ;;; probably change it to conform to the R4RS/expected R5RS. However, the `find' symbol is bound to a procedure within (sxml ssax). I don't know what's going on here. Any ideas? Now I have to do crappy things like (use-modules (sxml ssax)) (define-module (sxml ssax)) to use these macros. Thanks in advance, -- Andy Wingo http://ambient.2y.net/wingo/ _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user