From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: John Cowan Newsgroups: gmane.lisp.guile.bugs Subject: bug#40294: Documentation for arity procedures doesn't match behavior Date: Sat, 28 Mar 2020 17:42:25 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a3450a05a1f118f9" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="86390"; mail-complaints-to="usenet@ciao.gmane.io" To: 40294@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Mar 30 04:37:10 2020 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 1jIkIY-000MO6-2b for guile-bugs@m.gmane-mx.org; Mon, 30 Mar 2020 04:37:10 +0200 Original-Received: from localhost ([::1]:43726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIkIX-000583-2L for guile-bugs@m.gmane-mx.org; Sun, 29 Mar 2020 22:37:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54505) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIkHZ-0002wR-3V for bug-guile@gnu.org; Sun, 29 Mar 2020 22:36:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIkHX-0003C0-Rx for bug-guile@gnu.org; Sun, 29 Mar 2020 22:36:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48585) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jIkHX-0003BX-Jf for bug-guile@gnu.org; Sun, 29 Mar 2020 22:36:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jIkHX-0004bD-HV for bug-guile@gnu.org; Sun, 29 Mar 2020 22:36:07 -0400 X-Loop: help-debbugs@gnu.org Resent-From: John Cowan Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 30 Mar 2020 02:36:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40294 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158553573317355 (code B ref -1); Mon, 30 Mar 2020 02:36:07 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Mar 2020 02:35:33 +0000 Original-Received: from lists.gnu.org ([209.51.188.17]:51453) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jIJDz-0000Nw-Vd for submit@debbugs.gnu.org; Sat, 28 Mar 2020 17:42:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33243) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIJDy-0002LG-LI for bug-guile@gnu.org; Sat, 28 Mar 2020 17:42:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIJDx-0001pH-FD for bug-guile@gnu.org; Sat, 28 Mar 2020 17:42:38 -0400 Original-Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]:34038) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jIJDx-0001o6-2B for bug-guile@gnu.org; Sat, 28 Mar 2020 17:42:37 -0400 Original-Received: by mail-qt1-x830.google.com with SMTP id 10so11899807qtp.1 for ; Sat, 28 Mar 2020 14:42:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccil-org.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=tc2WgLkWhiOd2Da6oGGNq266lYDZJO4Qvh1o9bgNUOs=; b=2SzH77+75ZxBWvn+Dsf2wnYY9el7X+xAPcjKzxUe2HJupEommT6YtJ9HPzoqcgfPhY BBFFl4Exlvzr8dXBPIf4zQXz4qONI2mrtCGSEseNmNGAYoEiVRZzhXF08DfI036Tynh3 jNjFXW6qTCjj7W8aZZxc73nPJWFrRzA0Zsi/fr3NNuNK7bBFFLAnc27nyLX4Evl9tM5s 8BuF/EQLgqVmDrIQXdIMqTd27+WNaDGAa6Rz5m41eo/kDvi2KcHC2tXGWNoCkFv2EalM M+D9mrXez1EOR+aL/6fvcACyGnyKBouN59TumczlM7sTlL5VCpHh2A4KYnkw3XE1tO3J cbhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=tc2WgLkWhiOd2Da6oGGNq266lYDZJO4Qvh1o9bgNUOs=; b=n9WXfMg/BkOpmebipCB8LJlQItKx8kkOcS4YN9t7x+JW0sTRyveDc4UM97KlmL9VLk Z8D/QxZoR/nrAU9Ky5Rw4sr4bxMRk8Fa6gA7uGF7hoHLPB+T/XYEJwRit1STVmN8hmTo iEu3IiSqAgwVdkXh9H4928EdI3I+qVfWSDUeBNau5583hCBB9pVvRfxtY84XdWtGWnI8 oCfogqhMqs0gbX3urP05fbTAu8/exWv2nRScyJl/sbSdLPCIFJcOlTnJptxEWXPQy1PR GlOjdkbi13QbDUoOdSivasPkq8k3+R7Mh6QcZVizTLGTg+Ci++rw+bzyOPfFLe0aNFIo pcyQ== X-Gm-Message-State: ANhLgQ0jhzcszp1J2X/ZAEPMAwV62phT5HerlXlG2/DvuO4xd2b/YUt6 GgnBktXm6P0x8FANOdloeXngtEisiQMCfHx1S10RhmSqSqVQMQ== X-Google-Smtp-Source: ADFU+vvF6EoVSClKFZQ/kapPnE0C4B0BIXtgY0sn4FtoaP7+ggbgYIA4aRmyn5y6fY9Ldr/SBxZ29+qvwg5awfXiPXQ= X-Received: by 2002:aed:3c10:: with SMTP id t16mr5508440qte.45.1585431756091; Sat, 28 Mar 2020 14:42:36 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-List-Received-Date: Sat, 28 Mar 2020 21:42:40 -0000 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:9705 Archived-At: --000000000000a3450a05a1f118f9 Content-Type: text/plain; charset="UTF-8" Interaction showing the problem $ guile GNU Guile 2.2.6 Copyright (C) 1995-2019 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (use-modules (system vm program)) scheme@(guile-user)> program-arities ERROR: Unbound variable: program-arities. ; should be defined Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user)> (arity:nreq +) ; 0 arguments required, correct $1 = 0 scheme@(guile-user)> (arity:rest? +) ; rest argument, correct $2 = #f scheme@(guile-user)> (arity:nreq car) ; 1 argument required, bad $3 = 0 scheme@(guile-user)> (program-arguments-alist car) ; correct $4 = ((required _) (optional) (keyword) (allow-other-keys? . #f) (rest . #f)) scheme@(guile-user)> The same thing happens in Guile 3, and on both Mac and Linux. --000000000000a3450a05a1f118f9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Interaction showing the problem=


$ guile

GNU Guile 2.2.6

Copyright (C) 1995-2019 Free So= ftware Foundation, Inc.


Guile comes with ABSOLUTELY NO = WARRANTY; for details type `,show w'.

This program is free software, = and you are welcome to redistribute it

under certain conditions; type = `,show c' for details.


Enter `,help' for help.

scheme@(guile-user)> (use-mo= dules (system vm program))

scheme@(guile-user)> program= -arities

ERROR: Unbound variable: progra= m-arities. ; should be defined


Entering a new prompt.=C2=A0 Type `,bt' for a backt= race or `,q' to continue.

scheme@(guile-user)> (arity:nreq +) ; 0 argumen= ts required, correct

$1 =3D 0

scheme@(guile-user)> (arity:= rest? +) ; rest argument, correct

$2 =3D #f

scheme@(guile-user)> (arity:= nreq car) ; 1 argument required, bad

$3 =3D 0

scheme@(guile-user)> (progra= m-arguments-alist car) ; correct

$4 =3D ((required _) (optional)= (keyword) (allow-other-keys? . #f) (rest . #f))

scheme@(guile-user)><= /p>


The same thing happens in Guile 3, and on b= oth Mac and Linux.

--000000000000a3450a05a1f118f9--