From: "Germán Arias" <germanandre@gmx.es>
To: Guile <guile-user@gnu.org>
Subject: Help to TeXmacs with Guile 2
Date: Sat, 31 May 2014 22:16:46 -0600 [thread overview]
Message-ID: <b029d237d05842b655756e40d8bcd672@german-desktop> (raw)
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.
next reply other threads:[~2014-06-01 4:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-01 4:16 Germán Arias [this message]
2014-06-01 17:54 ` Help to TeXmacs with Guile 2 David Pirotte
2014-06-02 5:14 ` Germán Arias
[not found] <mailman.89.1401638430.28681.guile-user@gnu.org>
2014-06-01 16:58 ` Artyom Poptsov
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=b029d237d05842b655756e40d8bcd672@german-desktop \
--to=germanandre@gmx.es \
--cc=guile-user@gnu.org \
/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).