[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] dynamic unbound-variable-value procedures?
From: |
Arto Bendiken |
Subject: |
[Chicken-users] dynamic unbound-variable-value procedures? |
Date: |
Sat, 28 Jan 2006 22:43:44 +0100 |
Hi,
Since it seems possible to set the value of
`##sys#unbound-variable-value-hook' to a procedure, I was trying to do
the following:
;;; dynamic c*****r handler
(unbound-variable-value
(lambda (list)
; how to find out the symbol by which we ended up here?
...))
(cadadar a-list-of-lists)
I found a similar question in the mailing list archives, relating to
an attempt to use `invalid-procedure-call-handler' for this purpose,
followed by a suggestion by Felix to use `unbound-variable-value'
instead:
http://lists.gnu.org/archive/html/chicken-users/2005-03/msg00044.html
However, presumably there must be some way for the hook procedure to
decide whether to perform, say, a `cadadar' operation instead of a
`cadddar', but I haven't managed to figure it out. I looked at the
variables beginning with ##sys... to see if there was some global I
could peruse in the handler, and skimmed through the relevant portions
of runtime.c for Chicken 2.2, but no luck so far.
Suggestions, or a "no, not possible", appreciated :-)
--
Arto Bendiken
http://bendiken.net/
- [Chicken-users] dynamic unbound-variable-value procedures?,
Arto Bendiken <=