[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-mit-scheme] [bug #27256] Compiled SOS define-generics impossible to
[Bug-mit-scheme] [bug #27256] Compiled SOS define-generics impossible to load
Mon, 17 Aug 2009 09:24:27 -0700
> From: "Eugenio M. Vigo" <address@hidden>
> Date: Sat, 15 Aug 2009 12:18:07 +0000
> I've noticed the following issue when compiling (no matter if into SCode or
> native) a module that's using SOS 1.9. The compiling runs perfectly, but if I
> attempt to load the compiled file (using the load procedure), MIT/GNU Scheme
> will complain that the names used at define-generic's lambda list are unbound
> and therefore, failing to load.
Sounds like SOS was not loaded when you compiled. That would leave
define-generic undefined, producing a free variable reference. object
would also be a free variable reference in e.g.
(define-generic gtk-object-destroy (object))
since it syntaxes as a procedure application with no arguments... so
you will see an "object unbound" message.
You can see your syntaxed code (s-code) like this:
(pp (fasload "file.bin"))
You should see (access make-generic-procedure #f) instead of define-generic.
> This issue has led me to use MIT/GNU Scheme's make-generic-procedure instead
> of define-generic.
make-generic-procedure will also be compiled as a free variable
reference. If that works, you must have loaded SOS in the runtime
environment. You just need to load SOS at compile/syntax-time.