[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] cond-expand failing inside module
From: |
Nathan Thern |
Subject: |
[Chicken-users] cond-expand failing inside module |
Date: |
Wed, 15 Apr 2009 18:26:16 -0500 |
Hello all-
It seems cond-expand is not recognized inside module declarations. I
have the following file saved as "extra.scm":
--------
(module
extra
(when unless)
(cond-expand (plt) (else
(define-syntax when
(syntax-rules ()
((_ cond . body)
(if cond (begin . body)))))
(define-syntax unless
(syntax-rules ()
((_ cond . body)
(if (not cond) (begin . body)))))
))
)
--------
It actually has lots more in it.
(require 'extra) at the REPL fails with "Warning: reference to
possibly unbound identifier: cond-expand".
When using chicken 3.X with -R syntax-case, the file loaded just fine,
so I'm wondering if there's a good reason for not allowing cond-expand
inside a module in chicken 4. (SRFI-0 specifies cond-expand as a
top-level construct, but does not prohibit implementations from
allowing it inside other constructs.)
I realize that the module format used here will not work with
PLT-scheme anymore, so I could just remove the cond-expands, but I'm
still curious.
regards,
NT
- [Chicken-users] cond-expand failing inside module,
Nathan Thern <=