chicken-hackers
[Top][All Lists]
Advanced

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

[Chicken-hackers] [PATCH] [5] Add (chicken internal built-in-core-macros


From: Peter Bex
Subject: [Chicken-hackers] [PATCH] [5] Add (chicken internal built-in-core-macros) as a way for library.scm to use non-standard macros
Date: Tue, 31 Oct 2017 21:13:58 +0100
User-agent: NeoMutt/20170113 (1.7.2)

Hi all,

Currently we have to do (import (only chicken when unless handle-exceptions))
somewhere in library.scm.  We can't import them from (chicken base) and
(chicken condition), because those modules are also being declared in
library.scm.

The definitions of these modules in library.scm are incomplete: they don't
contain the syntactic exports; those are handled in the hand-crafted
import libraries which take the syntactic environments as prepared by
expand.scm / chicken-syntax.scm / modules.scm (yeah it's complex).

Because the modules themselves are declared in library.scm, trying to
import from them later on will use those definitions rather than the
definitions from the import libraries (the compiler won't go looking
in the filesystem for modules that you just declared).  Therefore, we
can't use the macros exported by the import libraries corresponding to
those modules.

Like I mentioned in the initial paragrah, currently, we work around
that by importing them from the "chicken" module.  Because this module
will eventually disappear, we need something special to get at those
nonstandard macros.  The attached patch trivially adds a new internal,
undocumented module called (chicken internal built-in-core-macros).

I briefly thought about naming it ##sys#built-in-core-macros.  We could
also do that, instead.  In any case, we need something like this before
the next pre-snapshot (pre4?) so that we can drop the chicken module
after that has been made.

Cheers,
Peter

Attachment: 0001-Add-module-hack-so-library.scm-can-refer-to-built-in.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

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