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

From: Tobias Brandt <[email-masked]>
Date: Sat, 12 Jul 2014 16:59:01 +0200

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): ()