unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Help to TeXmacs with Guile 2
@ 2014-06-01  4:16 Germán Arias
  2014-06-01 17:54 ` David Pirotte
  0 siblings, 1 reply; 4+ messages in thread
From: Germán Arias @ 2014-06-01  4:16 UTC (permalink / raw)
  To: Guile

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.




^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <mailman.89.1401638430.28681.guile-user@gnu.org>]

end of thread, other threads:[~2014-06-02  5:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-01  4:16 Help to TeXmacs with Guile 2 Germán Arias
2014-06-01 17:54 ` 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

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).