[gambit-list] Pasting into REPL good; including file bad

William James w_a_x_man at yahoo.com
Mon May 9 21:38:25 EDT 2011

--- On Sun, 5/1/11, William James <w_a_x_man at yahoo.com> wrote:

> From: William James <w_a_x_man at yahoo.com>
> Subject: [gambit-list] Pasting into REPL good; including file bad
> To: gambit-list at iro.umontreal.ca
> Date: Sunday, May 1, 2011, 4:02 AM
> The followine code is accepted
> without error when pasted into
> the REPL, but generates this error when included from a
> file:

The solution suggested was
(define-macro (at-expand-time expr) (eval expr) `(begin))

That works---up to a point.

When a function in file X is wrapped in that macro, when compiling
the function is not visible in file Y if file Y includes file X.

On usenet, it was stated that Chez Scheme handles the
problem this way:

(meta define (nthcdr n lst) ---)

What is the solution in Gambit?

More information about the Gambit-list mailing list