GNU bug report logs - #40252
[R7RS] cond-expand in define-library forms

Previous Next

Package: guile;

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

Date: Fri, 27 Mar 2020 15:38:02 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Andy Wingo <wingo <at> pobox.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#40252: closed ([R7RS] cond-expand in define-library forms)
Date: Sat, 01 May 2021 20:26:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 01 May 2021 22:25:39 +0200
with message-id <87y2cyjj5o.fsf <at> pobox.com>
and subject line Applied
has caused the debbugs.gnu.org bug report #40252,
regarding [R7RS] cond-expand in define-library forms
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
40252: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40252
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Marc Nieper-Wißkirchen <marc.nieper+gnu <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: [R7RS] cond-expand in define-library forms
Date: Fri, 27 Mar 2020 15:17:45 +0100
[Message part 3 (text/plain, inline)]
The following valid R7RS library definition is not handled correctly by
Guile:

(define-library (guile-test)
  (export fold)
  (cond-expand
    ((library (scheme list))
     (import (scheme list)))
    ((library (srfi srfi-1))
     (import (srfi srfi-1)))))

This is what I get:

$ guile --r7rs -L .
GNU Guile 3.0.1
...
> (import (guile-test))
While compiling expression:
no code for module (scheme list)
>

Thus, the cond-expand library declaration does not seem to be handled
correctly. Other experiments with cond-expand also show strange behaviors:

(define-library (guile-test)
  (export foo)
  (cond-expand
    (guile
     (import (scheme base))))
  (begin
    (define foo 42)))

> (import (guile-test))
While compiling expression:
Syntax error:
unknown location: source expression failed to match any pattern in form
(((begin (define foo 42))))

--

Marc
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: Andy Wingo <wingo <at> pobox.com>
To: 40252-done <at> debbugs.gnu.org
Subject: Applied
Date: Sat, 01 May 2021 22:25:39 +0200
Thanks for the report and fix, and apologies for the delay!

Andy


This bug report was last modified 4 years and 106 days ago.

Previous Next


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