Another clue,

Put this into a file and load it

 (define (f x) (c))
 (define-syntax c (lambda (x) (pk 'c) #t))

,x f shows

   0    (assert-nargs-ee/locals 1)      ;; 1 arg, 0 locals
   2    (toplevel-ref 1)                ;; #<syntax-transformer c>
   4    (tail-call 0)                                         at
examples/mutual.scm:9:14

and (f 1) yields

scheme@(guile-user) [4]> (f 1)
ERROR: In procedure #<syntax-transformer c>:
ERROR: Wrong type to apply: #<syntax-transformer c>

This is confusing!!

/Stefan

On Tue, May 15, 2012 at 8:38 PM, Andy Wingo <wi...@pobox.com> wrote:

> On Mon 14 May 2012 21:13, Stefan Israelsson Tampe <stefan.ita...@gmail.com>
> writes:
>
> > (begin
> >    (define parser-a code-a ...)
> >    (define-syntax a spec-a))
> >
> > (begin
> >    (define parser-b code-b ...)
> >    (define-syntax b spec-b))
> >
> > In racket they manage to evaluate the define-syntax forms before the
> define-forms cause in the expansion
> > of code-a amd code-b they need the spec's spec-a and spec-b.
> >
> > Do you have any ideas how solve this. I do have a fix for problem but it
> is not easy to use.
>
> Have you tried master?  If I understand you correctly I think it should
> work there.
>
> Andy
> --
> http://wingolog.org/
>

Reply via email to