chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Problem with (symbol->string) in Chicken 4.0


From: John Cowan
Subject: Re: [Chicken-users] Problem with (symbol->string) in Chicken 4.0
Date: Thu, 30 Apr 2009 10:19:03 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

William Ramsay scripsit:

> I've recently moved from Chicken-3.4.0  to Chicken-4.0.0.
> 
> I've been using a structure macro I got from /Teach Yourself Scheme in 
> Fixnum Days/ by Dorai Sitaram.    It's worked fine in 3.4 but fails in 
> 4.0 and I can figure out why.   It fails on line 4 of (define-syntax 
> define-structure) with a compile error starting that s is not a 
> symbol.    It is trying to read (define-structure customer ...) at the 
> bottom of the listing.   Why is the word customer no longer a symbol?

In Chicken 4, a bare lambda in define-syntax is an explicit-renaming
macro, so the simplest change is this:

> (define-syntax define-structure
>  (lambda (s . ff)

   (lambda body rename compare)
     (define s (car body))
     (define ff (cdr body))

-- 
Newbies always ask:                             John Cowan
  "Elements or attributes?                      http://www.ccil.org/~cowan
Which will serve me best?"                      address@hidden
  Those who know roar like lions;
  Wise hackers smile like tigers.                   --a tanka, or extended haiku




reply via email to

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