unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Mihail Iosilevich <yosik@paranoid.email>
Cc: 55934-done@debbugs.gnu.org
Subject: bug#55934: [PATCH] (library ...) form in cond-expand inside R7RS define-library
Date: Thu, 16 Jun 2022 09:37:37 +0200	[thread overview]
Message-ID: <87czf9oy7y.fsf@gnu.org> (raw)
In-Reply-To: <87wndmi3zn.fsf@cerbo.mail-host-address-is-not-set> (Mihail Iosilevich's message of "Sun, 12 Jun 2022 13:13:32 +0300")

Hi,

Mihail Iosilevich <yosik@paranoid.email> skribis:

> Guile (3.0.8) reports a compilation error when cond-expand tries to
> check existence of a missing library:
>
>     scheme@(guile-user)> (define-library (test)
>                            (cond-expand
>                             ((library (scheme sort))
>                              (import (scheme sort)))))
>     While compiling expression:
>     no code for module (scheme sort)
>
> It looks like bug #40252 was not fully eliminated.
>
> Also, (library ...) cannot handle module names like (srfi 1), though
> (import (srfi 1)) works fine. For example, this code fails:
>
>     scheme@(guile-user)> (define-library (test)
>                            (cond-expand
>                             ((library (srfi 1))
>                              (import (srfi 1)))))
>     While compiling expression:
>     In procedure symbol->string: Wrong type argument in position 1
>     (expecting symbol): 1
>
> There are probably other cases when (library ...) and (import ...) does
> not work identically: (library ...) uses resolve-interface while
> (import ...) uses resolve-r6rs-interface.
>
> This patch fixes both issues.

That looks reasonable to me.

I added a ChangeLog-style entry and committed it, thanks!

Ludo’.





      reply	other threads:[~2022-06-16  7:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-12 10:13 bug#55934: [PATCH] (library ...) form in cond-expand inside R7RS define-library Mihail Iosilevich
2022-06-16  7:37 ` Ludovic Courtès [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=87czf9oy7y.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=55934-done@debbugs.gnu.org \
    --cc=yosik@paranoid.email \
    /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).