Hi,
I'm trying to build a version of Gambit that has Termite built-in. I edited lib/_threads.scm and un-commented out the ';;(##include "termite/termite.scm")'. That mostly works, but it doesn't do whatever's necessary to import the Termite names into the default environment:
fluffy:518% gsi Gambit v4.5.3
(self)
*** ERROR IN (console)@1.2 -- Unbound variable: self 1> ,t
termite#self
#<procedure #2 termite#self>
(termite#self)
#<thread #1 primordial>
I can also compile things, but only if I explicitly qualify all the Termite identifiers with "termite#". What do I have to do to get the names imported?
Thanks,
Derrell
Afficher les réponses par date
I haven't looked at the Termite code in a while; but changing the namespace handling should be easy. Search for "namespaces" in the search field on the Gambit homepage to learn how those work. You've got two solutions, (1) put the identifyers you want to see into the "" namespace by modifying the namespace form(s) in the Termite sources, (2) add a namespace declaration for them above your code where you want to use them (so that when you use one of the identifyers it will refer to the termite# namespace).