fix bug in define-scheme-translator
authorAndy Wingo <wingo@pobox.com>
Fri, 31 Oct 2008 13:07:11 +0000 (14:07 +0100)
committerAndy Wingo <wingo@pobox.com>
Fri, 31 Oct 2008 13:07:11 +0000 (14:07 +0100)
* module/language/scheme/translate.scm (define-scheme-translator): Fix a
  bug in this macro for the syntax-error case.

module/language/scheme/translate.scm

index a6a8e20..c567126 100644 (file)
@@ -50,6 +50,8 @@
 
 ;; Looks up transformers relative to the current module at
 ;; compilation-time. See also the discussion of ghil-lookup in ghil.scm.
+;;
+;; FIXME shadowing lexicals?
 (define (lookup-transformer head retrans)
   (let* ((mod (current-module))
          (val (and (symbol? head)
                  (pmatch (cdr exp)
                          ,@clauses
                          (else
-                          (syntax-error loc (format #f "bad ~A" ',sym exp)))))))
+                          (syntax-error l (format #f "bad ~A" ',sym) exp))))))
 
 (define-scheme-translator quote
   ;; (quote OBJ)