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

Previous Next

Package: guile;

Reported by: Marc Nieper-Wißkirchen <marc.nieper <at> gmail.com>

Date: Wed, 1 Apr 2020 10:50:03 UTC

Severity: normal

Full log


Message #38 received at 40371 <at> debbugs.gnu.org (full text, mbox):

From: Retropikzel <retropikzel_ <at> disroot.org>
To: 40371 <at> debbugs.gnu.org
Subject: Re: bug#40371: [R7RS] Guile does not accept library name parts that, 
 are non-negative exact integers
Date: Wed, 21 Aug 2024 10:44:05 +0300
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)




This bug report was last modified 296 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.