GNU bug report logs - #41353
'thunk?' documentation is misleading

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guile; Reported by: Jan Synacek <jsynacek@HIDDEN>; dated Sun, 17 May 2020 10:42:01 UTC; Maintainer for guile is bug-guile@HIDDEN.
Changed bug title to ''thunk?' documentation is misleading' from '(const x) is a thunk' Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 41353 <at> debbugs.gnu.org:


Received: (at 41353) by debbugs.gnu.org; 17 May 2020 15:31:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 11:31:34 2020
Received: from localhost ([127.0.0.1]:44327 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaLGI-0004uF-3v
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 11:31:34 -0400
Received: from mta-13-3.privateemail.com ([198.54.118.204]:15161)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <lloda@HIDDEN>) id 1jaLGF-0004tx-Qs
 for 41353 <at> debbugs.gnu.org; Sun, 17 May 2020 11:31:32 -0400
Received: from mta-13.privateemail.com (localhost [127.0.0.1])
 by mta-13.privateemail.com (Postfix) with ESMTP id 4D3A980065;
 Sun, 17 May 2020 11:31:25 -0400 (EDT)
Received: from [192.168.1.105] (unknown [10.20.151.207])
 by mta-13.privateemail.com (Postfix) with ESMTPA id BD6F480064;
 Sun, 17 May 2020 15:31:24 +0000 (UTC)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\))
Subject: Re: bug#41353: (thunk? (const 1))
From: lloda <lloda@HIDDEN>
In-Reply-To: <CAPsXM8X0ub1uxS_fuToQtqkgH3_BMi__1v3=hX=Te1m_5R0Myw@HIDDEN>
Date: Sun, 17 May 2020 17:31:22 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <5120B47D-F142-429E-B4D1-6C24B295AFFE@HIDDEN>
References: <m6fblmm7sji.fsf@HIDDEN>
 <87wo5ay7pp.fsf@HIDDEN>
 <CAPsXM8X0ub1uxS_fuToQtqkgH3_BMi__1v3=hX=Te1m_5R0Myw@HIDDEN>
To: Jan Synacek <jsynacek@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.14)
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 41353
Cc: 41353 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On 17 May 2020, at 16:46, Jan Synacek <jsynacek@HIDDEN> wrote:
>=20
> On Sun, May 17, 2020 at 4:09 PM David Kastrup <dak@HIDDEN> wrote:
>> I think this is more a matter of the documentation being not quite =
right:
>>=20
>> -- Scheme Procedure: thunk? obj
>> -- C Function: scm_thunk_p (obj)
>>     Return =E2=80=98#t=E2=80=99 if OBJ is a thunk=E2=80=94a procedure =
that does not accept
>>     arguments.
>>=20
>> "if OBJ can serve as a thunk=E2=80=94a procedure called without =
arguments."
>>=20
>> Note that (thunk? (lambda x x)) also returns #t and that ((const 1))
>> returns 1.
>=20
> But both (lambda x ...) and (const whatever) are still a procedure =
that accepts
> an argument, aren't they? My understanding of thunk is (lambda () =
...),
> because that's a procedure that takes zero arguments.

(lambda x ...) takes any number of arguments, including none.





Information forwarded to bug-guile@HIDDEN:
bug#41353; Package guile. Full text available.

Message received at 41353 <at> debbugs.gnu.org:


Received: (at 41353) by debbugs.gnu.org; 17 May 2020 14:46:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 10:46:59 2020
Received: from localhost ([127.0.0.1]:44253 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaKZ8-0003la-OG
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 10:46:58 -0400
Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:35821
 helo=us-smtp-1.mimecast.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jsynacek@HIDDEN>) id 1jaKZ6-0003lR-NQ
 for 41353 <at> debbugs.gnu.org; Sun, 17 May 2020 10:46:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1589726816;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=OKBG8F+y2f/Tr59M0xs9sVVB9mN2UqkL7wFzFgrGICA=;
 b=BgOQntxHspdtG1j/rhs0eFoN20/fZsjTYsVSfKlNO3rRGn46FIU/9AADTYV8fnYyhTaMu4
 f66G6jLC8m+ddQ8sYgNrXf0QvB8MIONP27D0X8p6XUr4j6MGRWuLBWgd3j4lEb75uMW/Dy
 AZP6brIaJPLRDmOJA0N4Vj2EPuDtb6w=
Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com
 [209.85.167.71]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-381-pg0U7PzfN-eOMe5iT3bjuA-1; Sun, 17 May 2020 10:46:54 -0400
