unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Amirouche <amirouche@hyper.dev>
To: 52239@debbugs.gnu.org
Subject: bug#52239: R7RS define-library does not support cond-expand
Date: Thu, 02 Dec 2021 09:15:04 +0000	[thread overview]
Message-ID: <qoQwN21SACNlstxN17CWY0JaMp6V9WnC055wskL9gz7CY-9q2H1pqqhjEIx7Q7ENhVhAoKc6VLKQULZoJWESN201frP3nG263nOFualSyw8=@hyper.dev> (raw)

workaround:

#;> find live -type f -exec sh -c "echo \";;; cat {}\"; cat {}" \;
;;; cat live/hello/body.scm
(define (hello name)
  (display "Hello schemer ")
  (display name)
  (display "!")
  (newline))
;;; cat live/hello.scm
(define-library (live hello)
  (import (scheme base)
          (scheme write))
  (export hello)

  (include "hello/body.scm"))
;;; cat live/hello.sld
(define-library (live hello)
  (import (scheme base)
          (scheme write))
  (export hello)
  (cond-expand
   ((or mit guile chibi gambit gerbil loko)
    (include "hello/body.scm"))
   ;; That is the rule picked up by chicken
   (else (include "live/hello/body.scm"))))
;;; cat live/hello.rkt
#!r7rs
(define-library (live hello)
  (export hello)

  (import (scheme base)
          (scheme write))

  (include "hello/body.scm"))
;;; cat live/hello.chez.sls
(library (live hello)
  (export hello)
  (import (chezscheme))

  (include "hello/body.scm"))
#;>

The following command

  guile myprogram.scm

will pick `live/hello.scm` as the library `(live hello)`

Unlike:

  guile --r7rs myprogram.scm

that will pick `live/hello.sld` that contains a cond-expand, and that is not supported  by guile.





             reply	other threads:[~2021-12-02  9:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02  9:15 Amirouche [this message]
2021-12-03 10:58 ` bug#52239: (No Subject) Amirouche
2021-12-03 11:11   ` Amirouche
2023-11-10  4:29     ` bug#52239: R7RS define-library does not support cond-expand Maxim Cournoyer

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='qoQwN21SACNlstxN17CWY0JaMp6V9WnC055wskL9gz7CY-9q2H1pqqhjEIx7Q7ENhVhAoKc6VLKQULZoJWESN201frP3nG263nOFualSyw8=@hyper.dev' \
    --to=amirouche@hyper.dev \
    --cc=52239@debbugs.gnu.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).