Guile Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hobbit problems
>>>>> "Dirk" == Dirk Herrmann <firstname.lastname@example.org> writes:
Dirk> On Fri, 13 Nov 1998, Bernard URBAN wrote:
>> A good example of how to use modules is hobbit itself... Have
>> a look at how hobbit4d/libhob.scm is compiled as a module. The
>> safe way to use modules with hobbit is to mimic this process.
>> This may solve the problem you have with cdr. If not, could
>> you post a short and COMPLETE exemple showing this problem ?
Dirk> I have a really minimal example:
Dirk> ----------------- test.scm: begin ---------------- (define
Dirk> my_car car) ------------------ test.scm: end
Dirk> I performed the following commands:
Dirk> hob -v -c test.scm # the log is given below guile
You should compile as a module: hob -v -c -m test.scm
For all NEW definitions (not redefinitions), things should be fine
guile> (use-modules (hobbit4d link)) (hobbit-load-from-path
guile> "test") car
Dirk> ERROR: In expression car: ERROR: Unbound variable: car
Dirk> ABORT: (misc-error)
Dirk> Type "(backtrace)" to get more information.
Dirk> #<primitive-procedure cdr>
Dirk> This example shows that the problem occurs if a function is
Dirk> given a new name. As you can see, no module stuff is used
Dirk> (at least not by me). Only those functions that are given a
Dirk> new name are influenced, since 'cdr' is still defined.
Dirk> I still can't tell the reason, since the generated C code
Dirk> (which I enclose at the bottom) makes sense to me (although
Dirk> I haven't looked very deeply into how interned symbols
The way intern and friends work is also largely mysterious to me.
Added to module, it is a real nightmare. For the sake of hobbit,
having intern well explained and a C interface to modules would help a
lot. If anyone is listening to that...
Guile Home |
Main Index |