1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Fix R7RS include-library-declarations and cond-expand in define-library

* module/ice-9/r7rs-libraries.scm (define-library): Fix bug handling
include-library-declarations and cond-expand subforms.  Thanks to Adam
Nelson for the fix!  Fixes #40252.
This commit is contained in:
Andy Wingo 2021-05-01 22:23:06 +02:00
parent d643913ac2
commit d4b7cbc68c

View file

@ -1,5 +1,5 @@
;; R7RS library support
;; Copyright (C) 2020 Free Software Foundation, Inc.
;; Copyright (C) 2020, 2021 Free Software Foundation, Inc.
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
@ -88,11 +88,11 @@
(((include-library-declarations filename ...) . decls)
(syntax-case (handle-includes #'(filename ...)) ()
((decl ...)
(partition-decls #'(decl ... decls) exports imports code))))
(partition-decls #'(decl ... . decls) exports imports code))))
(((cond-expand clause ...) . decls)
(syntax-case (handle-cond-expand #'(clause ...)) ()
((decl ...)
(partition-decls #'(decl ... decls) exports imports code))))))
(partition-decls #'(decl ... . decls) exports imports code))))))
(syntax-case stx ()
((_ name decl ...)