mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 06:20:30 +02:00
Convert srfi-197 implementation and tests to modules
https://srfi.schemers.org/srfi-197/srfi-197.html * NEWS: mention SRFI 197 support. * am/bootstrap.am: Add srfi-197.scm. * module/srfi/srfi-197.scm: Convert to module. * test-suite/Makefile.am: Add srfi-197.sr64. * test-suite/tests/srfi-197.sr64: Renamed from srfi-197.test. * test-suite/tests/srfi-197.test: Port to Guile; rename to srfi-197.sr64.
This commit is contained in:
parent
2d602d28c3
commit
36ba0aa655
5 changed files with 38 additions and 4 deletions
5
NEWS
5
NEWS
|
@ -22,6 +22,11 @@ downright unusable (e.g., <https://bugs.gnu.org/72378>), non-conforming
|
|||
|
||||
* New interfaces and functionality
|
||||
|
||||
** Guile now supports SRFI-197 (Pipeline Operators)
|
||||
|
||||
Guile now provides chain, chain-and, chain-when, chain-lambda, nest, and
|
||||
nest-reverse.
|
||||
|
||||
** PEG parser
|
||||
|
||||
PEG grammar parser in (ice-9 peg string-peg) has been rewritten to cover
|
||||
|
|
|
@ -351,6 +351,7 @@ SOURCES = \
|
|||
srfi/srfi-171.scm \
|
||||
srfi/srfi-171/gnu.scm \
|
||||
srfi/srfi-171/meta.scm \
|
||||
srfi/srfi-197.scm \
|
||||
\
|
||||
statprof.scm \
|
||||
\
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
;;;; srfi-197.scm --- SRFI 197: Pipeline Operators
|
||||
|
||||
;;;; SPDX-FileCopyrightText: 2020 Adam R. Nelson <adam@nels.onl>
|
||||
;;;;
|
||||
;;;; SPDX-License-Identifier: MIT
|
||||
|
@ -26,9 +28,19 @@
|
|||
;;;; CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
;;;; SOFTWARE.
|
||||
|
||||
; A syntax-case implementation of SRFI 197.
|
||||
; This should be functionally equivalent to srfi-197.scm,
|
||||
; but it may be easier to read and understand.
|
||||
;;; Commentary:
|
||||
;;;
|
||||
;;; This is an implementation of SRFI 197: Pipeline Operators taken from
|
||||
;;; the reference implementation's srfi-197-syntax-case.scm.
|
||||
;;;
|
||||
;;; Code:
|
||||
|
||||
(define-module (srfi srfi-197)
|
||||
#:use-module ((scheme base) #:select (eof-object let-values))
|
||||
#:use-module (srfi srfi-2)
|
||||
#:export (chain chain-and chain-lambda chain-when nest nest-reverse))
|
||||
|
||||
(cond-expand-provide (current-module) '(srfi-197))
|
||||
|
||||
(define (gentemp) (car (generate-temporaries '(x))))
|
||||
|
||||
|
|
|
@ -161,6 +161,7 @@ SCM_TESTS = tests/00-initial-env.test \
|
|||
tests/srfi-111.test \
|
||||
tests/srfi-119.test \
|
||||
tests/srfi-171.test \
|
||||
tests/srfi-197.sr64 \
|
||||
tests/srfi-4.test \
|
||||
tests/srfi-9.test \
|
||||
tests/statprof.test \
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
;;;; srfi-197.sr64 --- SRFI 197: Pipeline Operators test suite
|
||||
;;;;
|
||||
;;;; SPDX-FileCopyrightText: 2020 Adam R. Nelson <adam@nels.onl>
|
||||
;;;;
|
||||
;;;; SPDX-License-Identifier: MIT
|
||||
|
@ -26,7 +28,16 @@
|
|||
;;;; CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
;;;; SOFTWARE.
|
||||
|
||||
(include "./srfi-64-minimal.scm")
|
||||
;;; Commentary:
|
||||
|
||||
;;; The Copyright statement above was taken from the srfi-197.html file
|
||||
;;; in the original source.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(define-module (srfi-197-test)
|
||||
#:use-module (srfi srfi-64)
|
||||
#:use-module (srfi srfi-197))
|
||||
|
||||
(define (exclamation x) (string-append x "!"))
|
||||
|
||||
|
@ -236,3 +247,7 @@
|
|||
(quote <>)))
|
||||
|
||||
(test-end "Pipeline Operators")
|
||||
|
||||
;; Local Variables:
|
||||
;; mode: scheme
|
||||
;; End:
|
Loading…
Add table
Add a link
Reference in a new issue