GNU bug report logs -
#52239
R7RS define-library does not support cond-expand
Previous Next
Reported by: Amirouche <amirouche <at> hyper.dev>
Date: Thu, 2 Dec 2021 09:16:01 UTC
Severity: normal
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
This bug report was last modified 1 year and 236 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.