chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH 0/2] Clean up the default macro environment


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH 0/2] Clean up the default macro environment
Date: Wed, 18 Oct 2017 14:34:23 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Oct 18, 2017 at 05:29:51PM +1300, Evan Hanson wrote:
> Hello,
> 
> These two patches move `begin-for-syntax' and `require-extension-for-syntax'
> out of the default macro environment, effectively dropping them from (scheme)
> and putting them in (chicken base) instead.
> 
> I think this leaves only `require-library' to move, rename, or remove from the
> default macro environment. Exactly which option we should choose is a subject
> for another email, I think.

Thanks for these patches, I've pushed them.  Incidentally, I've been
working on the "scheme" module (patch to appear soon on this list), and
also noticed that the r5rs modules are a bit messy in their syntactic
exports.  This whole filtering-out of syntactic exports from the report
environments in eval.scm is nasty and doesn't help for regular module
use: (module foo () (import scheme) (require-library srfi-4)) will
work without an error.

I think a better approach than just grabbing "the default macro
environment" would be to explicitly capture the macros for r5rs like
we do for, say, chicken.base or chicken.condition.  If any macros
accidentally end up in the default/initial macro environment they
won't pollute the "scheme" module, at least.  Finally, having
proper syntactic exports for the scheme/r5rs[-null] and r4rs[-null]
modules would also allow us to get rid of the "cleaning" in eval.scm
altogether, which tightens up the code a bit too.

Cheers,
Peter

Attachment: signature.asc
Description: PGP signature


reply via email to

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