Author: yamakenz Date: Sun Jul 22 15:44:36 2007 New Revision: 4786 Modified: sigscheme-trunk/NEWS sigscheme-trunk/README sigscheme-trunk/RELNOTE sigscheme-trunk/lib/Makefile.am sigscheme-trunk/lib/srfi-69.scm
Log: * This commit add SRFI-69, but validation is not done yet * lib/srfi-69.scm - Move the license terms to head - require-extension SRFI-9 and SRFI-23 - (expt, inexact?, real?): New procedure * lib/Makefile.am - (dist_scmlib_DATA): Add srfi-69.scm * README * RELNOTE * NEWS - Update Modified: sigscheme-trunk/NEWS ============================================================================== --- sigscheme-trunk/NEWS (original) +++ sigscheme-trunk/NEWS Sun Jul 22 15:44:36 2007 @@ -9,6 +9,8 @@ - SRFI-55 require-extension + - SRFI-69 Basic hash tables + - SRFI-95 Sorting and Merging - R5RS promises (delay and force) Modified: sigscheme-trunk/README ============================================================================== --- sigscheme-trunk/README (original) +++ sigscheme-trunk/README Sun Jul 22 15:44:36 2007 @@ -41,6 +41,7 @@ - SRFI-48 : Intermediate Format Strings - SRFI-55 : require-extension - SRFI-60 : Integer as Bits (partial) + - SRFI-69 : Basic hash tables - SRFI-95 : Sorting and Merging - R6RS: R6RS characters (partial and preliminary) - Multibyte character encodings support Modified: sigscheme-trunk/RELNOTE ============================================================================== --- sigscheme-trunk/RELNOTE (original) +++ sigscheme-trunk/RELNOTE Sun Jul 22 15:44:36 2007 @@ -51,8 +51,10 @@ What's New ---------- - - SRFI-1 List Library (full-featured) + - SRFI-1 List Library (full-featured) + - SRFI-9 Defining Record Types - SRFI-55 require-extension + - SRFI-69 Basic hash tables - SRFI-95 Sorting and Merging - R5RS promises (delay and force) - let-optionals* for optional argument processing Modified: sigscheme-trunk/lib/Makefile.am ============================================================================== --- sigscheme-trunk/lib/Makefile.am (original) +++ sigscheme-trunk/lib/Makefile.am Sun Jul 22 15:44:36 2007 @@ -1,5 +1,5 @@ dist_scmlib_DATA = sigscheme-init.scm \ - srfi-1.scm srfi-9.scm srfi-55.scm srfi-95.scm + srfi-1.scm srfi-9.scm srfi-55.scm srfi-69.scm srfi-95.scm # Install into master package's pkgdatadir if --with-master-pkg is specified # e.g.) Modified: sigscheme-trunk/lib/srfi-69.scm ============================================================================== --- sigscheme-trunk/lib/srfi-69.scm (original) +++ sigscheme-trunk/lib/srfi-69.scm Sun Jul 22 15:44:36 2007 @@ -1,3 +1,52 @@ +;; Copyright (C) Panu Kalliokoski (2005). All Rights Reserved. +;; +;; Permission is hereby granted, free of charge, to any person obtaining a +;; copy of this software and associated documentation files (the +;; "Software"), to deal in the Software without restriction, including +;; without limitation the rights to use, copy, modify, merge, publish, +;; distribute, sublicense, and/or sell copies of the Software, and to +;; permit persons to whom the Software is furnished to do so, subject to +;; the following conditions: +;; +;; The above copyright notice and this permission notice shall be included +;; in all copies or substantial portions of the Software. +;; +;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +;; OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +;; ChangeLog +;; +;; 2007-07-23 yamaken - Imported from +;; http://srfi.schemers.org/srfi-69/srfi-69.html +;; and adapted to SigScheme + + +;; +;; SigScheme adaptation + +(require-extension (srfi 9 23)) + +(define inexact? (lambda (x) #f)) +(define real? inexact?) + +(define expt + (lambda (x y) + (let rec ((res 1) + (cnt y)) + (if (zero? cnt) + res + (rec (* res x) (- cnt 1)))))) + +;; +;; Main implementation +;; + ;; This implementation relies on SRFI-9 for distinctness of the hash table ;; type, and on SRFI-23 for error reporting. Otherwise, the implementation ;; is pure R5RS. @@ -255,25 +304,3 @@ (define (hash-table-values hash-table) (hash-table-fold hash-table (lambda (key val acc) (cons val acc)) '())) - - -;; Copyright (C) Panu Kalliokoski (2005). All Rights Reserved. -;; -;; Permission is hereby granted, free of charge, to any person obtaining a -;; copy of this software and associated documentation files (the -;; "Software"), to deal in the Software without restriction, including -;; without limitation the rights to use, copy, modify, merge, publish, -;; distribute, sublicense, and/or sell copies of the Software, and to -;; permit persons to whom the Software is furnished to do so, subject to -;; the following conditions: -;; -;; The above copyright notice and this permission notice shall be included -;; in all copies or substantial portions of the Software. -;; -;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -;; OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
