On Thu, Jun 8, 2017 at 3:47 AM, Peter Bex <[email protected]> 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 http://vrici.lojban.org/~cowan [email protected] 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
_______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
