chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] chicken-spock and 'load'


From: John Cowan
Subject: Re: [Chicken-users] chicken-spock and 'load'
Date: Sun, 27 Dec 2015 17:27:56 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

Sudarshan S Chawathe scripsit:

> I am probably missing something very obvious, but I cannot seem to
> figure out how to load one file (Scheme source) in another when using
> chicken-spock.  I'd be grateful for any pointers.

Scheme `load` is a procedure; that is, it is executed at run time.
Spock is an offline compiler, so there is no way to load Scheme code
(as opposed to JavaScript code) into a running Spock program.  As far
as I know, Spock doesn't implement `include` either, which would be a
compile-time action.

> (What I'm hoping to do is, for example, use portable SRFI
> implementations within my code destined for Javascript via
> chicken-spock.)

All I can suggest is that you compile them separately and then concatenate
the resulting JavaScript files.  However, if the SRFIs include macros,
those macros won't be available to your code.

-- 
John Cowan          http://www.ccil.org/~cowan        address@hidden
If a soldier is asked why he kills people who have done him no harm, or a
terrorist why he kills innocent people with his bombs, they can always
reply that war has been declared, and there are no innocent people in an
enemy country in wartime.  The answer is psychotic, but it is the answer
that humanity has given to every act of aggression in history.  --Northrop Frye



reply via email to

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