[Top][All Lists]

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

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

From: John Cowan
Subject: Re: [Chicken-hackers] [PATCH] Add unexport form for modules
Date: Wed, 7 Jun 2017 12:41:03 -0400

On Wed, Jun 7, 2017 at 9:28 AM, megane <address@hidden> wrote:

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.

Very nice!

While you are messing around with the module system, I'd like to see "strip-prefix", which is just like "prefix" except it removes a prefix from identifiers (if present) rather than adding one.  So:

(import (except scheme + - * / bla bla bla))
(import (strip-prefix chicken "fp"))

causes fp+ to be imported as +, fp- to be imported as -, etc. etc., for programs that don't use exact numbers.  This isn't something you need to do that often, and it adds no power to rename (but then neither does prefix), but it can be useful.


reply via email to

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