bug#40371: [R7RS] Guile does not accept library name parts that, are non-negative exact integers

Retropikzel via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
I think I ran into this issue in a different place.


Guile does not support the ((library (foo bar) ...) form in cond-expand, 
so one way around it is to have (cond-expand (srfi-N ... ) ((library 
(srfi N)) ...) but in a situation where srfi-N is false Guile tries to 
evaluate the (library ... form and errors with (in the case of N being 180):

In procedure symbol->string: Wrong type argument in position 1 
(expecting symbol): 180


Here is the example code:

(import (scheme base)
         (scheme write))

(cond-expand
   (srfi-180
     (display "I has SRFI 180 :)")
     (newline))
   ((library (srfi 180))
     (display "I has SRFI 180 :)")
     (newline))
   (else
     (display "I do not has SRFI 180 :(")
     (newline)))

It also errors without the number there, saying (switching 180 -> foo):

no code for module (srfi foo)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.