unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#52239: R7RS define-library does not support cond-expand
@ 2021-12-02  9:15 Amirouche
  2021-12-03 10:58 ` bug#52239: (No Subject) Amirouche
  0 siblings, 1 reply; 4+ messages in thread
From: Amirouche @ 2021-12-02  9:15 UTC (permalink / raw)
  To: 52239

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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-10  4:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-02  9:15 bug#52239: R7RS define-library does not support cond-expand Amirouche
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

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).