chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Exporting proc and macro that references it?


From: Alejandro Forero Cuervo
Subject: Re: [Chicken-users] Exporting proc and macro that references it?
Date: Mon, 5 Jul 2010 23:12:09 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

> >> I didn't get the error you're getting, but I think what you need is this
> >> section from the manual:
> >> 
> >> [snip]
> >> 
> >> In other words, do (module embedded-test ((test register)) ...)
> >> 
> >> I think it worked because the code you pasted in the mail also exported
> >> REGISTER, which your real code perhaps does not?
> > 
> > Hm, very strange.
> > 
> > I'm literally testing with this (after your suggestion):
> > 
> >   (module embedded-test ((test register) register)
> >   (import chicken scheme)
> > 
> >   (define (register) #f)
> >   (define-syntax test (syntax-rules () ((test) (register))))
> >   )
> 
> Note: just using (test register) as export-list is fine, since
> you are exporting register, anyway. You only need that if register
> shouldn't be exported.

OK.  Makes perfect sense.

> > And yet, /opt/chicken-4.5.0/bin/csc test.scm && ./test yields the error I
> > quoted. :-/  Are you using 4.5.0?
> > 
> 
> Your .setup file installs embedded-test as `syntax' (see property-list
> in the invocation if `install-extension'), which means the extension
> has no runtime part (and thus nothing is loaded at runtime to
> provide the necessary runtime code). Remove the `(syntax)' and it
> works.

Ah!  So that's what was breaking it, I see.  Thanks for your help, it
works now!

Alejo.
http://azul.freaks-unidos.net/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]