guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, wip-r6rs-libraries, updated. release_1


From: Julian Graham
Subject: [Guile-commits] GNU Guile branch, wip-r6rs-libraries, updated. release_1-9-8-71-gb7845f6
Date: Sat, 06 Mar 2010 06:32:35 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=b7845f6b06ca3cfe0f4ed1ad7ca5af41159eed01

The branch, wip-r6rs-libraries has been updated
       via  b7845f6b06ca3cfe0f4ed1ad7ca5af41159eed01 (commit)
      from  a7ff6c489848a6656391ea6eef0c07e0b9905fa0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b7845f6b06ca3cfe0f4ed1ad7ca5af41159eed01
Author: Julian Graham <address@hidden>
Date:   Sat Mar 6 01:28:46 2010 -0500

    Implementation and test cases for the R6RS (rnrs control) library.
    
    * module/Makefile.am: Add rnrs/6/base.scm and rnrs/6/control.scm to
      RNRS_SOURCES.
    * module/rnrs/6/base.scm, control.scm: New files.
    * test-suite/Makefile.am: Add tests/r6rs-control.test to SCM_TESTS.
    * test-suite/tests/r6rs-control.test: New file.

-----------------------------------------------------------------------

Summary of changes:
 module/Makefile.am                                 |    2 +
 module/rnrs/6/base.scm                             |   77 ++++++++++++++++++++
 module/{srfi/srfi-2.scm => rnrs/6/control.scm}     |   28 ++++----
 test-suite/Makefile.am                             |    1 +
 .../tests/r6rs-control.test                        |   29 ++++----
 5 files changed, 111 insertions(+), 26 deletions(-)
 create mode 100644 module/rnrs/6/base.scm
 copy module/{srfi/srfi-2.scm => rnrs/6/control.scm} (58%)
 copy module/srfi/srfi-8.scm => test-suite/tests/r6rs-control.test (56%)

diff --git a/module/Makefile.am b/module/Makefile.am
index 0ee2d1c..df498e4 100644
--- a/module/Makefile.am
+++ b/module/Makefile.am
@@ -256,6 +256,8 @@ SRFI_SOURCES = \
   srfi/srfi-98.scm
 
 RNRS_SOURCES =                                 \
+  rnrs/6/base.scm                              \
+  rnrs/6/control.scm                           \
   rnrs/bytevector.scm                          \
   rnrs/io/ports.scm
 
diff --git a/module/rnrs/6/base.scm b/module/rnrs/6/base.scm
new file mode 100644
index 0000000..cc17d8a
--- /dev/null
+++ b/module/rnrs/6/base.scm
@@ -0,0 +1,77 @@
+;;; base.scm --- The R6RS base library
+
+;;      Copyright (C) 2010 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 published by the Free Software Foundation; either
+;; version 3 of the License, or (at your option) any later version.
+;; 
+;; This library is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; Lesser General Public License for more details.
+;; 
+;; You should have received a copy of the GNU Lesser General Public
+;; License along with this library; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+(library (rnrs base (6))
+  (export boolean? symbol? char? vector? null? pair? number? string? procedure?
+        
+         define define-syntax syntax-rules lambda let let* let-values 
+         let*-values letrec begin 
+
+         quote lambda if set! cond case 
+        
+         or and not
+        
+         eqv? equal? eq?
+        
+         + - * / max min abs numerator denominator gcd lcm floor ceiling
+         truncate round rationalize real-part imag-part make-rectangular angle
+         div mod div-and-mod div0 mod0 div0-and-mod0
+         
+         expt exact-integer-sqrt sqrt exp log sin cos tan asin acos atan 
+         make-polar magnitude angle
+        
+         complex? real? rational? integer? exact? inexact? real-valued?
+         rational-valued? integer-values? zero? positive? negative? odd? even?
+         nan? finite? infinite?
+
+         exact inexact = < > <= >= 
+
+         number->string string->number
+
+         cons car cdr caar cadr cdar cddr caaar caadr cadar cdaar caddr cdadr 
+         cddar cdddr caaaar caaadr caadar cadaar cdaaar cddaar cdadar cdaadr 
+         cadadr caaddr caddar cadddr cdaddr cddadr cdddar cddddr
+
+         list? list length append reverse list-tail list-ref map for-each
+
+         symbol->string symbol->string symbol=?
+
+         char->integer integer->char char=? char<? char>? char<=? char>=?
+
+         make-string string string-length string-ref string=? string<? string>?
+         string<=? string>=? substring string-append string->list list->string
+         string-for-each string-copy
+
+         vector? make-vector vector vector-length vector-ref vector-set! 
+         vector->list list->vector vector-fill! vector-map vector-for-each
+
+         error assertion-violation assert
+
+         call-with-current-continuation call/cc call-with-values dynamic-wind
+         values apply
+
+         quasiquote unquote unquote-splicing
+
+         let-syntax letrec-syntax
+
+         syntax-rules identifier-syntax)
+ (import (guile)
+        (rename (only (guile (6)) for-each map) (for-each vector-for-each) 
+                                                (map vector-map))
+        (srfi srfi-11)))
diff --git a/module/srfi/srfi-2.scm b/module/rnrs/6/control.scm
similarity index 58%
copy from module/srfi/srfi-2.scm
copy to module/rnrs/6/control.scm
index c09323f..69351c6 100644
--- a/module/srfi/srfi-2.scm
+++ b/module/rnrs/6/control.scm
@@ -1,6 +1,6 @@
-;;; srfi-2.scm --- and-let*
+;;; control.scm --- The R6RS control structures library
 
