2007-08-26 18:51:16 -04:00
|
|
|
#!/usr/bin/env ikarus --r6rs-script
|
2007-10-25 16:27:34 -04:00
|
|
|
;;; Ikarus Scheme -- A compiler for R6RS Scheme.
|
|
|
|
;;; Copyright (C) 2006,2007 Abdulaziz Ghuloum
|
|
|
|
;;;
|
|
|
|
;;; This program is free software: you can redistribute it and/or modify
|
|
|
|
;;; it under the terms of the GNU General Public License version 3 as
|
|
|
|
;;; published by the Free Software Foundation.
|
|
|
|
;;;
|
|
|
|
;;; This program 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
|
|
|
|
;;; General Public License for more details.
|
|
|
|
;;;
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
|
|
|
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2007-08-26 14:03:25 -04:00
|
|
|
|
2007-08-26 18:51:16 -04:00
|
|
|
(import (ikarus))
|
2007-08-26 14:03:25 -04:00
|
|
|
|
|
|
|
;;; library names:
|
|
|
|
|
|
|
|
(define library-names
|
2007-08-28 11:11:12 -04:00
|
|
|
'(
|
2007-09-15 00:14:47 -04:00
|
|
|
[se (scheme-report-environment)]
|
|
|
|
[r5 (rnrs r5rs (6))]
|
2007-08-26 14:03:25 -04:00
|
|
|
[ct (rnrs control (6))]
|
2007-08-26 15:43:18 -04:00
|
|
|
[ev (rnrs eval (6))]
|
2007-08-26 14:03:25 -04:00
|
|
|
[mp (rnrs mutable-pairs (6))]
|
|
|
|
[ms (rnrs mutable-strings (6))]
|
2007-09-02 02:47:50 -04:00
|
|
|
[pr (rnrs programs (6))]
|
|
|
|
[sc (rnrs syntax-case (6))]
|
|
|
|
[fi (rnrs files (6))]
|
2007-09-02 02:57:56 -04:00
|
|
|
[ne (null-environment)]
|
2007-09-09 23:58:00 -04:00
|
|
|
[sr (rnrs sorting (6))]
|
2007-10-26 00:55:00 -04:00
|
|
|
[ex (rnrs exceptions (6))]
|
2007-08-28 11:11:12 -04:00
|
|
|
[ls (rnrs lists (6))]
|
2007-10-23 23:34:11 -04:00
|
|
|
[ri (rnrs records inspection (6))]
|
|
|
|
[rp (rnrs records procedural (6))]
|
|
|
|
[rs (rnrs records syntactic (6))]
|
|
|
|
[co (rnrs conditions (6))]
|
2007-10-27 11:40:40 -04:00
|
|
|
[en (rnrs enums (6))]
|
2007-08-28 11:11:12 -04:00
|
|
|
[is (rnrs io simple (6))]
|
2007-10-23 23:34:11 -04:00
|
|
|
[ba (rnrs base (6))]
|
2007-08-28 11:11:12 -04:00
|
|
|
[bv (rnrs bytevectors (6))]
|
2007-08-26 15:43:18 -04:00
|
|
|
[uc (rnrs unicode (6))]
|
2007-08-28 11:11:12 -04:00
|
|
|
[bw (rnrs arithmetic bitwise (6))]
|
|
|
|
[fx (rnrs arithmetic fixnums (6))]
|
|
|
|
[fl (rnrs arithmetic flonums (6))]
|
|
|
|
[ht (rnrs hashtables (6))]
|
|
|
|
[ip (rnrs io ports (6))]
|
2007-08-26 15:43:18 -04:00
|
|
|
))
|
2007-08-26 14:03:25 -04:00
|
|
|
|
|
|
|
(define status-names
|
2007-08-26 20:04:00 -04:00
|
|
|
'(
|
2007-08-26 14:03:25 -04:00
|
|
|
[S scheduled]
|
2007-08-26 20:04:00 -04:00
|
|
|
[D deferred]
|
2007-08-28 11:11:12 -04:00
|
|
|
[C completed]
|
|
|
|
))
|
2007-08-26 14:03:25 -04:00
|
|
|
|
|
|
|
(define identifier-names
|
2007-08-26 18:51:16 -04:00
|
|
|
'(
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
|
|
|
[lambda C ba se ne]
|
|
|
|
[and C ba se ne]
|
|
|
|
[begin C ba se ne]
|
|
|
|
[case C ba se ne]
|
|
|
|
[cond C ba se ne]
|
|
|
|
[define C ba se ne]
|
|
|
|
[define-syntax C ba se ne]
|
2007-08-26 18:51:16 -04:00
|
|
|
[identifier-syntax C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[if C ba se ne]
|
|
|
|
[let C ba se ne]
|
|
|
|
[let* C ba se ne]
|
2007-08-26 18:51:16 -04:00
|
|
|
[let*-values C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[let-syntax C ba se ne]
|
2007-08-26 18:51:16 -04:00
|
|
|
[let-values C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[letrec C ba se ne]
|
2007-08-26 18:51:16 -04:00
|
|
|
[letrec* C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[letrec-syntax C ba se ne]
|
|
|
|
[or C ba se ne]
|
|
|
|
[quasiquote C ba se ne]
|
|
|
|
[quote C ba se ne]
|
|
|
|
[set! C ba se ne]
|
|
|
|
[syntax-rules C ba se ne]
|
|
|
|
[unquote C ba se ne]
|
|
|
|
[unquote-splicing C ba se ne]
|
|
|
|
[< C ba se]
|
|
|
|
[<= C ba se]
|
|
|
|
[= C ba se]
|
|
|
|
[> C ba se]
|
|
|
|
[>= C ba se]
|
|
|
|
[+ C ba se]
|
|
|
|
[- C ba se]
|
|
|
|
[* C ba se]
|
|
|
|
[/ C ba se]
|
|
|
|
[abs C ba se]
|
2007-09-02 20:57:02 -04:00
|
|
|
[acos C ba se]
|
2007-08-30 17:25:29 -04:00
|
|
|
[angle D ba se]
|
|
|
|
[append C ba se]
|
|
|
|
[apply C ba se]
|
2007-09-02 20:57:02 -04:00
|
|
|
[asin C ba se]
|
2007-09-02 20:48:59 -04:00
|
|
|
[assert C ba]
|
2007-10-26 15:27:42 -04:00
|
|
|
[assertion-violation C ba]
|
2007-09-02 20:53:28 -04:00
|
|
|
[atan C ba se]
|
2007-08-28 15:03:21 -04:00
|
|
|
[boolean=? C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[boolean? C ba se]
|
|
|
|
[car C ba se]
|
|
|
|
[cdr C ba se]
|
|
|
|
[caar C ba se]
|
|
|
|
[cadr C ba se]
|
|
|
|
[cdar C ba se]
|
|
|
|
[cddr C ba se]
|
|
|
|
[caaar C ba se]
|
|
|
|
[caadr C ba se]
|
|
|
|
[cadar C ba se]
|
|
|
|
[caddr C ba se]
|
|
|
|
[cdaar C ba se]
|
|
|
|
[cdadr C ba se]
|
|
|
|
[cddar C ba se]
|
|
|
|
[cdddr C ba se]
|
|
|
|
[caaaar C ba se]
|
|
|
|
[caaadr C ba se]
|
|
|
|
[caadar C ba se]
|
|
|
|
[caaddr C ba se]
|
|
|
|
[cadaar C ba se]
|
|
|
|
[cadadr C ba se]
|
|
|
|
[caddar C ba se]
|
|
|
|
[cadddr C ba se]
|
|
|
|
[cdaaar C ba se]
|
|
|
|
[cdaadr C ba se]
|
|
|
|
[cdadar C ba se]
|
|
|
|
[cdaddr C ba se]
|
|
|
|
[cddaar C ba se]
|
|
|
|
[cddadr C ba se]
|
|
|
|
[cdddar C ba se]
|
|
|
|
[cddddr C ba se]
|
|
|
|
[call-with-current-continuation C ba se]
|
2007-08-26 18:51:16 -04:00
|
|
|
[call/cc C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[call-with-values C ba se]
|
|
|
|
[ceiling C ba se]
|
|
|
|
[char->integer C ba se]
|
|
|
|
[char<=? C ba se]
|
|
|
|
[char<? C ba se]
|
|
|
|
[char=? C ba se]
|
|
|
|
[char>=? C ba se]
|
|
|
|
[char>? C ba se]
|
|
|
|
[char? C ba se]
|
|
|
|
[complex? D ba se]
|
|
|
|
[cons C ba se]
|
|
|
|
[cos C ba se]
|
|
|
|
[denominator C ba se]
|
2007-09-12 02:37:03 -04:00
|
|
|
[div C ba]
|
|
|
|
[mod C ba]
|
|
|
|
[div-and-mod C ba]
|
|
|
|
[div0 C ba]
|
|
|
|
[mod0 C ba]
|
|
|
|
[div0-and-mod0 C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[dynamic-wind C ba se]
|
|
|
|
[eq? C ba se]
|
2007-09-15 00:14:47 -04:00
|
|
|
[equal? C ba se]
|
2007-08-30 17:25:29 -04:00
|
|
|
[eqv? C ba se]
|
2007-10-26 15:27:42 -04:00
|
|
|
[error C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[even? C ba se]
|
2007-08-28 18:15:27 -04:00
|
|
|
[exact C ba]
|
2007-08-26 18:51:16 -04:00
|
|
|
[exact-integer-sqrt C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[exact? C ba se]
|
2007-09-15 00:14:47 -04:00
|
|
|
[exp C ba se]
|
2007-08-30 17:25:29 -04:00
|
|
|
[expt C ba se]
|
2007-09-12 02:44:19 -04:00
|
|
|
[finite? C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[floor C ba se]
|
2007-09-09 23:50:55 -04:00
|
|
|
[for-each C ba se]
|
2007-08-30 17:25:29 -04:00
|
|
|
[gcd C ba se]
|
|
|
|
[imag-part D ba se]
|
2007-08-28 18:15:27 -04:00
|
|
|
[inexact C ba]
|
2007-09-03 00:34:53 -04:00
|
|
|
[inexact? C ba se]
|
2007-09-12 02:44:19 -04:00
|
|
|
[infinite? C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[integer->char C ba se]
|
2007-09-12 03:10:54 -04:00
|
|
|
[integer-valued? C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[integer? C ba se]
|
|
|
|
[lcm C ba se]
|
|
|
|
[length C ba se]
|
|
|
|
[list C ba se]
|
|
|
|
[list->string C ba se]
|
|
|
|
[list->vector C ba se]
|
|
|
|
[list-ref C ba se]
|
|
|
|
[list-tail C ba se]
|
|
|
|
[list? C ba se]
|
|
|
|
[log C ba se]
|
|
|
|
[magnitude D ba se]
|
|
|
|
[make-polar D ba se]
|
|
|
|
[make-rectangular D ba se]
|
|
|
|
[make-string C ba se]
|
|
|
|
[make-vector C ba se]
|
|
|
|
[map C ba se]
|
|
|
|
[max C ba se]
|
|
|
|
[min C ba se]
|
2007-09-12 02:44:19 -04:00
|
|
|
[nan? C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[negative? C ba se]
|
|
|
|
[not C ba se]
|
2007-08-26 18:51:16 -04:00
|
|
|
[null? C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[number->string C ba se]
|
|
|
|
[number? C ba se]
|
|
|
|
[numerator C ba se]
|
|
|
|
[odd? C ba se]
|
|
|
|
[pair? C ba se]
|
|
|
|
[positive? C ba se]
|
|
|
|
[procedure? C ba se]
|
2007-09-12 03:10:54 -04:00
|
|
|
[rational-valued? C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[rational? C ba se]
|
2007-09-12 00:57:04 -04:00
|
|
|
[rationalize C ba se]
|
2007-08-30 17:25:29 -04:00
|
|
|
[real-part D ba se]
|
2007-09-12 03:10:54 -04:00
|
|
|
[real-valued? C ba]
|
2007-09-11 00:13:10 -04:00
|
|
|
[real? C ba se]
|
2007-08-30 17:25:29 -04:00
|
|
|
[reverse C ba se]
|
|
|
|
[round C ba se]
|
|
|
|
[sin C ba se]
|
|
|
|
[sqrt C ba se]
|
|
|
|
[string C ba se]
|
|
|
|
[string->list C ba se]
|
|
|
|
[string->number C ba se]
|
|
|
|
[string->symbol C ba se]
|
|
|
|
[string-append C ba se]
|
|
|
|
[string-copy C ba se]
|
2007-08-28 17:45:54 -04:00
|
|
|
[string-for-each C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[string-length C ba se]
|
|
|
|
[string-ref C ba se]
|
|
|
|
[string<=? C ba se]
|
|
|
|
[string<? C ba se]
|
|
|
|
[string=? C ba se]
|
|
|
|
[string>=? C ba se]
|
|
|
|
[string>? C ba se]
|
|
|
|
[string? C ba se]
|
|
|
|
[substring C ba se]
|
|
|
|
[symbol->string C ba se]
|
2007-08-28 15:03:21 -04:00
|
|
|
[symbol=? C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[symbol? C ba se]
|
2007-09-02 20:57:02 -04:00
|
|
|
[tan C ba se]
|
2007-09-11 00:22:23 -04:00
|
|
|
[truncate C ba se]
|
2007-08-30 17:25:29 -04:00
|
|
|
[values C ba se]
|
|
|
|
[vector C ba se]
|
|
|
|
[vector->list C ba se]
|
2007-09-02 02:22:23 -04:00
|
|
|
[vector-fill! C ba se]
|
2007-08-28 17:24:53 -04:00
|
|
|
[vector-for-each C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[vector-length C ba se]
|
2007-08-28 15:37:51 -04:00
|
|
|
[vector-map C ba]
|
2007-08-30 17:25:29 -04:00
|
|
|
[vector-ref C ba se]
|
|
|
|
[vector-set! C ba se]
|
|
|
|
[vector? C ba se]
|
|
|
|
[zero? C ba se]
|
2007-08-28 11:34:13 -04:00
|
|
|
[... C ba sc]
|
2007-08-28 12:46:12 -04:00
|
|
|
[=> C ba ex]
|
|
|
|
[_ C ba sc]
|
|
|
|
[else C ba ex]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-09-13 01:10:57 -04:00
|
|
|
[bitwise-arithmetic-shift C bw]
|
|
|
|
[bitwise-arithmetic-shift-left C bw]
|
|
|
|
[bitwise-arithmetic-shift-right C bw]
|
2007-09-13 07:04:13 -04:00
|
|
|
[bitwise-not D bw]
|
|
|
|
[bitwise-and D bw]
|
|
|
|
[bitwise-ior D bw]
|
|
|
|
[bitwise-xor D bw]
|
2007-08-26 18:51:16 -04:00
|
|
|
[bitwise-bit-count D bw]
|
|
|
|
[bitwise-bit-field D bw]
|
|
|
|
[bitwise-bit-set? D bw]
|
|
|
|
[bitwise-copy-bit D bw]
|
|
|
|
[bitwise-copy-bit-field D bw]
|
|
|
|
[bitwise-first-bit-set D bw]
|
|
|
|
[bitwise-if D bw]
|
|
|
|
[bitwise-length D bw]
|
|
|
|
[bitwise-reverse-bit-field D bw]
|
|
|
|
[bitwise-rotate-bit-field D bw]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-08-26 18:51:16 -04:00
|
|
|
[fixnum? C fx]
|
2007-09-15 02:06:16 -04:00
|
|
|
[fixnum-width C fx]
|
|
|
|
[least-fixnum C fx]
|
|
|
|
[greatest-fixnum C fx]
|
2007-09-13 16:39:13 -04:00
|
|
|
[fx* C fx]
|
2007-09-15 03:16:55 -04:00
|
|
|
[fx*/carry C fx]
|
2007-09-13 16:39:13 -04:00
|
|
|
[fx+ C fx]
|
2007-09-15 03:16:55 -04:00
|
|
|
[fx+/carry C fx]
|
2007-09-13 16:39:13 -04:00
|
|
|
[fx- C fx]
|
2007-09-15 03:16:55 -04:00
|
|
|
[fx-/carry C fx]
|
2007-09-13 16:39:13 -04:00
|
|
|
[fx<=? C fx]
|
|
|
|
[fx<? C fx]
|
|
|
|
[fx=? C fx]
|
|
|
|
[fx>=? C fx]
|
|
|
|
[fx>? C fx]
|
2007-09-13 19:25:47 -04:00
|
|
|
[fxand C fx]
|
2007-09-15 00:14:47 -04:00
|
|
|
[fxarithmetic-shift C fx]
|
|
|
|
[fxarithmetic-shift-left C fx]
|
|
|
|
[fxarithmetic-shift-right C fx]
|
2007-09-15 23:42:43 -04:00
|
|
|
[fxbit-count S fx]
|
|
|
|
[fxbit-field S fx]
|
|
|
|
[fxbit-set? S fx]
|
|
|
|
[fxcopy-bit S fx]
|
|
|
|
[fxcopy-bit-field S fx]
|
|
|
|
[fxdiv S fx]
|
|
|
|
[fxdiv-and-mod S fx]
|
|
|
|
[fxdiv0 S fx]
|
|
|
|
[fxdiv0-and-mod0 S fx]
|
2007-09-13 19:25:47 -04:00
|
|
|
[fxeven? C fx]
|
2007-09-15 23:42:43 -04:00
|
|
|
[fxfirst-bit-set S fx]
|
2007-09-15 03:27:28 -04:00
|
|
|
[fxif C fx]
|
2007-09-13 19:25:47 -04:00
|
|
|
[fxior C fx]
|
2007-09-15 23:42:43 -04:00
|
|
|
[fxlength S fx]
|
2007-09-15 00:24:38 -04:00
|
|
|
[fxmax C fx]
|
|
|
|
[fxmin C fx]
|
2007-09-15 23:42:43 -04:00
|
|
|
[fxmod S fx]
|
|
|
|
[fxmod0 S fx]
|
2007-09-13 19:25:47 -04:00
|
|
|
[fxnegative? C fx]
|
|
|
|
[fxnot C fx]
|
|
|
|
[fxodd? C fx]
|
|
|
|
[fxpositive? C fx]
|
2007-09-15 23:42:43 -04:00
|
|
|
[fxreverse-bit-field S fx]
|
|
|
|
[fxrotate-bit-field S fx]
|
2007-09-13 19:25:47 -04:00
|
|
|
[fxxor C fx]
|
2007-09-13 16:39:13 -04:00
|
|
|
[fxzero? C fx]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-09-02 21:02:06 -04:00
|
|
|
[fixnum->flonum C fl]
|
2007-08-26 18:51:16 -04:00
|
|
|
[fl* C fl]
|
|
|
|
[fl+ C fl]
|
|
|
|
[fl- C fl]
|
|
|
|
[fl/ C fl]
|
|
|
|
[fl<=? C fl]
|
|
|
|
[fl<? C fl]
|
|
|
|
[fl=? C fl]
|
|
|
|
[fl>=? C fl]
|
|
|
|
[fl>? C fl]
|
|
|
|
[flabs C fl]
|
2007-09-02 21:16:54 -04:00
|
|
|
[flacos C fl]
|
|
|
|
[flasin C fl]
|
|
|
|
[flatan C fl]
|
2007-09-10 23:17:06 -04:00
|
|
|
[flceiling C fl]
|
2007-09-02 21:16:54 -04:00
|
|
|
[flcos C fl]
|
2007-09-10 23:30:17 -04:00
|
|
|
[fldenominator C fl]
|
2007-09-10 23:36:36 -04:00
|
|
|
[fldiv D fl]
|
|
|
|
[fldiv-and-mod D fl]
|
|
|
|
[fldiv0 D fl]
|
|
|
|
[fldiv0-and-mod0 D fl]
|
2007-09-10 22:45:41 -04:00
|
|
|
[fleven? C fl]
|
2007-09-10 23:36:36 -04:00
|
|
|
[flexp C fl]
|
2007-09-12 03:56:08 -04:00
|
|
|
[flexpt C fl]
|
2007-09-10 22:10:19 -04:00
|
|
|
[flfinite? C fl]
|
2007-09-10 23:17:06 -04:00
|
|
|
[flfloor C fl]
|
2007-09-10 22:10:19 -04:00
|
|
|
[flinfinite? C fl]
|
|
|
|
[flinteger? C fl]
|
2007-09-11 00:13:10 -04:00
|
|
|
[fllog C fl]
|
2007-08-26 18:51:16 -04:00
|
|
|
[flmax C fl]
|
|
|
|
[flmin C fl]
|
2007-09-10 23:36:36 -04:00
|
|
|
[flmod D fl]
|
|
|
|
[flmod0 D fl]
|
2007-09-10 22:10:19 -04:00
|
|
|
[flnan? C fl]
|
|
|
|
[flnegative? C fl]
|
2007-09-10 23:30:17 -04:00
|
|
|
[flnumerator C fl]
|
2007-09-10 22:45:41 -04:00
|
|
|
[flodd? C fl]
|
2007-09-10 20:47:17 -04:00
|
|
|
[flonum? C fl]
|
2007-09-10 22:10:19 -04:00
|
|
|
[flpositive? C fl]
|
2007-08-26 18:51:16 -04:00
|
|
|
[flround C fl]
|
2007-09-02 21:16:54 -04:00
|
|
|
[flsin C fl]
|
2007-09-11 00:13:10 -04:00
|
|
|
[flsqrt C fl]
|
2007-09-02 21:16:54 -04:00
|
|
|
[fltan C fl]
|
2007-09-11 00:22:23 -04:00
|
|
|
[fltruncate C fl]
|
2007-08-26 18:51:16 -04:00
|
|
|
[flzero? C fl]
|
|
|
|
[real->flonum D fl]
|
2007-10-23 17:40:04 -04:00
|
|
|
[make-no-infinities-violation C fl]
|
|
|
|
[make-no-nans-violation C fl]
|
|
|
|
[&no-infinities C fl]
|
|
|
|
[no-infinities-violation? C fl]
|
|
|
|
[&no-nans C fl]
|
|
|
|
[no-nans-violation? C fl]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-08-26 18:51:16 -04:00
|
|
|
[bytevector->sint-list C bv]
|
|
|
|
[bytevector->u8-list C bv]
|
|
|
|
[bytevector->uint-list C bv]
|
|
|
|
[bytevector-copy C bv]
|
|
|
|
[bytevector-copy! C bv]
|
|
|
|
[bytevector-fill! C bv]
|
|
|
|
[bytevector-ieee-double-native-ref S bv]
|
|
|
|
[bytevector-ieee-double-native-set! S bv]
|
|
|
|
[bytevector-ieee-double-ref S bv]
|
|
|
|
[bytevector-ieee-single-native-ref S bv]
|
|
|
|
[bytevector-ieee-single-native-set! S bv]
|
|
|
|
[bytevector-ieee-single-ref S bv]
|
|
|
|
[bytevector-length C bv]
|
2007-09-10 14:24:35 -04:00
|
|
|
[bytevector-s16-native-ref C bv]
|
2007-09-10 14:58:37 -04:00
|
|
|
[bytevector-s16-native-set! C bv]
|
2007-09-10 14:24:35 -04:00
|
|
|
[bytevector-s16-ref C bv]
|
2007-09-10 14:58:37 -04:00
|
|
|
[bytevector-s16-set! C bv]
|
2007-09-13 01:57:36 -04:00
|
|
|
[bytevector-s32-native-ref C bv]
|
|
|
|
[bytevector-s32-native-set! C bv]
|
2007-09-13 01:44:10 -04:00
|
|
|
[bytevector-s32-ref C bv]
|
|
|
|
[bytevector-s32-set! C bv]
|
2007-08-26 18:51:16 -04:00
|
|
|
[bytevector-s64-native-ref S bv]
|
|
|
|
[bytevector-s64-native-set! S bv]
|
|
|
|
[bytevector-s64-ref S bv]
|
|
|
|
[bytevector-s64-set! S bv]
|
|
|
|
[bytevector-s8-ref C bv]
|
|
|
|
[bytevector-s8-set! C bv]
|
|
|
|
[bytevector-sint-ref C bv]
|
|
|
|
[bytevector-sint-set! C bv]
|
2007-09-10 14:10:37 -04:00
|
|
|
[bytevector-u16-native-ref C bv]
|
2007-09-10 14:47:29 -04:00
|
|
|
[bytevector-u16-native-set! C bv]
|
2007-09-10 14:10:37 -04:00
|
|
|
[bytevector-u16-ref C bv]
|
2007-09-10 14:58:37 -04:00
|
|
|
[bytevector-u16-set! C bv]
|
2007-09-13 01:57:36 -04:00
|
|
|
[bytevector-u32-native-ref C bv]
|
|
|
|
[bytevector-u32-native-set! C bv]
|
2007-09-13 01:44:10 -04:00
|
|
|
[bytevector-u32-ref C bv]
|
|
|
|
[bytevector-u32-set! C bv]
|
2007-08-26 18:51:16 -04:00
|
|
|
[bytevector-u64-native-ref S bv]
|
|
|
|
[bytevector-u64-native-set! S bv]
|
|
|
|
[bytevector-u64-ref S bv]
|
|
|
|
[bytevector-u64-set! S bv]
|
|
|
|
[bytevector-u8-ref C bv]
|
|
|
|
[bytevector-u8-set! C bv]
|
|
|
|
[bytevector-uint-ref C bv]
|
|
|
|
[bytevector-uint-set! C bv]
|
|
|
|
[bytevector=? C bv]
|
|
|
|
[bytevector? C bv]
|
2007-09-10 15:15:20 -04:00
|
|
|
[endianness C bv]
|
|
|
|
[native-endianness C bv]
|
2007-08-26 18:51:16 -04:00
|
|
|
[sint-list->bytevector C bv]
|
|
|
|
[string->utf16 S bv]
|
|
|
|
[string->utf32 S bv]
|
2007-10-12 00:33:19 -04:00
|
|
|
[string->utf8 C bv]
|
2007-08-26 18:51:16 -04:00
|
|
|
[u8-list->bytevector C bv]
|
|
|
|
[uint-list->bytevector C bv]
|
2007-10-12 00:33:19 -04:00
|
|
|
[utf8->string C bv]
|
2007-08-26 18:51:16 -04:00
|
|
|
[utf16->string S bv]
|
|
|
|
[utf32->string S bv]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-10-23 17:40:04 -04:00
|
|
|
[condition? C co]
|
|
|
|
[&assertion C co]
|
|
|
|
[assertion-violation? C co]
|
|
|
|
[&condition C co]
|
|
|
|
[condition C co]
|
|
|
|
[condition-accessor C co]
|
|
|
|
[condition-irritants C co]
|
|
|
|
[condition-message C co]
|
|
|
|
[condition-predicate C co]
|
|
|
|
[condition-who C co]
|
2007-10-23 17:53:43 -04:00
|
|
|
[define-condition-type C co]
|
2007-10-23 17:40:04 -04:00
|
|
|
[&error C co]
|
|
|
|
[error? C co]
|
|
|
|
[&implementation-restriction C co]
|
|
|
|
[implementation-restriction-violation? C co]
|
|
|
|
[&irritants C co]
|
|
|
|
[irritants-condition? C co]
|
|
|
|
[&lexical C co]
|
|
|
|
[lexical-violation? C co]
|
|
|
|
[make-assertion-violation C co]
|
|
|
|
[make-error C co]
|
|
|
|
[make-implementation-restriction-violation C co]
|
|
|
|
[make-irritants-condition C co]
|
|
|
|
[make-lexical-violation C co]
|
|
|
|
[make-message-condition C co]
|
|
|
|
[make-non-continuable-violation C co]
|
|
|
|
[make-serious-condition C co]
|
|
|
|
[make-syntax-violation C co]
|
|
|
|
[make-undefined-violation C co]
|
|
|
|
[make-violation C co]
|
|
|
|
[make-warning C co]
|
|
|
|
[make-who-condition C co]
|
|
|
|
[&message C co]
|
|
|
|
[message-condition? C co]
|
|
|
|
[&non-continuable C co]
|
|
|
|
[non-continuable-violation? C co]
|
|
|
|
[&serious C co]
|
|
|
|
[serious-condition? C co]
|
|
|
|
[simple-conditions C co]
|
|
|
|
[&syntax C co]
|
|
|
|
[syntax-violation C co sc]
|
|
|
|
[syntax-violation-form C co]
|
|
|
|
[syntax-violation-subform C co]
|
|
|
|
[syntax-violation? C co]
|
|
|
|
[&undefined C co]
|
|
|
|
[undefined-violation? C co]
|
|
|
|
[&violation C co]
|
|
|
|
[violation? C co]
|
|
|
|
[&warning C co]
|
|
|
|
[warning? C co]
|
|
|
|
[&who C co]
|
|
|
|
[who-condition? C co]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-08-26 18:51:16 -04:00
|
|
|
[case-lambda C ct]
|
2007-08-30 17:25:29 -04:00
|
|
|
[do C ct se ne]
|
2007-08-26 18:51:16 -04:00
|
|
|
[unless C ct]
|
|
|
|
[when C ct]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-10-27 11:40:40 -04:00
|
|
|
[define-enumeration C en]
|
2007-10-27 11:15:10 -04:00
|
|
|
[enum-set->list C en]
|
|
|
|
[enum-set-complement C en]
|
|
|
|
[enum-set-constructor C en]
|
|
|
|
[enum-set-difference C en]
|
|
|
|
[enum-set-indexer C en]
|
|
|
|
[enum-set-intersection C en]
|
|
|
|
[enum-set-member? C en]
|
|
|
|
[enum-set-projection C en]
|
|
|
|
[enum-set-subset? C en]
|
|
|
|
[enum-set-union C en]
|
|
|
|
[enum-set-universe C en]
|
|
|
|
[enum-set=? C en]
|
|
|
|
[make-enumeration C en]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-08-26 18:51:16 -04:00
|
|
|
[environment C ev]
|
2007-08-30 17:25:29 -04:00
|
|
|
[eval C ev se]
|
|
|
|
;;;
|
2007-10-23 23:34:11 -04:00
|
|
|
[raise C ex]
|
|
|
|
[raise-continuable C ex]
|
|
|
|
[with-exception-handler C ex]
|
2007-10-26 00:55:00 -04:00
|
|
|
[guard C ex]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-10-11 21:28:08 -04:00
|
|
|
[binary-port? S ip]
|
2007-10-11 23:21:55 -04:00
|
|
|
[buffer-mode C ip]
|
|
|
|
[buffer-mode? C ip]
|
2007-10-11 21:28:08 -04:00
|
|
|
[bytevector->string S ip]
|
|
|
|
[call-with-bytevector-output-port S ip]
|
|
|
|
[call-with-port S ip]
|
|
|
|
[call-with-string-output-port S ip]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
|
|
|
[assoc C ls se]
|
2007-09-10 15:56:15 -04:00
|
|
|
[assp C ls]
|
2007-08-30 17:25:29 -04:00
|
|
|
[assq C ls se]
|
|
|
|
[assv C ls se]
|
2007-09-09 23:50:55 -04:00
|
|
|
[cons* C ls]
|
2007-09-10 17:03:40 -04:00
|
|
|
[filter C ls]
|
2007-09-10 17:09:19 -04:00
|
|
|
[find C ls]
|
2007-10-10 06:43:25 -04:00
|
|
|
[fold-left C ls]
|
|
|
|
[fold-right C ls]
|
2007-10-10 03:53:42 -04:00
|
|
|
[for-all C ls]
|
|
|
|
[exists C ls]
|
2007-08-30 17:25:29 -04:00
|
|
|
[member C ls se]
|
2007-09-10 15:56:15 -04:00
|
|
|
[memp C ls]
|
2007-08-30 17:25:29 -04:00
|
|
|
[memq C ls se]
|
|
|
|
[memv C ls se]
|
2007-09-10 17:28:06 -04:00
|
|
|
[partition C ls]
|
2007-09-10 16:33:05 -04:00
|
|
|
[remq C ls]
|
2007-09-10 17:03:40 -04:00
|
|
|
[remp C ls]
|
|
|
|
[remv C ls]
|
|
|
|
[remove C ls]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
|
|
|
[set-car! C mp se]
|
|
|
|
[set-cdr! C mp se]
|
|
|
|
;;;
|
|
|
|
[string-set! C ms se]
|
2007-09-02 02:22:23 -04:00
|
|
|
[string-fill! C ms se]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-08-26 21:24:22 -04:00
|
|
|
[command-line C pr]
|
|
|
|
[exit C pr]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-09-02 02:47:50 -04:00
|
|
|
[delay C r5 se ne]
|
2007-08-30 17:25:29 -04:00
|
|
|
[exact->inexact C r5 se]
|
2007-09-02 02:47:50 -04:00
|
|
|
[force C r5 se]
|
2007-08-30 17:25:29 -04:00
|
|
|
[inexact->exact C r5 se]
|
|
|
|
[modulo C r5 se]
|
|
|
|
[remainder C r5 se]
|
2007-09-02 03:09:29 -04:00
|
|
|
[null-environment C r5 se]
|
2007-08-30 17:25:29 -04:00
|
|
|
[quotient C r5 se]
|
2007-09-15 00:14:47 -04:00
|
|
|
[scheme-report-environment C r5 se]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-10-11 21:28:08 -04:00
|
|
|
[close-port S ip]
|
2007-10-11 21:47:11 -04:00
|
|
|
[eol-style C ip]
|
2007-10-11 21:51:15 -04:00
|
|
|
[error-handling-mode C ip]
|
2007-10-11 23:43:25 -04:00
|
|
|
[file-options C ip]
|
2007-10-11 21:28:08 -04:00
|
|
|
[flush-output-port S ip]
|
|
|
|
[get-bytevector-all S ip]
|
|
|
|
[get-bytevector-n S ip]
|
|
|
|
[get-bytevector-n! S ip]
|
|
|
|
[get-bytevector-some S ip]
|
|
|
|
[get-char S ip]
|
|
|
|
[get-datum S ip]
|
|
|
|
[get-line S ip]
|
|
|
|
[get-string-all S ip]
|
|
|
|
[get-string-n S ip]
|
|
|
|
[get-string-n! S ip]
|
|
|
|
[get-u8 S ip]
|
2007-10-23 17:40:04 -04:00
|
|
|
[&i/o C ip is fi]
|
|
|
|
[&i/o-decoding C ip]
|
|
|
|
[i/o-decoding-error? C ip]
|
|
|
|
[&i/o-encoding C ip]
|
|
|
|
[i/o-encoding-error-char C ip]
|
|
|
|
[i/o-encoding-error? C ip]
|
|
|
|
[i/o-error-filename C ip is fi]
|
|
|
|
[i/o-error-port C ip is fi]
|
|
|
|
[i/o-error? C ip is fi]
|
|
|
|
[&i/o-file-already-exists C ip is fi]
|
|
|
|
[i/o-file-already-exists-error? C ip is fi]
|
|
|
|
[&i/o-file-does-not-exist C ip is fi]
|
|
|
|
[i/o-file-does-not-exist-error? C ip is fi]
|
|
|
|
[&i/o-file-is-read-only C ip is fi]
|
|
|
|
[i/o-file-is-read-only-error? C ip is fi]
|
|
|
|
[&i/o-file-protection C ip is fi]
|
|
|
|
[i/o-file-protection-error? C ip is fi]
|
|
|
|
[&i/o-filename C ip is fi]
|
|
|
|
[i/o-filename-error? C ip is fi]
|
|
|
|
[&i/o-invalid-position C ip is fi]
|
|
|
|
[i/o-invalid-position-error? C ip is fi]
|
|
|
|
[&i/o-port C ip is fi]
|
|
|
|
[i/o-port-error? C ip is fi]
|
|
|
|
[&i/o-read C ip is fi]
|
|
|
|
[i/o-read-error? C ip is fi]
|
|
|
|
[&i/o-write C ip is fi]
|
|
|
|
[i/o-write-error? C ip is fi]
|
2007-10-11 21:28:08 -04:00
|
|
|
[lookahead-char S ip]
|
|
|
|
[lookahead-u8 S ip]
|
2007-09-04 01:40:31 -04:00
|
|
|
[make-bytevector C bv]
|
2007-10-11 21:28:08 -04:00
|
|
|
[make-custom-binary-input-port S ip]
|
2007-08-26 18:51:16 -04:00
|
|
|
[make-custom-binary-input/output-port D ip]
|
2007-10-11 21:28:08 -04:00
|
|
|
[make-custom-binary-output-port S ip]
|
|
|
|
[make-custom-textual-input-port S ip]
|
2007-08-26 18:51:16 -04:00
|
|
|
[make-custom-textual-input/output-port D ip]
|
2007-10-11 21:28:08 -04:00
|
|
|
[make-custom-textual-output-port S ip]
|
2007-10-23 17:40:04 -04:00
|
|
|
|
|
|
|
[make-i/o-decoding-error C ip]
|
|
|
|
[make-i/o-encoding-error C ip]
|
|
|
|
[make-i/o-error C ip is fi]
|
|
|
|
[make-i/o-file-already-exists-error C ip is fi]
|
|
|
|
[make-i/o-file-does-not-exist-error C ip is fi]
|
|
|
|
[make-i/o-file-is-read-only-error C ip is fi]
|
|
|
|
[make-i/o-file-protection-error C ip is fi]
|
|
|
|
[make-i/o-filename-error C ip is fi]
|
|
|
|
[make-i/o-invalid-position-error C ip is fi]
|
|
|
|
[make-i/o-port-error C ip is fi]
|
|
|
|
[make-i/o-read-error C ip is fi]
|
|
|
|
[make-i/o-write-error C ip is fi]
|
2007-10-11 21:28:08 -04:00
|
|
|
[latin-1-codec C ip]
|
2007-10-11 22:55:20 -04:00
|
|
|
[make-transcoder C ip]
|
2007-10-11 21:47:11 -04:00
|
|
|
[native-eol-style C ip]
|
2007-10-11 22:55:20 -04:00
|
|
|
[native-transcoder C ip]
|
2007-10-11 21:28:08 -04:00
|
|
|
[open-bytevector-input-port S ip]
|
|
|
|
[open-bytevector-output-port S ip]
|
|
|
|
[open-file-input-port S ip]
|
2007-08-26 18:51:16 -04:00
|
|
|
[open-file-input/output-port D ip]
|
2007-10-11 21:28:08 -04:00
|
|
|
[open-file-output-port S ip]
|
|
|
|
[open-string-input-port S ip]
|
|
|
|
[open-string-output-port S ip]
|
|
|
|
[output-port-buffer-mode S ip]
|
|
|
|
[port-eof? S ip]
|
|
|
|
[port-has-port-position? S ip]
|
|
|
|
[port-has-set-port-position!? S ip]
|
|
|
|
[port-position S ip]
|
|
|
|
[port-transcoder S ip]
|
|
|
|
[port? S ip]
|
|
|
|
[put-bytevector S ip]
|
|
|
|
[put-char S ip]
|
|
|
|
[put-datum S ip]
|
|
|
|
[put-string S ip]
|
|
|
|
[put-u8 S ip]
|
|
|
|
[set-port-position! S ip]
|
|
|
|
[standard-error-port S ip]
|
|
|
|
[standard-input-port S ip]
|
|
|
|
[standard-output-port S ip]
|
|
|
|
[string->bytevector S ip]
|
|
|
|
[textual-port? S ip]
|
|
|
|
[transcoded-port S ip]
|
2007-10-12 00:00:36 -04:00
|
|
|
[transcoder-codec C ip]
|
|
|
|
[transcoder-eol-style C ip]
|
|
|
|
[transcoder-error-handling-mode C ip]
|
2007-10-11 21:28:08 -04:00
|
|
|
[utf-16-codec C ip]
|
|
|
|
[utf-8-codec C ip]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
|
|
|
[input-port? C is ip se]
|
|
|
|
[output-port? C is ip se]
|
|
|
|
[current-input-port C ip is se]
|
|
|
|
[current-output-port C ip is se]
|
2007-08-26 18:51:16 -04:00
|
|
|
[current-error-port C ip is]
|
2007-08-30 17:25:29 -04:00
|
|
|
[eof-object C ip is se]
|
2007-08-26 18:51:16 -04:00
|
|
|
[eof-object? C ip is]
|
2007-08-30 17:25:29 -04:00
|
|
|
[close-input-port C is se]
|
|
|
|
[close-output-port C is se]
|
|
|
|
[display C is se]
|
|
|
|
[newline C is se]
|
|
|
|
[open-input-file C is se]
|
|
|
|
[open-output-file C is se]
|
|
|
|
[peek-char C is se]
|
|
|
|
[read C is se]
|
|
|
|
[read-char C is se]
|
|
|
|
[with-input-from-file C is se]
|
|
|
|
[with-output-to-file C is se]
|
|
|
|
[write C is se]
|
|
|
|
[write-char C is se]
|
|
|
|
[call-with-input-file C is se]
|
|
|
|
[call-with-output-file C is se]
|
|
|
|
;;;
|
2007-10-10 08:24:12 -04:00
|
|
|
[hashtable-clear! C ht]
|
2007-10-10 07:36:19 -04:00
|
|
|
[hashtable-contains? C ht]
|
2007-08-26 18:51:16 -04:00
|
|
|
[hashtable-copy S ht]
|
2007-10-10 07:36:19 -04:00
|
|
|
[hashtable-delete! C ht]
|
2007-08-26 18:51:16 -04:00
|
|
|
[hashtable-entries S ht]
|
2007-10-10 08:24:12 -04:00
|
|
|
[hashtable-keys C ht]
|
|
|
|
[hashtable-mutable? C ht]
|
2007-10-10 07:36:19 -04:00
|
|
|
[hashtable-ref C ht]
|
|
|
|
[hashtable-set! C ht]
|
|
|
|
[hashtable-size C ht]
|
|
|
|
[hashtable-update! C ht]
|
|
|
|
[hashtable? C ht]
|
2007-10-10 07:09:18 -04:00
|
|
|
[make-eq-hashtable C ht]
|
2007-08-26 18:51:16 -04:00
|
|
|
[make-eqv-hashtable S ht]
|
2007-08-26 20:04:00 -04:00
|
|
|
[hashtable-hash-function D ht]
|
|
|
|
[make-hashtable D ht]
|
|
|
|
[hashtable-equivalence-function D ht]
|
2007-08-26 18:51:16 -04:00
|
|
|
[equal-hash D ht]
|
|
|
|
[string-hash D ht]
|
|
|
|
[string-ci-hash D ht]
|
|
|
|
[symbol-hash D ht]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-09-04 12:56:40 -04:00
|
|
|
[list-sort C sr]
|
|
|
|
[vector-sort C sr]
|
2007-09-09 23:58:00 -04:00
|
|
|
[vector-sort! C sr]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-08-26 18:51:16 -04:00
|
|
|
[file-exists? C fi]
|
2007-08-26 20:04:00 -04:00
|
|
|
[delete-file C fi]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-10-23 17:40:04 -04:00
|
|
|
[define-record-type C rs]
|
2007-10-12 00:59:16 -04:00
|
|
|
[fields C rs]
|
|
|
|
[immutable C rs]
|
|
|
|
[mutable C rs]
|
|
|
|
[opaque C rs]
|
|
|
|
[parent C rs]
|
|
|
|
[parent-rtd C rs]
|
|
|
|
[protocol C rs]
|
2007-10-14 16:37:55 -04:00
|
|
|
[record-constructor-descriptor C rs]
|
|
|
|
[record-type-descriptor C rs]
|
2007-10-12 00:59:16 -04:00
|
|
|
[sealed C rs]
|
|
|
|
[nongenerative C rs]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-10-12 04:01:11 -04:00
|
|
|
[record-field-mutable? C ri]
|
|
|
|
[record-rtd C ri]
|
|
|
|
[record-type-field-names C ri]
|
|
|
|
[record-type-generative? C ri]
|
|
|
|
[record-type-name C ri]
|
|
|
|
[record-type-opaque? C ri]
|
|
|
|
[record-type-parent C ri]
|
|
|
|
[record-type-sealed? C ri]
|
|
|
|
[record-type-uid C ri]
|
|
|
|
[record? C ri]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-10-12 04:01:11 -04:00
|
|
|
[make-record-constructor-descriptor C rp]
|
|
|
|
[make-record-type-descriptor C rp]
|
|
|
|
[record-accessor C rp]
|
|
|
|
[record-constructor C rp]
|
|
|
|
[record-mutator C rp]
|
|
|
|
[record-predicate C rp]
|
|
|
|
[record-type-descriptor? C rp]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-08-26 18:51:16 -04:00
|
|
|
[bound-identifier=? C sc]
|
|
|
|
[datum->syntax C sc]
|
|
|
|
[syntax C sc]
|
|
|
|
[syntax->datum C sc]
|
|
|
|
[syntax-case C sc]
|
2007-09-02 02:03:29 -04:00
|
|
|
[unsyntax C sc]
|
|
|
|
[unsyntax-splicing C sc]
|
|
|
|
[quasisyntax C sc]
|
2007-08-26 18:51:16 -04:00
|
|
|
[with-syntax C sc]
|
|
|
|
[free-identifier=? C sc]
|
|
|
|
[generate-temporaries C sc]
|
|
|
|
[identifier? C sc]
|
2007-09-02 02:03:29 -04:00
|
|
|
[make-variable-transformer C sc]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
2007-09-13 06:27:31 -04:00
|
|
|
[char-alphabetic? C uc se]
|
2007-08-30 17:25:29 -04:00
|
|
|
[char-ci<=? C uc se]
|
|
|
|
[char-ci<? C uc se]
|
|
|
|
[char-ci=? C uc se]
|
|
|
|
[char-ci>=? C uc se]
|
|
|
|
[char-ci>? C uc se]
|
|
|
|
[char-downcase C uc se]
|
2007-08-26 18:51:16 -04:00
|
|
|
[char-foldcase C uc]
|
|
|
|
[char-titlecase C uc]
|
2007-08-30 17:25:29 -04:00
|
|
|
[char-upcase C uc se]
|
2007-09-03 04:42:46 -04:00
|
|
|
[char-general-category C uc]
|
2007-09-13 06:27:31 -04:00
|
|
|
[char-lower-case? C uc se]
|
|
|
|
[char-numeric? C uc se]
|
|
|
|
[char-title-case? C uc]
|
|
|
|
[char-upper-case? C uc se]
|
2007-08-30 17:25:29 -04:00
|
|
|
[char-whitespace? C uc se]
|
2007-09-03 00:17:15 -04:00
|
|
|
[string-ci<=? C uc se]
|
|
|
|
[string-ci<? C uc se]
|
|
|
|
[string-ci=? C uc se]
|
|
|
|
[string-ci>=? C uc se]
|
|
|
|
[string-ci>? C uc se]
|
2007-08-26 18:51:16 -04:00
|
|
|
[string-downcase S uc]
|
|
|
|
[string-foldcase S uc]
|
|
|
|
[string-normalize-nfc S uc]
|
|
|
|
[string-normalize-nfd S uc]
|
|
|
|
[string-normalize-nfkc S uc]
|
|
|
|
[string-normalize-nfkd S uc]
|
|
|
|
[string-titlecase S uc]
|
|
|
|
[string-upcase S uc]
|
2007-08-30 17:25:29 -04:00
|
|
|
;;;
|
|
|
|
[char-ready? D ]
|
|
|
|
[interaction-environment D ]
|
|
|
|
[load D ]
|
|
|
|
;;;
|
2007-08-26 18:51:16 -04:00
|
|
|
))
|
2007-08-26 14:03:25 -04:00
|
|
|
|
2007-08-26 20:04:00 -04:00
|
|
|
|
|
|
|
(define (no-dups ls)
|
|
|
|
(unless (null? ls)
|
|
|
|
(when (memq (car ls) (cdr ls))
|
2007-10-25 14:32:26 -04:00
|
|
|
(error #f "duplicate identifier" (car ls)))
|
2007-08-26 20:04:00 -04:00
|
|
|
(no-dups (cdr ls))))
|
|
|
|
|
|
|
|
(define (assert-id x)
|
2007-08-30 17:25:29 -04:00
|
|
|
(unless (and (>= (length x) 2)
|
2007-08-26 20:04:00 -04:00
|
|
|
(let ([name (car x)]
|
|
|
|
[status (cadr x)]
|
|
|
|
[libs (cddr x)])
|
|
|
|
(no-dups libs)
|
|
|
|
(and (assq status status-names)
|
|
|
|
(andmap (lambda (x)
|
|
|
|
(assq x library-names))
|
|
|
|
libs))))
|
2007-10-25 14:32:26 -04:00
|
|
|
(error #f "invalid identifier" x)))
|
2007-08-26 20:04:00 -04:00
|
|
|
|
|
|
|
|
|
|
|
(define (filter* ls)
|
|
|
|
(filter
|
|
|
|
(lambda (x)
|
|
|
|
(not (null? (filter
|
|
|
|
(lambda (x)
|
|
|
|
(memq x ls))
|
|
|
|
(cdr x)))))
|
|
|
|
identifier-names))
|
|
|
|
|
|
|
|
(define (count-status x)
|
|
|
|
(length (filter* (list x))))
|
|
|
|
|
2007-08-26 21:24:22 -04:00
|
|
|
(define (join s ls)
|
|
|
|
(cond
|
|
|
|
[(null? ls) ""]
|
|
|
|
[(null? (cdr ls)) (format "~a" (car ls))]
|
|
|
|
[else
|
|
|
|
(format "~a~a~a" (car ls) s (join s (cdr ls)))]))
|
|
|
|
|
|
|
|
(define (status-str x)
|
|
|
|
(cond
|
|
|
|
[(assq x identifier-names)
|
|
|
|
=>
|
|
|
|
(lambda (x)
|
|
|
|
(let ([st (cadr x)] [libs (cddr x)])
|
|
|
|
(format "(~a ~a)" st (join "," libs))))]
|
2007-10-25 14:32:26 -04:00
|
|
|
[else (error #f "invalid identifier" x)]))
|
2007-08-26 21:24:22 -04:00
|
|
|
|
2007-08-26 20:04:00 -04:00
|
|
|
(define (print-ids ls)
|
|
|
|
(define (split ls n)
|
|
|
|
(cond
|
|
|
|
[(null? ls) (values '() '())]
|
2007-08-26 21:24:22 -04:00
|
|
|
[(> (string-length (car ls)) n)
|
2007-08-26 20:04:00 -04:00
|
|
|
(values '() ls)]
|
|
|
|
[else
|
|
|
|
(let-values ([(fst rest)
|
|
|
|
(split (cdr ls)
|
|
|
|
(- n
|
2007-08-26 21:24:22 -04:00
|
|
|
(string-length (car ls))))])
|
2007-08-26 20:04:00 -04:00
|
|
|
(values (cons (car ls) fst) rest))]))
|
2007-08-26 21:24:22 -04:00
|
|
|
(define (print-ids ls)
|
|
|
|
(unless (null? ls)
|
|
|
|
(let-values ([(ls rest)
|
|
|
|
(split ls 80)])
|
|
|
|
(for-each display ls)
|
|
|
|
(newline)
|
|
|
|
(print-ids rest))))
|
|
|
|
(print-ids
|
|
|
|
(map (lambda (x) (format "~s ~a " x (status-str x))) ls)))
|
|
|
|
|
|
|
|
|
|
|
|
(define (split p ls)
|
|
|
|
(cond
|
|
|
|
[(null? ls) (values '() '())]
|
|
|
|
[else
|
|
|
|
(let-values ([(ls1 ls2)
|
|
|
|
(split p (cdr ls))])
|
|
|
|
(if (p (car ls))
|
|
|
|
(values (cons (car ls) ls1) ls2)
|
|
|
|
(values ls1 (cons (car ls) ls2))))]))
|
|
|
|
|
|
|
|
(define (null-intersection? ls1 ls2)
|
|
|
|
(cond
|
|
|
|
[(null? ls1) #t]
|
|
|
|
[(memq (car ls1) ls2) #f]
|
|
|
|
[else (null-intersection? (cdr ls1) ls2)]))
|
2007-08-26 20:04:00 -04:00
|
|
|
|
2007-08-28 11:11:12 -04:00
|
|
|
|
|
|
|
(define (library-info lib)
|
|
|
|
(let ([inf (map (lambda (x) (cons (car x) 0)) status-names)])
|
|
|
|
(for-each
|
|
|
|
(lambda (x)
|
|
|
|
(let ([s (cadr x)]
|
|
|
|
[l* (cddr x)])
|
|
|
|
(cond
|
|
|
|
[(and (memq lib l*) (assq s inf)) =>
|
|
|
|
(lambda (x)
|
|
|
|
(set-cdr! x (add1 (cdr x))))])))
|
|
|
|
identifier-names)
|
|
|
|
(join " "
|
|
|
|
(map (lambda (x)
|
|
|
|
(format "~a=~a" (car x) (cdr x)))
|
|
|
|
(filter
|
|
|
|
(lambda (x)
|
|
|
|
(not (zero? (cdr x))))
|
|
|
|
inf)))))
|
|
|
|
|
2007-08-26 20:04:00 -04:00
|
|
|
(no-dups (map car identifier-names))
|
|
|
|
(no-dups (map car library-names))
|
|
|
|
(no-dups (map car status-names))
|
|
|
|
(for-each assert-id identifier-names)
|
|
|
|
|
|
|
|
|
|
|
|
(let ([args (cdr (command-line-arguments))]
|
|
|
|
[exe (car (command-line-arguments))])
|
|
|
|
(cond
|
|
|
|
[(null? args)
|
|
|
|
(printf "usage: ~a (<status>|<libname>)*\n\n" exe)
|
|
|
|
(printf "Library Names:\n")
|
|
|
|
(for-each
|
|
|
|
(lambda (x)
|
2007-08-28 11:11:12 -04:00
|
|
|
(printf " ~a ~a ~a\n" (car x) (cadr x)
|
|
|
|
(library-info (car x))))
|
2007-08-26 20:04:00 -04:00
|
|
|
library-names)
|
|
|
|
(printf "Status Codes:\n")
|
|
|
|
(for-each
|
|
|
|
(lambda (x)
|
|
|
|
(printf " ~a ~a (~s ids)\n" (car x) (cadr x)
|
|
|
|
(count-status (car x))))
|
|
|
|
status-names)]
|
|
|
|
[else
|
2007-08-26 21:24:22 -04:00
|
|
|
(let-values ([(s* l*)
|
|
|
|
(split
|
|
|
|
(lambda (x)
|
|
|
|
(cond
|
|
|
|
[(assq x status-names) #t]
|
|
|
|
[(assq x library-names) #f]
|
2007-10-25 14:32:26 -04:00
|
|
|
[else (error #f "invalid argument" x)]))
|
2007-08-26 21:24:22 -04:00
|
|
|
(map string->symbol args))])
|
|
|
|
(let ([ls (filter
|
|
|
|
(lambda (x)
|
|
|
|
(let ([s (cadr x)]
|
|
|
|
[libs (cddr x)])
|
|
|
|
(cond
|
|
|
|
[(null? l*) (memq s s*)]
|
|
|
|
[(null? s*)
|
|
|
|
(not (null-intersection? l* libs))]
|
|
|
|
[else
|
|
|
|
(and (memq s s*)
|
|
|
|
(not (null-intersection? l* libs)))])))
|
|
|
|
identifier-names)])
|
|
|
|
(printf "~s identifiers\n" (length ls))
|
|
|
|
(print-ids (map car ls))))]
|
2007-08-26 20:04:00 -04:00
|
|
|
))
|
|
|
|
|