X-MC-Unique: pg0U7PzfN-eOMe5iT3bjuA-1
Received: by mail-lf1-f71.google.com with SMTP id u28so2784431lfm.1
 for <41353 <at> debbugs.gnu.org>; Sun, 17 May 2020 07:46:53 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:content-transfer-encoding;
 bh=OKBG8F+y2f/Tr59M0xs9sVVB9mN2UqkL7wFzFgrGICA=;
 b=oLgfOhFTzLv+hcvGTOUzcxtrYosiV6ZR/9IX/M2oj4Boq2sXLEyNtF1wAzY5O+kLQx
 IkxJrTE3zPY6lzktEQFxGbW0dI0Uf13Cqjs1YkxvJml/iwFVlxgMfLTwZM05FkTH/G2s
 5Io7TUnigQ8SGeBP4jlpLitWiclFjNbjkEePIcuyiYq6/OHA9aLPIICxeZz+lhh3GzcR
 CIsrLO8F0RC98lf2vOjtcXqkaGr20B6o3iy/tlaxRRH/6xuvYoHpbKZOAW6Qv9YTs2TG
 /D5aInejpXU5vXmfCJBoMzmdEzLMWhsNZRYBs/OgzRWL1KLIHWjwnLDTgGE/vtslpOPw
 l9/A==
X-Gm-Message-State: AOAM531DFuV2V8Cbpem6XchOJ+sR9ycFKMQ8oyWWsOogwPDThYs/ZNC4
 EicqodQM9jkxiunYeoBiZOG0aaomp+TV6sziNXUi6ry4yswDsNtB4EetbZbtht7dddVlvqVO6zt
 cFOh1vgh3ch0ePqbJh6gLt5ymQMYP3H4=
X-Received: by 2002:a2e:9a41:: with SMTP id k1mr5231354ljj.143.1589726812405; 
 Sun, 17 May 2020 07:46:52 -0700 (PDT)
X-Google-Smtp-Source: ABdhPJx2N0ztQ7JBFZKe60OfTfk1qh5HJDqNpr8vfwdHECo66BFiDBxPOUtoxM/o42rQ/E5Bj9g3vhX8MHhybC+pFKY=
X-Received: by 2002:a2e:9a41:: with SMTP id k1mr5231341ljj.143.1589726812103; 
 Sun, 17 May 2020 07:46:52 -0700 (PDT)
MIME-Version: 1.0
References: <m6fblmm7sji.fsf@HIDDEN>
 <87wo5ay7pp.fsf@HIDDEN>
In-Reply-To: <87wo5ay7pp.fsf@HIDDEN>
From: Jan Synacek <jsynacek@HIDDEN>
Date: Sun, 17 May 2020 16:46:40 +0200
Message-ID: <CAPsXM8X0ub1uxS_fuToQtqkgH3_BMi__1v3=hX=Te1m_5R0Myw@HIDDEN>
Subject: Re: bug#41353: (thunk? (const 1))
To: 41353 <at> debbugs.gnu.org
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41353
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sun, May 17, 2020 at 4:09 PM David Kastrup <dak@HIDDEN> wrote:
> I think this is more a matter of the documentation being not quite right:
>
>  -- Scheme Procedure: thunk? obj
>  -- C Function: scm_thunk_p (obj)
>      Return =E2=80=98#t=E2=80=99 if OBJ is a thunk=E2=80=94a procedure th=
at does not accept
>      arguments.
>
> "if OBJ can serve as a thunk=E2=80=94a procedure called without arguments=
."
>
> Note that (thunk? (lambda x x)) also returns #t and that ((const 1))
> returns 1.

But both (lambda x ...) and (const whatever) are still a procedure that acc=
epts
an argument, aren't they? My understanding of thunk is (lambda () ...),
because that's a procedure that takes zero arguments.





Information forwarded to bug-guile@HIDDEN:
bug#41353; Package guile. Full text available.

Message received at 41353 <at> debbugs.gnu.org:


Received: (at 41353) by debbugs.gnu.org; 17 May 2020 14:08:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 10:08:59 2020
Received: from localhost ([127.0.0.1]:44219 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaJyN-0002qN-7y
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 10:08:59 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33924)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dak@HIDDEN>) id 1jaJyM-0002qC-8S
 for 41353 <at> debbugs.gnu.org; Sun, 17 May 2020 10:08:58 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59689)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <dak@HIDDEN>) id 1jaJyH-0005te-1F
 for 41353 <at> debbugs.gnu.org; Sun, 17 May 2020 10:08:53 -0400
