From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Hood, Christopher L." Newsgroups: gmane.lisp.guile.bugs Subject: bug#32841: assoc-set fails with dot notation association list Date: Tue, 25 Sep 2018 20:33:41 +0000 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_d61a791aaa734245ac705bb5196ff18egtrigatechedu_" X-Trace: blaine.gmane.org 1537907949 7388 195.159.176.226 (25 Sep 2018 20:39:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Sep 2018 20:39:09 +0000 (UTC) To: 32841@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Sep 25 22:39:05 2018 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4u6n-0001kK-PH for guile-bugs@m.gmane.org; Tue, 25 Sep 2018 22:39:01 +0200 Original-Received: from localhost ([::1]:55189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4u8u-0005Hk-9J for guile-bugs@m.gmane.org; Tue, 25 Sep 2018 16:41:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4u8n-0005HS-Lv for bug-guile@gnu.org; Tue, 25 Sep 2018 16:41:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4u8k-0003Ul-GG for bug-guile@gnu.org; Tue, 25 Sep 2018 16:41:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49847) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g4u8k-0003TH-CW for bug-guile@gnu.org; Tue, 25 Sep 2018 16:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g4u8k-0002bL-93 for bug-guile@gnu.org; Tue, 25 Sep 2018 16:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Hood, Christopher L." Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 25 Sep 2018 20:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32841 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: "bug-guile@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.15379080519969 (code B ref -1); Tue, 25 Sep 2018 20:41:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Sep 2018 20:40:51 +0000 Original-Received: from localhost ([127.0.0.1]:54105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4u8Y-0002ah-SB for submit@debbugs.gnu.org; Tue, 25 Sep 2018 16:40:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4u22-0002Ov-7O for submit@debbugs.gnu.org; Tue, 25 Sep 2018 16:34:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4u1v-0004b9-OC for submit@debbugs.gnu.org; Tue, 25 Sep 2018 16:34:01 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:57508) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g4u1v-0004at-Jj for submit@debbugs.gnu.org; Tue, 25 Sep 2018 16:33:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4u1u-0003EB-4a for bug-guile@gnu.org; Tue, 25 Sep 2018 16:33:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4u1q-0004YI-Vm for bug-guile@gnu.org; Tue, 25 Sep 2018 16:33:58 -0400 Original-Received: from relay2.gtri.gatech.edu ([130.207.199.168]:50202) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g4u1q-0004XV-PW for bug-guile@gnu.org; Tue, 25 Sep 2018 16:33:54 -0400 X-ASG-Debug-ID: 1537907621-0768e411429de290001-JmwpyF Original-Received: from jekyll.core.gtri.org (jekyll.core.gtri.org [10.41.1.48]) by relay2.gtri.gatech.edu with ESMTP id oCZQZ6FiazNnrtCW (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=NO) for ; Tue, 25 Sep 2018 16:33:41 -0400 (EDT) X-Barracuda-Envelope-From: Christopher.Hood@gtri.gatech.edu Original-Received: from tybee.core.gtri.org (10.41.1.49) by jekyll.core.gtri.org (10.41.1.48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1531.3; Tue, 25 Sep 2018 16:33:41 -0400 Original-Received: from kiawah.core.gtri.org (10.41.31.71) by tybee.core.gtri.org (10.41.1.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1531.3; Tue, 25 Sep 2018 16:33:41 -0400 Original-Received: from kiawah.core.gtri.org ([fe80::c531:9662:df24:eb8f]) by kiawah.core.gtri.org ([fe80::c531:9662:df24:eb8f%15]) with mapi id 15.01.1531.003; Tue, 25 Sep 2018 16:33:41 -0400 Thread-Topic: assoc-set fails with dot notation association list X-ASG-Orig-Subj: assoc-set fails with dot notation association list Thread-Index: AdRVDdo+LoEZ5wMeSnCiFADPGLln/w== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.41.0.30] X-Barracuda-Connect: jekyll.core.gtri.org[10.41.1.48] X-Barracuda-Start-Time: 1537907621 X-Barracuda-Encrypted: ECDHE-RSA-AES128-SHA256 X-Barracuda-URL: https://130.207.199.168:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at gtri.gatech.edu X-Barracuda-Scan-Msg-Size: 5244 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.58347 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Tue, 25 Sep 2018 16:40:49 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9168 Archived-At: --_000_d61a791aaa734245ac705bb5196ff18egtrigatechedu_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This fails with code pulled straight out of the Guile manual example (secti= on 6.6.20.6). (define capitals '(("New York" . "Albany") ("Oregon" . "Salem") ("Florida" . "Miami"))) Okay, that works define to define alist capitals. Now let's try another par= t of the example: (set! capitals (assoc-set! capitals "Florida" "Tallahassee")) This yields the error: ERROR: In procedure assoc-set!: In procedure set-cdr!: Wrong type argument in position 1 (expecting mutable= pair): ("Florida" . "Miami") I've experienced this behavior with builds of both Guile 2.2.2 and Guile 2.= 2.4. I'll note that if you define the alist so its initial contents are defined = using a quasiquote and the cons form instead of dot notation, this error is= not reached. I'm not sure if the error is valid or not, but in any case, t= he code that produces is listed as an valid example in the manual, so that = doesn't seem right. chris --_000_d61a791aaa734245ac705bb5196ff18egtrigatechedu_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

This fails with code pulled straight out of the Guil= e manual example (section 6.6.20.6).

 

(define capitals '(("New York" . "Albany&qu= ot;)

         &nbs= p;         ("Oregon" = ;  . "Salem")

         &nbs= p;         ("Florida"&nbs= p; . "Miami")))

 

Okay, that works define to define alist capitals. No= w let’s try another part of the example:

 

(set! capitals
      (assoc-set! capitals "Florida"=
; "Tallahassee"))

 

This yields the error:

 

ERROR: In procedure assoc-set!:

In procedure set-cdr!: Wrong type argument in positi= on 1 (expecting mutable pair): ("Florida" . "Miami")

 

I’ve experienced this behavior with builds of = both Guile 2.2.2 and Guile 2.2.4.

 

I’ll note that if you define the alist so its = initial contents are defined using a quasiquote and the cons form instead o= f dot notation, this error is not reached. I’m not sure if the error = is valid or not, but in any case, the code that produces is listed as an valid example in the manual, so that doesn’= t seem right.

 

chris

--_000_d61a791aaa734245ac705bb5196ff18egtrigatechedu_--