From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#66615: 30.0.50; Inconsistent 'number-or-marker' type definition in the cl- machinery Date: Fri, 20 Oct 2023 05:05:47 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36916"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 66615@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 20 11:06:54 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qtlT3-0009M4-Ht for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Oct 2023 11:06:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtlSm-0001NP-HF; Fri, 20 Oct 2023 05:06:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtlSl-0001ND-Fl for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2023 05:06:35 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtlSl-00054y-7Z for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2023 05:06:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qtlTC-00080b-9D for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2023 05:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Oct 2023 09:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66615 X-GNU-PR-Package: emacs Original-Received: via spool by 66615-submit@debbugs.gnu.org id=B66615.169779278830736 (code B ref 66615); Fri, 20 Oct 2023 09:07:02 +0000 Original-Received: (at 66615) by debbugs.gnu.org; 20 Oct 2023 09:06:28 +0000 Original-Received: from localhost ([127.0.0.1]:38629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtlSe-0007ze-B1 for submit@debbugs.gnu.org; Fri, 20 Oct 2023 05:06:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtlSZ-0007zO-GG for 66615@debbugs.gnu.org; Fri, 20 Oct 2023 05:06:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtlS1-00051G-JC; Fri, 20 Oct 2023 05:05:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=l/uu301k8zj1MzkRlghzLKaZnfmHXK+9iTkzQyMOPpI=; b=nOIIF7rWWiBatQpl78E/ UtBT8PRUSbxez/t34cNEZXmLQrii1DCpoxi7WC4M1K7Yn/WyJkkc1satxH4bviv9ydBRJhA1sU6JT GGaB2KOx4SCwI3rkJBsqt0IYKR8a9cIH35qvJOXfRdfia7xsNZ3UsA/Fo4ILb5VzcLXubHmrrNcFk SXX9BUJGDmQnMsGsw1nIpfD/PcS8Pbd+YeAnJZ1tO7PDudcvgLZ9IUpCf5eHK8NZTLsy0dBl20myY H3M0/Jt98p8iu00gfnA5nTxoojf8P++y129ukMZm/QqY3xHZZYGk0FenQ97s1CZsNMSyAB9noHJVg 647ZC2YpbG8C4Q==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1qtlRz-00080S-Au; Fri, 20 Oct 2023 05:05:49 -0400 In-Reply-To: (Stefan Monnier's message of "Thu, 19 Oct 2023 18:34:39 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272782 Archived-At: Stefan Monnier writes: >> I've to question now the following entry introduced in >> `cl--typeof-types' for correctness: >> >> (integer number integer-or-marker number-or-marker atom) >> >> The doc says : >> Each element has the form (TYPE . SUPERTYPES) where TYPE is one of >> the symbols returned by =E2=80=98type-of=E2=80=99, and SUPERTYPES is the= list of its >> supertypes from the most specific to least specific. >> >> And indeed not every 'number' is an 'integer-or-marker'. > > The subtype relation doesn't derive from a tree but a DAG so the > SUPERTYPES represents *a* linearization of the parents but just because > `number` appears before `integer-or-marker` doesn't mean that it's > a subtype of it. It just means I judged that it should be considered > "more specific". > > The same effect is in play for: > > (null symbol list sequence atom) > > where clearly `symbol` is a subtype of neither `list` nor `sequence`. Hi Stefan, I understand now thanks, the trouble is that the hierarchy is not a tree but a DAG and these are just single linearizations. I think we should improve this part of the docstring as doesn't sound complete to me. Also shouldn't we add (null boolean symbol atom) to cover this other path as well? >> I suspect that's the reason why this commit introduces few failures in >> the native-comp testsuite. > > If you need to know the list of supertypes of `number`, we could add > that info explicitly, or you could "guess" it as the intersection of all > the types that appear after `number` in `cl--typeof-types`: > > (integer number integer-or-marker number-or-marker atom) > [...] > (float number number-or-marker atom) > [...] > > i.e. the intersection of (integer-or-marker number-or-marker atom) > and (number-or-marker atom). I think I understand how to do it, OTOH might be better to have the hierarchy made explicit somewhere? Still have to think to make an opinion on this. Thanks Andrea