Subject: bug#18004: closed (Re: bug#18004: export does not check that its arguments are symbols or pairs of symbols)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 13 Jul 2014 13:39:03 +0000

Your bug report

#18004: export does not check that its arguments are symbols or pairs of symbols

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
18004: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18004
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#18004: export does not check that its arguments are symbols or pairs of symbols
From: Mark H Weaver <[email-masked]>
To: Tobias Brandt <[email-masked]>
Cc: [email-masked]
Date: Sun, 13 Jul 2014 09:37:16 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Tobias Brandt <[email-masked]> 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

Subject: export does not check that its arguments are symbols or pairs of symbols
From: Tobias Brandt <[email-masked]>
To: [email-masked]
Date: Sat, 12 Jul 2014 16:59:01 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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<TAB>
While reading expression:
ERROR: In procedure symbol->string: Wrong type argument in position 1
(expecting symbol): ()