[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help to TeXmacs with Guile 2
From: |
Germán Arias |
Subject: |
Help to TeXmacs with Guile 2 |
Date: |
Sat, 31 May 2014 22:16:46 -0600 |
User-agent: |
GNUMail (Version 1.2.1) |
Hi,
I don't have experience with macros. But I get this error trying TeXmacs with
Guile 2.x:
ERROR: Syntax error:
;;; kernel/boot/boot.scm:57:4: definition in expression context, where
definitions are not allowed, in form (define-syntax define-public-macro (lambda
(y) #f #((macro-type . defmacro) (defmacro-args args)) (syntax-case y () ((_ .
args) (let ((v (syntax->datum (syntax args)))) (datum->syntax y (apply (lambda
(head . body) (quasiquote (define-public (unquote (car head))
(procedure->memoizing-macro (lambda (cmd env) (apply (lambda (unquote (cdr
head)) (unquote-splicing body)) (cdr cmd))))))) v)))))))
The offending code is:
(if (guile-a?)
(define-macro (define-public-macro head . body)
`(define-public ,(car head)
;; FIXME: why can't we use procedure->macro
;; for a non-memoizing variant?
(procedure->memoizing-macro
(lambda (cmd env)
(apply (lambda ,(cdr head) ,@body) (cdr cmd)))))))
Any advice? Thanks.
Germán.
- Help to TeXmacs with Guile 2,
Germán Arias <=