[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Problem making macros available to code loaded with
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] Problem making macros available to code loaded with (load) |
Date: |
Mon, 10 Nov 2008 08:28:07 +0100 |
On Sat, Nov 8, 2008 at 5:22 PM, Alejandro Forero Cuervo
<address@hidden> wrote:
> I have two files:
>
> a.scm:
>
> (use srfi-40)
> (stream-delay stream-null)
>
> b.scm:
>
> (use srfi-40)
> (load "a.scm")
>
> However, if I compile b.scm and run the resulting executable, I get an
> error:
>
The macros that srfi-40 provides are not loaded at runtime, but during
the compilation of b.scm. The loading happens at run-time, where
the macros are not available. a.scm could do a "(require 'srfi-40)",
though. This should load macros and runtime-support code (the latter
should be a noop, as the code is already loaded and registered)
into the running process. It might be possible that srfi-40.scm
needs extended macros (which are not provided by the core
evaluator available at runtime), in this case do a
"(require 'chicken-more-macros)" before require'ing srfi-40.
cheers,
felix