bug-guile
[Top][All Lists]
Advanced

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

bug#40294: Documentation for arity procedures doesn't match behavior


From: Taylan Kammer
Subject: bug#40294: Documentation for arity procedures doesn't match behavior
Date: Sun, 16 May 2021 02:07:02 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

Hi John!

I can't explain why program-arities isn't defined, but I can tell
that you're not using the arity:foo procedures the way they're meant
to, because their definition indicates that one is supposed to pass
them some sort of arity object that is represented as a list.

The implementations use 'match' to destructure their argument and the
values you're getting correspond to the "else" branch of the match
since you provide procedures as arguments instead of lists. (One could
say the lack of type-checking is a bug on its own right here.)

We seem to have no way of getting an arity list of this sort since
program-arities isn't defined.

I suspect that some corresponding C code was removed at some point
and the module (system vm program) accidentally left in place, as
the Scheme code begins with:

(load-extension (string-append "libguile-" (effective-version))
                "scm_init_programs")

scm_init_programs is from libguile/programs.c and indeed it doesn't
define program-arities.

Will investigate more tomorrow.

--
Taylan





reply via email to

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