-;;     Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
+;;      Copyright (C) 2010 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
@@ -15,17 +15,19 @@
 ;; You should have received a copy of the GNU Lesser General Public
 ;; License along with this library; if not, write to the Free Software
 ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
 
-;;; Commentary:
+(library (rnrs control (6))
+  (export when unless do case-lambda)
+  (import (rnrs base (6))
+          (only (guile) do case-lambda))
 
-;; This module is fully documented in the Guile Reference Manual.
+  (define-syntax when
+    (syntax-rules ()
+      ((when test result1 result2 ...)
+       (if test (begin result1 result2 ...)))))
 
-;;; Code:
-
-(define-module (srfi srfi-2)
-  :use-module (ice-9 and-let-star)
-  :re-export-syntax (and-let*))
-
-(cond-expand-provide (current-module) '(srfi-2))
-
-;;; srfi-2.scm ends here
+  (define-syntax unless
+    (syntax-rules ()
+      ((unless test result1 result2 ...)
+       (if (not test) (begin result1 result2 ...))))))
diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am
index 36afa25..fc14f3b 100644
--- a/test-suite/Makefile.am
+++ b/test-suite/Makefile.am
@@ -70,6 +70,7 @@ SCM_TESTS = tests/alist.test                  \
            tests/q.test                        \
            tests/r4rs.test                     \
            tests/r5rs_pitfall.test             \
+           tests/r6rs-control.test             \
            tests/r6rs-ports.test               \
            tests/ramap.test                    \
            tests/reader.test                   \
diff --git a/module/srfi/srfi-8.scm b/test-suite/tests/r6rs-control.test
similarity index 56%
copy from module/srfi/srfi-8.scm
copy to test-suite/tests/r6rs-control.test
index ced1238..0f099a0 100644
--- a/module/srfi/srfi-8.scm
+++ b/test-suite/tests/r6rs-control.test
@@ -1,6 +1,6 @@
-;;; srfi-8.scm --- receive
+;;; r6rs-control.test --- Test suite for R6RS (rnrs control)
 
-;; Copyright (C) 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
+;;      Copyright (C) 2010 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
@@ -15,17 +15,20 @@
 ;; You should have received a copy of the GNU Lesser General Public
 ;; License along with this library; if not, write to the Free Software
 ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
 
-;;; Commentary:
+(define-module (test-suite test-rnrs-control)
+  :use-module ((rnrs control) :version (6))
+  :use-module (test-suite lib))
 
-;; This module is fully documented in the Guile Reference Manual.
+(with-test-prefix "when"
+  (pass-if "when true"
+    (eq? (when (> 3 2) 'greater) 'greater))
+  (pass-if "when false"
+    (unspecified? (when (< 3 2) 'greater))))
 
-;;; Code:
-
-(define-module (srfi srfi-8)
-  :use-module (ice-9 receive)
-  :re-export-syntax (receive))
-
-(cond-expand-provide (current-module) '(srfi-8))
-
-;;; srfi-8.scm ends here
+(with-test-prefix "unless"
+  (pass-if "unless true"
+    (unspecified? (unless (> 3 2) 'less)))
+  (pass-if "unless false"
+    (eq? (unless (< 3 2) 'less) 'less)))


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]