[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: Sun, 11 Jun 2017 16:34:40 -0400

On Thu, Jun 8, 2017 at 3:47 AM, Peter Bex <address@hidden> wrote:

The typical way to do that is to put the module definition in another file
than where you put the definitions.  Then you can simply
(include "defs.scm") in the tests and in the module.  But yeah, this is
a bit unwieldy, I admit.

My personal practice is to put just the module definition in the main file foo.scm, and then have it include the plain code in foo-impl.scm.  When debugging, I just load foo-impl.scm so that I have full access to the internals.  This also makes foo-impl.scm portable to other Schemes with different module languages.

As for the tests, I make them say "(use foo)" so that they are truly black-box.

John Cowan        address@hidden
SAXParserFactory [is] a hideous, evil monstrosity of a class that should
be hung, shot, beheaded, drawn and quartered, burned at the stake,
buried in unconsecrated ground, dug up, cremated, and the ashes tossed
in the Tiber while the complete cast of Wicked sings "Ding dong, the
witch is dead."  --Elliotte Rusty Harold on xml-dev

reply via email to

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