[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

procedure-source of procedure-with-setter

From: Bill Schottstaedt
Subject: procedure-source of procedure-with-setter
Date: Wed, 5 Feb 2003 06:39:58 -0800

I think the fact that procedure-source returns a "wrong type error"
if passed a procedure-with-setter is less than ideal:

guile> (version)
"1.6.2" ; happens in 1.7.0 as well
guile> (define test-func
   (lambda (val) #f)
   (lambda (val new-val) #f)))
guile> (if (procedure? test-func) (display (procedure-source test-func)))

   standard input:7:37: In procedure procedure-source in expression 
(procedure-source test-func):
standard input:7:37: Wrong type argument in position 1: #<procedure-with-setter>
ABORT: (wrong-type-arg)

Type "(backtrace)" to get more information or "(debug)" to enter the debugger.

So one's first reaction is that procedure? says it is a procedure,
then procedure-source says no it isn't; perhaps it could return #f
instead (as if does with an argument like abs or a foreign function)?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]