[Top][All Lists]

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

[Chicken-hackers] [PATCH] Add unexport form for modules

From: megane
Subject: [Chicken-hackers] [PATCH] Add unexport form for modules
Date: Wed, 07 Jun 2017 16:28:33 +0300
User-agent: mu4e 0.9.18; emacs 24.4.1


This patch adds a counterpart for the export syntax form.

The implementation is pretty straightforward. A new slot, called
module-unexport-list, is added to the module record. Unexport adds
identifiers to this list if the module export list is *. In
##sys#finalize-module all identifiers about to be added to syntax-exports or
variable-exports are dropped if they are found in module-unexport-list.
Export form also drops identifiers from the unexport list.

If the module export list is not *, module-unexport-list is not used. In
this case, it's enough to just remove the identifier to be unexported
from the module-export-list.

I tried implement this without a new module record slot at first but
failed. And even if that was possible the logic for unexports and
exports would be quite convoluted.

This patch applies to the 4.12.0 tarball. (I'm unable to compile from
the git currently, it gives errors like posixunix.c:385:43: error:
‘struct tm’ has no member named ‘tm_gmtoff’)

I'm OK if this gets pushed back until 5, but nothing seems to break
obviously in my tests.

Attachment: module-unexport-syntax.patch
Description: Text Data

reply via email to

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