Received: from x5d849d3d.dyn.telefonica.de ([93.132.157.61]:35922 helo=lola)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <dak@HIDDEN>) id 1jaJyG-0006Y1-KH
 for 41353 <at> debbugs.gnu.org; Sun, 17 May 2020 10:08:52 -0400
From: David Kastrup <dak@HIDDEN>
To: 41353 <at> debbugs.gnu.org
Subject: (thunk? (const 1))
Date: Sun, 17 May 2020 16:08:50 +0200
Message-ID: <87wo5ay7pp.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41353
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


I think this is more a matter of the documentation being not quite right:

 -- Scheme Procedure: thunk? obj
 -- C Function: scm_thunk_p (obj)
     Return =E2=80=98#t=E2=80=99 if OBJ is a thunk=E2=80=94a procedure that=
 does not accept
     arguments.

"if OBJ can serve as a thunk=E2=80=94a procedure called without arguments."

Note that (thunk? (lambda x x)) also returns #t and that ((const 1))
returns 1.

--=20
David Kastrup




Information forwarded to bug-guile@HIDDEN:
bug#41353; Package guile. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 May 2020 10:41:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 06:41:15 2020
Received: from localhost ([127.0.0.1]:42369 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaGjK-0001Pa-Lg
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 06:41:15 -0400
Received: from lists.gnu.org ([209.51.188.17]:55410)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jsynacek@HIDDEN>) id 1jaGjI-0001PR-T4
 for submit <at> debbugs.gnu.org; Sun, 17 May 2020 06:41:13 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:43116)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jsynacek@HIDDEN>)
 id 1jaGjI-0006ls-Lp
 for bug-guile@HIDDEN; Sun, 17 May 2020 06:41:12 -0400
Received: from us-smtp-1.mimecast.com ([205.139.110.61]:49613
 helo=us-smtp-delivery-1.mimecast.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256)
 (Exim 4.90_1) (envelope-from <jsynacek@HIDDEN>)
 id 1jaGjH-0004hO-SU
 for bug-guile@HIDDEN; Sun, 17 May 2020 06:41:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1589712070;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=s+2tTMGJm913bORGEHq9A6fLSRcNc2NY1dRuVS+gNts=;
 b=FvohgziLsm/1zrpGVtCe8n5Drbs2dOElsdHb4KcRCR4RSgscM2xFipm1r9++/hgxf3/kSC
 aby9r62kPr8ctP50curBne/pgzrdxuVkZbJf9OPSQ6jxyMx6HIUpOlBAtAFNHkvNu15gH+
 HQUqusRBHpYV3+VRiwxphh41t1nVAJM=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-308-Ssm5CTayPIev7hDaQ0tmGw-1; Sun, 17 May 2020 06:41:08 -0400
X-MC-Unique: Ssm5CTayPIev7hDaQ0tmGw-1
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com
 [10.5.11.15])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DDCE2800D24
 for <bug-guile@HIDDEN>; Sun, 17 May 2020 10:41:07 +0000 (UTC)
Received: from jsynacek-ntb.brq.redhat.com (unknown [10.40.192.77])
 by smtp.corp.redhat.com (Postfix) with ESMTPS id 3DD621943D
 for <bug-guile@HIDDEN>; Sun, 17 May 2020 10:41:06 +0000 (UTC)
From: Jan Synacek <jsynacek@HIDDEN>
To: bug-guile@HIDDEN
Subject: (const x) is a thunk
Date: Sun, 17 May 2020 12:41:05 +0200
Message-ID: <m6fblmm7sji.fsf@HIDDEN>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain
Received-SPF: pass client-ip=205.139.110.61; envelope-from=jsynacek@HIDDEN;
 helo=us-smtp-delivery-1.mimecast.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 06:41:10
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic]
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001,
 DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001,
 SPF_PASS=-0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)


With guile-3.0.2:

scheme@(guile-user)> (thunk? (const 1))
$1 = #t

Since thunk is a procedure that does not accept arguments (section
6.9.7, documentation for 'thunk?'), the result of the above evaluation
should be #f.





Acknowledgement sent to Jan Synacek <jsynacek@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#41353; Package guile. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 27 May 2020 20:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.