unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Taylan Kammer <taylan.kammer@gmail.com>
To: 40294@debbugs.gnu.org, John Cowan <cowan@ccil.org>
Subject: bug#40294: Documentation for arity procedures doesn't match behavior
Date: Sun, 16 May 2021 02:07:02 +0200	[thread overview]
Message-ID: <b94847aa-f32f-0d7a-f727-0d446e3e489d@gmail.com> (raw)
In-Reply-To: <CAD2gp_QD9aBPeHAykqiD6agkYndrQFtqZMzY07VufcLZnH1PiQ@mail.gmail.com>

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	other threads:[~2021-05-16  0:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-28 21:42 bug#40294: Documentation for arity procedures doesn't match behavior John Cowan
2021-05-16  0:07 ` Taylan Kammer [this message]
2021-05-16 15:26   ` Taylan Kammer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b94847aa-f32f-0d7a-f727-0d446e3e489d@gmail.com \
    --to=taylan.kammer@gmail.com \
    --cc=40294@debbugs.gnu.org \
    --cc=cowan@ccil.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).