[<<][staapl][>>][..]
Thu Aug 9 17:55:48 CEST 2007
require-for-syntax
look at the macro compiler-patterns. find a way to put the utility
functions in a module without getting the error:
pattern-core.ss:94:11: compile: bad syntax; function application is
not allowed, because no #%app syntax transformer is bound in: (begin
(ns-set! (quote (macro +)) (make-word-compiled (quote +)
(lift-macro-executable (lift-transform (lambda asm (with-handlers
(((lambda (ex) #t) (lambda (ex) (pattern-failed (quote +) asm))))
(match asm ((((quote qw) b) ((quote qw) a) . rest) (appen...
i don't get it. when i make them local to the transformer expression,
all is well, but using 'require-for-syntax' doesn't work.
i tried the following isolated case:
;; Utilities for syntax object processing.
(module stx-utils mzscheme
(provide (all-defined))
;; Reverse a syntax list.
(define (reverse-stx stx)
#`(#,@(reverse (syntax-e stx)))))
(module test mzscheme
(require-for-syntax (file "~/plt/stx-utils.ss"))
(define-syntax reverse-quote
(lambda (stx)
(syntax-case stx ()
((_ list)
#`(quote #,(reverse-stx #'list)))))))
and this seems to work fine, so i'm doing something else wrong..
[Reply][About][<<][staapl][>>][..]