From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 12 13:20:37 2014 Received: (at submit) by debbugs.gnu.org; 12 Jul 2014 17:20:37 +0000 Received: from localhost ([127.0.0.1]:40785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X60yQ-0003mW-Ee for submit@debbugs.gnu.org; Sat, 12 Jul 2014 13:20:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36842) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5ylb-0000G2-2j for submit@debbugs.gnu.org; Sat, 12 Jul 2014 10:59:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5ylU-0002Pj-Pf for submit@debbugs.gnu.org; Sat, 12 Jul 2014 10:59:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5ylU-0002Pf-N5 for submit@debbugs.gnu.org; Sat, 12 Jul 2014 10:59:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5ylT-0006HI-OT for bug-guile@gnu.org; Sat, 12 Jul 2014 10:59:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5ylS-0002OJ-L9 for bug-guile@gnu.org; Sat, 12 Jul 2014 10:59:03 -0400 Received: from mail-qa0-x22f.google.com ([2607:f8b0:400d:c00::22f]:40324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5ylS-0002Nn-Gl for bug-guile@gnu.org; Sat, 12 Jul 2014 10:59:02 -0400 Received: by mail-qa0-f47.google.com with SMTP id i13so1851074qae.6 for ; Sat, 12 Jul 2014 07:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ftP0sK5X2fn3OVV7ppndwX6MvLGtzr/S3YKkoq2QWks=; b=Wb3cXiLXk2uuR7ucbhV/j3rV0sCpX0FM2jNFSxOqeg1SU4aTsDfajPbrxmkzHfSgjO CpecaFPyeQrTB0Fe38yXWQ/LoGMqHxLOBqmI38Srqx16uFmy5pZIH1j6oaGXiKdZ0NAg Be0Nh4aVT9eo7xTak9L4jsl6pVxll0AoWc079m1eyZDdaNgB+NVRJXmOrKwE3n4LXN9M aXZcijN/mttT8rtt/HJRGYiQu+NYQ6zaW2+sxLi1lpVuOPmd4H2RnVslEwUS5B1Rm09+ lasSfAYxY0vkm7c2IPUFdne+4tgVEoZULUu9iZOlZG+ceTltNIbgQASMN3Y/jiRpzvMD Mfgw== MIME-Version: 1.0 X-Received: by 10.140.26.69 with SMTP id 63mr8510319qgu.1.1405177141720; Sat, 12 Jul 2014 07:59:01 -0700 (PDT) Received: by 10.96.16.102 with HTTP; Sat, 12 Jul 2014 07:59:01 -0700 (PDT) Date: Sat, 12 Jul 2014 16:59:01 +0200 Message-ID: Subject: export does not check that its arguments are symbols or pairs of symbols From: Tobias Brandt To: bug-guile@gnu.org Content-Type: multipart/alternative; boundary=001a11c12dee60fc0b04fe004cb5 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 12 Jul 2014 13:20:32 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a11c12dee60fc0b04fe004cb5 Content-Type: text/plain; charset=UTF-8 Guile happily compiles the following module: (define-module (test)) (define (foo) #t) (export (foo)) This exports foo as (), because (foo) = (foo . ()) and export treats pairs as renaming. If you use this module, readline breaks because it looks up the module's exported symbols and then tries to call (symbol->string '()): scheme@(guile-user)> (use-modules (test)) scheme@(guile-user)> x While reading expression: ERROR: In procedure symbol->string: Wrong type argument in position 1 (expecting symbol): () --001a11c12dee60fc0b04fe004cb5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Guile happily compiles the following module:

(define-module (test))
(define (foo) #t)
(ex= port (foo))

This exports foo as (), because = (foo) =3D (foo . ()) and export treats pairs as renaming.

If you use this module, readline breaks because it look= s up the module's exported symbols and then tries to call (symbol->s= tring '()):

scheme@(guile-user)> (use-= modules (test))
scheme@(guile-user)> x<TAB>
While reading expressio= n:
ERROR: In procedure symbol->string: Wrong type argument in = position 1 (expecting symbol): ()

--001a11c12dee60fc0b04fe004cb5-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 13 09:38:42 2014 Received: (at 18004-done) by debbugs.gnu.org; 13 Jul 2014 13:38:42 +0000 Received: from localhost ([127.0.0.1]:53573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X6JzF-0002UQ-R3 for submit@debbugs.gnu.org; Sun, 13 Jul 2014 09:38:42 -0400 Received: from world.peace.net ([96.39.62.75]:46626 ident=hope4) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X6JzB-0002UD-QE for 18004-done@debbugs.gnu.org; Sun, 13 Jul 2014 09:38:38 -0400 Received: from c-98-217-64-74.hsd1.ma.comcast.net ([98.217.64.74] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1X6Jz5-0007P2-E9; Sun, 13 Jul 2014 09:38:31 -0400 From: Mark H Weaver To: Tobias Brandt Subject: Re: bug#18004: export does not check that its arguments are symbols or pairs of symbols References: Date: Sun, 13 Jul 2014 09:37:16 -0400 In-Reply-To: (Tobias Brandt's message of "Sat, 12 Jul 2014 16:59:01 +0200") Message-ID: <87vbr1nzw3.fsf@yeeloong.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18004-done Cc: 18004-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Hi, Tobias Brandt writes: > Guile happily compiles the following module: > > (define-module (test)) > (define (foo) #t) > (export (foo)) > > This exports foo as (), because (foo) = (foo . ()) and export treats > pairs as renaming. This is already fixed in the latest release (2.0.11), commit df3acd296e7149630fd6030aced6331ae6dd424b. I'm closing this bug, but feel free to reopen if there's still a problem. Thanks! Mark From unknown Sun Jun 22 08:08:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 11 Aug 2014 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator