unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Retropikzel via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" <bug-guile@gnu.org>
To: 40371@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <714a3dd0-9603-43ea-8df1-bd2a15b4ab9b@disroot.org> (raw)
In-Reply-To: <CAEYrNrSU-vLLziE_2mVPzkk5cOHii+2SF-1okvHn=TUjBHjwkw@mail.gmail.com>

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)





      parent reply	other threads:[~2024-08-21  7:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01 10:47 bug#40371: [R7RS] Guile does not accept library name parts that are non-negative exact integers Marc Nieper-Wißkirchen
2020-04-02 19:05 ` Andy Wingo
2020-04-02 19:47   ` Marc Nieper-Wißkirchen
2020-04-02 20:26     ` lloda
2020-04-09  8:29   ` Marc Nieper-Wißkirchen
2020-08-03 20:24 ` Marc Nieper-Wißkirchen
2020-08-19 10:16   ` Martin Becze
2020-08-24 11:41     ` Dr. Arne Babenhauserheide
2023-11-23 14:24     ` Maxim Cournoyer
2023-11-24  3:45       ` Maxim Cournoyer
2024-08-21  7:44 ` Retropikzel via Bug reports for GUILE, GNU's Ubiquitous Extension Language [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=714a3dd0-9603-43ea-8df1-bd2a15b4ab9b@disroot.org \
    --to=bug-guile@gnu.org \
    --cc=40371@debbugs.gnu.org \
    --cc=retropikzel_@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).