[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] 4.8.0.5 syntax weirdness
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] 4.8.0.5 syntax weirdness |
Date: |
Mon, 10 Mar 2014 13:54:03 +0100 |
User-agent: |
Mutt/1.4.2.3i |
On Mon, Mar 10, 2014 at 01:26:08PM +0100, Sandra Snan wrote:
> Dear chicken-users;
> I have a simple program that does most of its heavy lifting at compile
> time.
>
> To demonstrate the issue, I've written two stubs (as simple as I could
> make them but still show the issue I'm having).
>
> File number one is called ticket-stub.scm:
> -----8<----
> (use s (srfi 1))
>
> (define-syntax create-tickets
> (ir-macro-transformer
> (lambda (f i c)
> `(list
> ,@(filter-map
> (lambda (x)
> (if (s-contains? "enemy-" x)
> #f
> (s-prepend "friendly-" x)))
> cells)))))
>
> (print (first (create-tickets)))
> ----->8----
Hello Sandra,
The above program uses the procedures provided by the "s" egg at
expansion time, so you need to load and import them at the syntax level:
(begin-for-syntax (use s))
Or, in newer CHICKENs:
(use-for-syntax s)
The reason it worked with 4.7.0 and not with 4.8.0 is that this is
really a bug: at compile time, procedures imported for runtime should
not be available unless they're explicitly imported. That's the
entry in 4.8.0's NEWS: "Fixed a bug that caused imported identifiers
to leak into the macroexpansion/compile-time environment"
Cheers,
Peter
--
http://www.more-magic.net
- [Chicken-users] 4.8.0.5 syntax weirdness, Sandra Snan, 2014/03/10
- Re: [Chicken-users] 4.8.0.5 syntax weirdness,
Peter Bex <=
- Re: [Chicken-users] 4.8.0.5 syntax weirdness, Sandra Snan, 2014/03/10
- Re: [Chicken-users] 4.8.0.5 syntax weirdness, Peter Bex, 2014/03/10
- Re: [Chicken-users] 4.8.0.5 syntax weirdness, Sandra Snan, 2014/03/10
- Re: [Chicken-users] 4.8.0.5 syntax weirdness, Peter Bex, 2014/03/10
- Re: [Chicken-users] 4.8.0.5 syntax weirdness, Jim Ursetto, 2014/03/11
- Re: [Chicken-users] 4.8.0.5 syntax weirdness, Peter Bex, 2014/03/11
- Re: [Chicken-users] 4.8.0.5 syntax weirdness, Jim Ursetto, 2014/03/12