1 ;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
3 ;;;; This library is free software; you can redistribute it and/or
4 ;;;; modify it under the terms of the GNU Lesser General Public
5 ;;;; License as published by the Free Software Foundation; either
6 ;;;; version 2.1 of the License, or (at your option) any later version.
8 ;;;; This library is distributed in the hope that it will be useful,
9 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 ;;;; Lesser General Public License for more details.
13 ;;;; You should have received a copy of the GNU Lesser General Public
14 ;;;; License along with this library; if not, write to the Free Software
15 ;;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 ;;;; Safe subset of R5RS bindings
20 (define-module (ice-9 safe-r5rs)
21 :re-export (eqv? eq? equal?
22 number? complex? real? rational? integer?
25 zero? positive? negative? odd? even?
29 quotient remainder modulo
31 ;;numerator denominator XXX
33 floor ceiling truncate round
34 exp log sin cos tan asin acos atan
37 make-rectangular make-polar real-part imag-part magnitude angle
38 exact->inexact inexact->exact
40 number->string string->number
49 caaar caadr cadar caddr cdaar cdadr cddar cdddr
50 caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr
51 cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr
63 symbol->string string->symbol
66 char=? char<? char>? char<=? char>=?
67 char-ci=? char-ci<? char-ci>? char-ci<=? char-ci>=?
68 char-alphabetic? char-numeric? char-whitespace?
69 char-upper-case? char-lower-case?
70 char->integer integer->char
78 string-ref string-set!
80 string<? string>? string<=? string>=?
81 string-ci<? string-ci>? string-ci<=? string-ci>=?
85 string->list list->string
86 string-copy string-fill!
92 vector-ref vector-set!
93 vector->list list->vector
102 call-with-current-continuation
110 input-port? output-port?
111 current-input-port current-output-port
128 :export (null-environment))
130 (define null-interface (resolve-interface '(ice-9 null)))
132 (module-use! %module-public-interface null-interface)
134 (define (null-environment n)
136 (scm-error 'misc-error 'null-environment
137 "~A is not a valid version"
140 ;; Note that we need to create a *fresh* interface
141 (let ((interface (make-module 31)))
142 (set-module-kind! interface 'interface)
143 (module-use! interface null-interface)