From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Taylan Kammer Newsgroups: gmane.lisp.guile.bugs Subject: bug#40294: Documentation for arity procedures doesn't match behavior Date: Sun, 16 May 2021 02:07:02 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2297"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 To: 40294@debbugs.gnu.org, John Cowan Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sun May 16 02:08:09 2021 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1li4KG-0000Tv-Mh for guile-bugs@m.gmane-mx.org; Sun, 16 May 2021 02:08:08 +0200 Original-Received: from localhost ([::1]:51706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1li4KF-0005vW-31 for guile-bugs@m.gmane-mx.org; Sat, 15 May 2021 20:08:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1li4KA-0005vM-I8 for bug-guile@gnu.org; Sat, 15 May 2021 20:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37881) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1li4KA-0003WL-Ab for bug-guile@gnu.org; Sat, 15 May 2021 20:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1li4KA-0006Bd-5b for bug-guile@gnu.org; Sat, 15 May 2021 20:08:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Taylan Kammer Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 16 May 2021 00:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40294 X-GNU-PR-Package: guile Original-Received: via spool by 40294-submit@debbugs.gnu.org id=B40294.162112363223724 (code B ref 40294); Sun, 16 May 2021 00:08:02 +0000 Original-Received: (at 40294) by debbugs.gnu.org; 16 May 2021 00:07:12 +0000 Original-Received: from localhost ([127.0.0.1]:49427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1li4JM-0006Aa-9o for submit@debbugs.gnu.org; Sat, 15 May 2021 20:07:12 -0400 Original-Received: from mail-ej1-f42.google.com ([209.85.218.42]:42782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1li4JK-0006AM-4P for 40294@debbugs.gnu.org; Sat, 15 May 2021 20:07:10 -0400 Original-Received: by mail-ej1-f42.google.com with SMTP id lg14so3802675ejb.9 for <40294@debbugs.gnu.org>; Sat, 15 May 2021 17:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=hEywWM88EVzhl94HsK3P/9Pt4P7XEjVUUzaB8yZz7/4=; b=ZeZJ8D3Qv2tWLoOqCFofPU6AuFIGO8Gr28Dma/1HVx3dNlMAXrty3fh+SGwStzzGFf 8UUOs+d/PhLoeVhhleIn55P1O87jHkI8ws66IqeKU8dpEGTiGWaCBjU/st1fBfYt2UBf GbXrkEYWh+1rfoM1sWHi5HkVbAKkfPMvDMBF33yVX5GerdCLsS3iRfFnqPukbD1sa0xU yBatYFYSOmrYS2E85x3DNP1p31amepVtuh4XAThRqImLpmj1Vhpf4Oq/LDSSI26kgdN4 WQ4sLQQrX+9MJAVrasmVth6JoRbf2jV2E3aLkr2H0GwJi3zMQ31WAcLeEZMRbIX48wvr ZPwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=hEywWM88EVzhl94HsK3P/9Pt4P7XEjVUUzaB8yZz7/4=; b=cfI+HdZgKGqPWllwKIx7j0fKyq0vua+QLYmEDoxp9Rxw6IqN+crdcWmJMTXXMBx4yi Sf1YvJzr/p17IsTtFBQCMEZ3iIoPzSYTHEAmmXTt2ZbUEOzVeVU+Fp6T4V/JBYg71AIi oB8JRXjwxskWNi9DfExXr0NblODrC7ZJ4fYAggfeP0WGM5kbC0atmrcT49k27Gu2el7s vNYE/LW7yGm22fC9RG6SRSl+X7XI+EuQfV2rOIrbBXfVWJPQztSWhc7C8NXSKK7Y1ECJ qRPaVWP8wjGsjIgyA0oz7ZkJIJhvjIF3ZOt8KjOL3UUhCmoho4w06d/09g26p/Yl4QDj 6Pgw== X-Gm-Message-State: AOAM533k279lvaNmhmNvkIUrt63cqDIDVSHSQhvXdcKqcSDYzJI2Yg1f MuGxq0KxwUBsi/ikdqZLoDw= X-Google-Smtp-Source: ABdhPJwiN6GPjr9BilKuYZtkYMFBEmXEJdYuWVqaRA7ezKd6Eq12M8XInClMd399yEnwKxb4BCXzgA== X-Received: by 2002:a17:906:d8cb:: with SMTP id re11mr10232399ejb.482.1621123624201; Sat, 15 May 2021 17:07:04 -0700 (PDT) Original-Received: from [192.168.178.20] (b2b-109-90-125-150.unitymedia.biz. [109.90.125.150]) by smtp.gmail.com with ESMTPSA id l11sm7692766eds.75.2021.05.15.17.07.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 15 May 2021 17:07:03 -0700 (PDT) Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:10069 Archived-At: 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