chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Problem accessing macro from module


From: John Cowan
Subject: Re: [Chicken-users] Problem accessing macro from module
Date: Sun, 21 Jan 2007 14:05:27 -0500
User-agent: Mutt/1.3.28i

Peter Wright scripsit:

> When I run this as a script, the hello-world call seems to works
> correctly - but the script then fails on the use of fn to create the
> goodbye-world function.

That's because the Chicken compiler (like all Scheme compilers, AFAIK)
compiles away all syntax definitions.  In order to make them available
to the interpreter or to future compilation runs, you have to bring in
the syntax definition in source form.  Here hello-world works because
it was compiled into the pfn egg, but the fn keyword is not defined to
the interpreter.

Split your egg into two parts, one which defines macros and is included
for syntax, and one which defines functions and is compiled.  The page
on chicken-setup language on the wiki explains how.

-- 
Unless it was by accident that I had            John Cowan
offended someone, I never apologized.           address@hidden
        --Quentin Crisp                         http://www.ccil.org/~cowan




reply via email to

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