mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 09:40:25 +02:00
Support R7RS define-library
* module/Makefile.am (ice-9/boot-9.go, NOCOMP_SOURCES): Add r7rs-libraries. * module/ice-9/boot-9.scm ("ice-9/r7rs-libraries"): Include file. * module/ice-9/psyntax.scm (call-with-include-port): New definition. (include): Use call-with-include-port. * module/ice-9/psyntax-pp.scm: Regenerate. * module/ice-9/r7rs-libraries.scm: New file. * module/scheme/base.scm (r7:include, r7:include-ci): Fix mistaken use of core "include". Use include-ci from core. (features): Remove features that are already part of core. * NEWS: Update.
This commit is contained in:
parent
639d0b3768
commit
fd2ffc649c
7 changed files with 207 additions and 90 deletions
|
@ -1,5 +1,5 @@
|
|||
;;; R7RS compatibility libraries
|
||||
;;; Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
;;; Copyright (C) 2019-2020 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 License as
|
||||
|
@ -297,12 +297,11 @@
|
|||
#'(begin body ...)
|
||||
#'(r7:cond-expand more-clauses ...))))))
|
||||
|
||||
(define-syntax-rule (r7:include k fn* ...)
|
||||
(begin (include k fn*) ...))
|
||||
(define-syntax-rule (r7:include fn* ...)
|
||||
(begin (include fn*) ...))
|
||||
|
||||
;; FIXME
|
||||
(define-syntax-rule (r7:include-ci k fn* ...)
|
||||
(r7:include k fn* ...))
|
||||
(define-syntax-rule (r7:include-ci fn* ...)
|
||||
(begin (include-ci fn*) ...))
|
||||
|
||||
(define-syntax-rule (r7:let-syntax ((vars trans) ...) . expr)
|
||||
(let-syntax ((vars trans) ...)
|
||||
|
@ -577,14 +576,11 @@ defaults to 0 and SEND defaults to the length of SOURCE."
|
|||
|
||||
(define (features)
|
||||
(append
|
||||
%cond-expand-features
|
||||
(case (native-endianness)
|
||||
((big) '(big-endian))
|
||||
((little) '(little-endian))
|
||||
(else '()))
|
||||
'(r6rs
|
||||
syntax-case
|
||||
r7rs exact-closed ieee-float full-unicode ratios)))
|
||||
%cond-expand-features))
|
||||
|
||||
(define (input-port-open? port)
|
||||
(and (not (port-closed? port)) (input-port? port)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue