├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .travis.yml ├── LICENSE ├── Makefile ├── README.md ├── TODO.org ├── benchmarks └── test.js ├── bin └── run.ss ├── src ├── alloc.ss ├── ansi.ss ├── bufferpool.ss ├── hpack.ss ├── http.ss ├── http2.ss ├── inet.ss ├── libuv.ss ├── log.ss ├── openssl.ss ├── tls.ss ├── url.ss ├── utils.ss └── uv.ss ├── test ├── Dockerfile ├── fixtures │ └── nginx │ │ ├── cert.pem │ │ ├── html │ │ └── index.html │ │ ├── key.pem │ │ └── nginx.conf └── test.ss └── vendor ├── irregex-utils.sls ├── irregex.sls └── srfi ├── %3a0.sls ├── %3a0 ├── cond-expand.guile.sls └── cond-expand.sls ├── %3a1.sls ├── %3a1 ├── lists.sls └── srfi-1-reference.scm ├── %3a11.sls ├── %3a11 └── let-values.sls ├── %3a115.sls ├── %3a115 ├── regexp.scm ├── regexp.sls └── regexp │ ├── boundary.scm │ └── boundary.sls ├── %3a117.sls ├── %3a117 ├── list-queues-impl.scm └── list-queues.sls ├── %3a125.sls ├── %3a125 ├── 125.body.scm └── hashtables.sls ├── %3a126.sls ├── %3a126 ├── 126.body.scm ├── helpers │ ├── helpers.chezscheme.sls │ └── helpers.sls └── r6rs-hashtables.sls ├── %3a127.sls ├── %3a127 ├── lazy-sequences.sls └── lseqs-impl.scm ├── %3a128.sls ├── %3a128 ├── 128.body1.scm ├── 128.body2.scm └── comparators.sls ├── %3a129.sls ├── %3a129 ├── titlecase-impl.scm ├── titlecase.sls └── titlemaps.scm ├── %3a13.sls ├── %3a13 ├── srfi-13.scm └── strings.sls ├── %3a130.sls ├── %3a130 ├── 130.body.scm └── string-cursors.sls ├── %3a131.sls ├── %3a131 └── records.sls ├── %3a132.sls ├── %3a132 ├── delndups.scm ├── lmsort.scm ├── median.scm ├── merge.scm ├── select.scm ├── sort.scm ├── sortfaster.scm ├── sorting-test.scm ├── sorting.sls ├── sortp.scm ├── vbinsearch.scm ├── vector-util.scm ├── vhsort.scm ├── visort.scm ├── vmsort.scm ├── vqsort2.scm └── vqsort3.scm ├── %3a133.sls ├── %3a133 ├── vectors-impl.scm ├── vectors.sls └── vectors.sls3a132.sls ├── %3a14.sls ├── %3a14 ├── COPYING ├── char-sets.sls ├── char-sets │ ├── inversion-list-check.scm │ ├── inversion-list.scm │ └── inversion-list.sls ├── srfi-14-base-char-sets.scm ├── srfi-14-char-sets.scm ├── srfi-14-check.scm ├── srfi-14.scm └── unicode-data.scm ├── %3a141.sls ├── %3a141 ├── integer-division.sls └── srfi-141-impl.scm ├── %3a143.sls ├── %3a143 ├── fixnums.sls └── helpers │ ├── helpers.chezscheme.sls │ └── helpers.sls ├── %3a145.sls ├── %3a145 ├── assumptions.chezscheme.sls └── assumptions.sls ├── %3a151.sls ├── %3a151 └── bitwise-operations.sls ├── %3a152.sls ├── %3a152 ├── extend-comparisons.scm ├── macros.scm ├── portable.scm ├── r7rs-shim.scm └── strings.sls ├── %3a156.sls ├── %3a156 ├── predicate-combiners.sls └── srfi-156-impl.scm ├── %3a158.sls ├── %3a158 ├── generators-and-accumulators.sls └── srfi-158-impl.scm ├── %3a16.sls ├── %3a16 └── case-lambda.sls ├── %3a17.sls ├── %3a17 ├── generalized-set!.chezscheme.sls ├── generalized-set%21.chezscheme.sls ├── helpers.chezscheme.sls └── helpers.sls ├── %3a19.sls ├── %3a19 ├── srfi-19-test-suite.scm ├── srfi-19.scm ├── time.sls └── time │ ├── compat.chezscheme.sls │ ├── compat.ikarus.sls │ ├── compat.larceny.sls │ ├── compat.mzscheme.sls │ ├── compat.ypsilon.sls │ └── not-implemented.sls ├── %3a2.sls ├── %3a2 ├── and-let%2a.sls └── and-let*.sls ├── %3a23.sls ├── %3a23 ├── error.sls └── error │ └── tricks.sls ├── %3a25.sls ├── %3a25 ├── arlib.scm ├── array.scm ├── ix-ctor.scm ├── list.scm ├── multi-dimensional-arrays.sls ├── multi-dimensional-arrays │ ├── all.sls │ └── arlib.sls ├── op-ctor.scm └── test.scm ├── %3a26.sls ├── %3a26 ├── check.scm ├── cut.scm └── cut.sls ├── %3a27.sls ├── %3a27 ├── conftest.scm ├── mrg32k3a-a.scm ├── mrg32k3a.scm └── random-bits.sls ├── %3a28.sls ├── %3a28 └── basic-format-strings.sls ├── %3a29.sls ├── %3a29 └── localization.sls ├── %3a31.sls ├── %3a31 └── rec.sls ├── %3a34.sls ├── %3a34 └── exception-handling.sls ├── %3a35.sls ├── %3a35 └── conditions.sls ├── %3a37.sls ├── %3a37 ├── args-fold.sls └── srfi-37-reference.scm ├── %3a38.sls ├── %3a38 ├── with-shared-structure.chezscheme.sls ├── with-shared-structure.ikarus.sls ├── with-shared-structure.larceny.sls └── with-shared-structure.ypsilon.sls ├── %3a39.sls ├── %3a39 ├── parameters.chezscheme.sls ├── parameters.ikarus.sls ├── parameters.mzscheme.sls ├── parameters.sls └── parameters.ypsilon.sls ├── %3a4.sls ├── %3a4 └── numeric-vectors.sls ├── %3a41.sls ├── %3a41 ├── streams.sls └── streams │ ├── derived.sls │ └── primitive.sls ├── %3a42.sls ├── %3a42 ├── eager-comprehensions.sls ├── ec.scm └── examples.scm ├── %3a43.sls ├── %3a43 ├── vector-lib.scm └── vectors.sls ├── %3a45.sls ├── %3a45 └── lazy.sls ├── %3a48.sls ├── %3a48 ├── intermediate-format-strings.sls └── intermediate-format-strings │ ├── compat.chezscheme.sls │ ├── compat.guile.sls │ ├── compat.ikarus.sls │ ├── compat.larceny.sls │ ├── compat.mzscheme.sls │ └── compat.ypsilon.sls ├── %3a5.sls ├── %3a5 └── let.sls ├── %3a51.sls ├── %3a51 ├── rest-values.sls └── srfi-51-impl.scm ├── %3a54.sls ├── %3a54 ├── cat.sls └── srfi-54-impl.scm ├── %3a6.sls ├── %3a6 ├── basic-string-ports.mzscheme.sls ├── basic-string-ports.sls └── basic-string-ports │ ├── compat.chezscheme.sls │ ├── compat.ikarus.sls │ ├── compat.larceny.sls │ └── compat.ypsilon.sls ├── %3a60.sls ├── %3a60 └── integer-bits.sls ├── %3a61.sls ├── %3a61 └── cond.sls ├── %3a64.sls ├── %3a64 ├── srfi-64-test.scm ├── testing.scm └── testing.sls ├── %3a67.sls ├── %3a67 ├── compare-procedures.sls ├── compare.scm └── examples.scm ├── %3a69.sls ├── %3a69 └── basic-hash-tables.sls ├── %3a78.sls ├── %3a78 ├── check.scm ├── examples.scm ├── lightweight-testing.sls └── lightweight-testing │ ├── compat.chezscheme.sls │ ├── compat.guile.sls │ ├── compat.ikarus.sls │ ├── compat.larceny.sls │ ├── compat.mzscheme.sls │ └── compat.ypsilon.sls ├── %3a8.sls ├── %3a8 └── receive.sls ├── %3a9.sls ├── %3a9 └── records.sls ├── %3a98.sls ├── %3a98 ├── os-environment-variables.chezscheme.sls ├── os-environment-variables.ikarus.sls ├── os-environment-variables.larceny.sls ├── os-environment-variables.mzscheme.sls └── os-environment-variables.ypsilon.sls ├── %3a99.sls ├── %3a99 ├── records.sls └── records │ ├── helper.sls │ ├── inspection.larceny.sls │ ├── inspection.sls │ ├── procedural.larceny.sls │ ├── procedural.sls │ ├── syntactic.larceny.sls │ └── syntactic.sls ├── :0 ├── :0.sls ├── :1 ├── :1.sls ├── :11 ├── :11.sls ├── :115 ├── :115.sls ├── :117 ├── :117.sls ├── :125 ├── :125.sls ├── :126 ├── :126.sls ├── :127 ├── :127.sls ├── :128 ├── :128.sls ├── :129 ├── :129.sls ├── :13 ├── :13.sls ├── :130 ├── :130.sls ├── :131 ├── :131.sls ├── :132 ├── :132.sls ├── :133 ├── :133.sls ├── :14 ├── :14.sls ├── :141 ├── :141.sls ├── :143 ├── :143.sls ├── :145 ├── :145.sls ├── :151 ├── :151.sls ├── :152 ├── :152.sls ├── :156 ├── :156.sls ├── :158 ├── :158.sls ├── :16 ├── :16.sls ├── :17 ├── :17.sls ├── :19 ├── :19.sls ├── :2 ├── :2.sls ├── :23 ├── :23.sls ├── :25 ├── :25.sls ├── :26 ├── :26.sls ├── :27 ├── :27.sls ├── :28 ├── :28.sls ├── :29 ├── :29.sls ├── :31 ├── :31.sls ├── :34 ├── :34.sls ├── :35 ├── :35.sls ├── :37 ├── :37.sls ├── :38 ├── :38.sls ├── :39 ├── :39.sls ├── :4 ├── :4.sls ├── :41 ├── :41.sls ├── :42 ├── :42.sls ├── :43 ├── :43.sls ├── :45 ├── :45.sls ├── :48 ├── :48.sls ├── :5 ├── :5.sls ├── :51 ├── :51.sls ├── :54 ├── :54.sls ├── :6 ├── :6.sls ├── :60 ├── :60.sls ├── :61 ├── :61.sls ├── :64 ├── :64.sls ├── :67 ├── :67.sls ├── :69 ├── :69.sls ├── :78 ├── :78.sls ├── :8 ├── :8.sls ├── :9 ├── :9.sls ├── :98 ├── :98.sls ├── :99 ├── :99.sls ├── LICENSE ├── README.md ├── README.upstream ├── compile-all.ikarus.sps ├── link-dirs.chezscheme.sps ├── private ├── OS-id-features.sls ├── check-arg.sls ├── define-values.chezscheme.sls ├── define-values.sls ├── feature-cond.sls ├── helpers.chezscheme.sls ├── helpers.sls ├── include.sls ├── include │ ├── compat.chezscheme.sls │ ├── compat.guile.sls │ ├── compat.ikarus.sls │ ├── compat.larceny.sls │ ├── compat.mzscheme.sls │ └── compat.ypsilon.sls ├── let-opt.sls ├── make-aliased-libraries.sps ├── platform-features.chezscheme.sls ├── platform-features.ikarus.sls ├── platform-features.larceny.sls ├── platform-features.mzscheme.sls ├── platform-features.ypsilon.sls ├── registry.sls └── vanish.sls └── tests ├── and-let%2a.sps ├── and-let*.sps ├── char-sets.sps ├── compare-procedures.sps ├── cut.sps ├── eager-comprehensions.sps ├── intermediate-format-strings.sps ├── lazy.sps ├── lightweight-testing.sps ├── list-queues.sps ├── lists.sps ├── multi-dimensional-arrays--arlib.sps ├── multi-dimensional-arrays.sps ├── os-environment-variables.sps ├── r6rs-hashtables.ikarus.sps ├── r6rs-hashtables.sps ├── random-bits.sps ├── rec.sps ├── records.sps ├── regexp.sps ├── tables-test.ikarus.sps ├── tables-test.sps ├── testing.sps ├── time.sps └── vectors.sps /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Continuous integration 2 | on: [push] 3 | jobs: 4 | ci: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v2 8 | - run: docker build -f test/Dockerfile . 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.ss~ 2 | *.ss#* 3 | .#*.ss 4 | 5 | *.scm~ 6 | *.scm#* 7 | .#*.scm 8 | /.DS_Store 9 | /profile 10 | /profile.html 11 | *.so 12 | /libchezuv.dylib 13 | /fixtures/nginx/nginx.pid 14 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: minimal 2 | services: 3 | - docker 4 | 5 | before_install: 6 | - make docker_image 7 | 8 | script: 9 | - docker run chezuv 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SCHEME := scheme -q 2 | SCHEME_LIB_DIRS := vendor:src:test 3 | 4 | RUN_SCHEME := $(SCHEME) --libdirs $(SCHEME_LIB_DIRS) --debug-on-exception --program 5 | 6 | .PHONY: test docker_image clean 7 | 8 | test: test/fixtures/nginx/cert.pem 9 | @$(RUN_SCHEME) ./test/test.ss 10 | 11 | docker_image: 12 | @docker build ./ -f test/Dockerfile -t chezuv 13 | 14 | server: 15 | @$(RUN_SCHEME) bin/run.ss 16 | 17 | test/fixtures/nginx/key.pem: 18 | @openssl genrsa -out test/fixtures/nginx/key.pem 2048 2> /dev/null 19 | 20 | test/fixtures/nginx/cert.pem: test/fixtures/nginx/key.pem 21 | @openssl req -new -x509 -key test/fixtures/nginx/key.pem -out fixtures/nginx/cert.pem -days 3650 -subj="/C=CA/ST=Ottawa/L=Ottawa/O=Foobar/OU=Foobar/CN=example.com" 22 | 23 | clean: 24 | @rm -f *.so *.html *.svg fixtures/nginx/cert.pem fixtures/nginx/key.pem 25 | 26 | eztest: 27 | @$(RUN_SCHEME) ./test/eztest.ss 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chezuv 2 | [![Continuous integration](https://github.com/ibawt/chezuv/actions/workflows/ci.yml/badge.svg)](https://github.com/ibawt/chezuv/actions/workflows/ci.yml) 3 | 4 | Chezuv is an experiment with Chez Scheme and libuv. 5 | 6 | I'm using this as a way to learn scheme. 7 | 8 | ## Requirements: 9 | 10 | - linux 11 | - libuv1 12 | - chezscheme 13 | -------------------------------------------------------------------------------- /TODO.org: -------------------------------------------------------------------------------- 1 | Chezuv things left to do: 2 | 3 | * Tasks 4 | ** TODO move to scheme style macros everywhere 5 | ** TODO make http handler thing 6 | *** middleware 7 | *** no router 8 | *** must allow for async things in the middleware 9 | ** TODO audit memory usage 10 | *** especially the native allocations 11 | ** TODO audit HTTP spec conformance 12 | ** TODO implement HTTP/2 13 | ** TODO make proper records for datastructures 14 | *** http requests/responses 15 | *** url functions 16 | ** TODO fold the http / https function where ever possible 17 | -------------------------------------------------------------------------------- /benchmarks/test.js: -------------------------------------------------------------------------------- 1 | const http = require('http'); 2 | 3 | for(i = 0 ; i < 1000 ; i++) { 4 | http.get('http://localhost:8080', (res) => { 5 | console.log(res.statusCode); 6 | console.log(res.headers); 7 | res.setEncoding('utf8'); 8 | let rawData = ''; 9 | res.on('data', (chunk) => { rawData += chunk; }); 10 | res.on('end', () => { 11 | try { 12 | console.log(rawData); 13 | } catch (e) { 14 | console.error(e.message); 15 | } 16 | }); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /bin/run.ss: -------------------------------------------------------------------------------- 1 | ;; -*- geiser-scheme-implementation: chez -*- 2 | (import (chezscheme) 3 | (log) 4 | (uv)) 5 | 6 | ;; (define (run) 7 | ;; (format #t "Running\n") 8 | ;; (call/cc 9 | ;; (lambda (done) 10 | ;; (time 11 | ;; (uv/call-with-loop 12 | ;; (lambda (loop) 13 | ;; (ssl/call-with-context "fixtures/nginx/cert.pem" "fixtures/nginx/key.pem" #f 14 | ;; (lambda (ctx) 15 | ;; (let/async ([(status server client) (<- (uv/tcp-listen loop "127.0.0.1:8181"))] 16 | ;; [d (<- (uv/serve-https ctx client))]) 17 | ;; (format #t "d: ~a\n" d) 18 | ;; (format #t "closing client: ~a\n" client) 19 | ;; (format #t "server: ~a\n" server) 20 | ;; (uv/close-stream client)))))))))) 21 | (define (listen) 22 | (info "Running...") 23 | (call/cc 24 | (lambda (k) 25 | (uv/call-with-context 26 | (lambda (ctx) 27 | (let/async ([(status server client) (<- (uv/tcp-listen ctx "127.0.0.1:8181"))] 28 | [(_ msg) (<- (uv/stream-read->bytevector ctx client))] 29 | [msg (utf8->string msg)]) 30 | (if (string=? "PING\n" msg) 31 | (let/async ([n (<- (uv/stream-write ctx client "PONG"))] 32 | [_ (<- (uv/close-stream ctx client))]) 33 | #f 34 | )))))))) 35 | 36 | 37 | 38 | (listen) 39 | -------------------------------------------------------------------------------- /src/alloc.ss: -------------------------------------------------------------------------------- 1 | (library (alloc) 2 | (export tracked-alloc 3 | tracked-free 4 | alloc-stats 5 | tracked-in-use) 6 | (import (chezscheme)) 7 | ;; TODO: find some way of making this only for tests/debugging 8 | 9 | (define table (make-eq-hashtable)) 10 | 11 | (define num-allocs 0) 12 | (define num-frees 0) 13 | 14 | (define (tracked-alloc size id) 15 | (let ([x (foreign-alloc size)]) 16 | (eq-hashtable-set! table x id) 17 | (set! num-allocs (+ 1 num-allocs)) 18 | x)) 19 | 20 | (define (tracked-free x) 21 | (let ([id (eq-hashtable-ref table x #f)]) 22 | (if id 23 | (begin 24 | (set! num-frees (+ 1 num-frees)) 25 | (foreign-free x) 26 | (eq-hashtable-delete! table x)) 27 | (error 'invalid-free "I don't have that" id)))) 28 | 29 | (define (alloc-stats) 30 | `((allocs ,num-allocs) (frees ,num-frees))) 31 | 32 | (define (tracked-in-use) 33 | (hash-table-for-each table 34 | (lambda (key value) 35 | (format #t "~a: ~a\n" key value))))) 36 | -------------------------------------------------------------------------------- /src/ansi.ss: -------------------------------------------------------------------------------- 1 | (library (ansi) 2 | (export 3 | red 4 | green 5 | color) 6 | (import (chezscheme)) 7 | 8 | (define escape (integer->char 27)) 9 | 10 | (define red 31) 11 | (define green 32) 12 | 13 | (define (color c s) 14 | (format #f "~a[~am~a~a[0m" escape c s escape))) 15 | -------------------------------------------------------------------------------- /src/bufferpool.ss: -------------------------------------------------------------------------------- 1 | (library (bufferpool) 2 | (export 3 | buf-size 4 | get-buf 5 | free-buf) 6 | (import (chezscheme) 7 | (utils)) 8 | 9 | (define buf-pool '()) 10 | (define buf-size (* 16 1024)) 11 | 12 | (define (get-buf) 13 | (if (null? buf-pool) 14 | (foreign-alloc buf-size) 15 | (let ([x (car buf-pool)]) 16 | (set! buf-pool (cdr buf-pool)) 17 | x))) 18 | 19 | (define (free-buf buf) 20 | (set! buf-pool (cons buf buf-pool)))) 21 | -------------------------------------------------------------------------------- /src/log.ss: -------------------------------------------------------------------------------- 1 | (library (log) 2 | (export 3 | log-level 4 | info) 5 | (import (chezscheme)) 6 | 7 | (define log-level #t) 8 | 9 | (define (info . args) 10 | (when log-level 11 | (display "[INFO] ") 12 | (apply format #t args) 13 | (newline)))) 14 | -------------------------------------------------------------------------------- /src/url.ss: -------------------------------------------------------------------------------- 1 | (library (url) 2 | (export 3 | url 4 | string->url 5 | url-host 6 | url-path 7 | url-port 8 | url? 9 | &url-error 10 | url-error? 11 | url-error-message 12 | url-protocol) 13 | (import (chezscheme) 14 | (irregex)) 15 | 16 | (define-condition-type &url-error &condition make-url-error 17 | url-error? 18 | (message url-error-message)) 19 | 20 | (define-record-type url 21 | (fields host port protocol path fragment query)) 22 | 23 | (define url-regex (irregex "(?.+)://(?[A-Za-z0-9._]+):?(?\\d*)/?(?.*)")) 24 | (define default-ports 25 | '((http 80) 26 | (https 443))) 27 | 28 | (define (string->url s) 29 | (let ([m (irregex-search url-regex s)]) 30 | (if m 31 | (let ([proto (string->symbol (irregex-match-substring m 'protocol))]) 32 | (make-url 33 | (irregex-match-substring m 'host) 34 | (or (string->number (irregex-match-substring m 'port)) (cadr (assoc proto default-ports))) 35 | proto 36 | (string-append "/" (irregex-match-substring m 'path)) 37 | #f #f)) 38 | (raise (make-url-error "failed to match url")))))) 39 | -------------------------------------------------------------------------------- /test/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:sid 2 | 3 | RUN apt-get update && apt-get install nginx chezscheme build-essential libuv1 openssl libssl-dev -y 4 | ADD https://github.com/summerwind/h2spec/releases/download/v2.2.0/h2spec_linux_amd64.tar.gz /tmp 5 | RUN tar xf /tmp/h2spec_linux_amd64.tar.gz && cp h2spec /usr/local/bin && rm h2spec /tmp/*.tar.gz 6 | 7 | RUN mkdir /app 8 | COPY . /app 9 | WORKDIR /app 10 | 11 | RUN make test 12 | 13 | ENTRYPOINT ["make", "test"] 14 | -------------------------------------------------------------------------------- /test/fixtures/nginx/cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDpDCCAoygAwIBAgIJAMUZxX/JWHEjMA0GCSqGSIb3DQEBCwUAMGcxCzAJBgNV 3 | BAYTAkNBMQ8wDQYDVQQIDAZPdHRhd2ExDzANBgNVBAcMBk90dGF3YTEPMA0GA1UE 4 | CgwGRm9vYmFyMQ8wDQYDVQQLDAZGb29iYXIxFDASBgNVBAMMC2V4YW1wbGUuY29t 5 | MB4XDTE5MDEyNDIzMDIxM1oXDTI5MDEyMTIzMDIxM1owZzELMAkGA1UEBhMCQ0Ex 6 | DzANBgNVBAgMBk90dGF3YTEPMA0GA1UEBwwGT3R0YXdhMQ8wDQYDVQQKDAZGb29i 7 | YXIxDzANBgNVBAsMBkZvb2JhcjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wggEiMA0G 8 | CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDm+I+TTGQCc/Q4LZaDefIYm4zfghik 9 | dldJ78OvtSs+3ucunQwxBDfHcZwoXFA9HJScGImeMfPTdPiUpge9hAI/9zT5Id3T 10 | m+CvoRCl19kaoqxPmBAYrEilXLcjK+ie9nS3kA5cQ6XKn5/R9kq70hT4kA/QqwiU 11 | ps9aDU0xoQzqpxZ9vpzfldXKpsUrsN+T1BBP82b3PK+D/Wh21Q/S4Bq6zEonnZPS 12 | wftxG3fmlSmxhBUC7UNOunoQZiRZe/739OiyUiZ8N4YMGGJDJyVjdw7MgFtC9UmB 13 | Zzj1kzrEirlYlpPXWz2zIJRkMdJE6ieXyoPnUUZWePhjp3mF396egEBRAgMBAAGj 14 | UzBRMB0GA1UdDgQWBBTYb7EXBKL7KSS4Xo/W6tGGjDExYjAfBgNVHSMEGDAWgBTY 15 | b7EXBKL7KSS4Xo/W6tGGjDExYjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB 16 | CwUAA4IBAQDGrtOiMeRtBg/NBQ1rAYLmEBWggSoatq0eyneYJpymEgwfdeAeAdk8 17 | lLrIqB6xIx/iuHmXbKavMUnivso0PsuGxXD6rI8IU/nINJVYc8Xozgn8Nzcixejp 18 | +6MK4AEIG+XjpB8HvncHWvp/R8Kuj470jpUwS0s3iR09Xk6T1IT15nQmvOOWnd6e 19 | qIjkVli/NL/8OMPgKSPgLjba+Pqe8Kf7XPqAA65wEbEAuSHjUal9etOoPiv2U8+l 20 | NVkJTf+ZzOp7mKvg33CR4IGyh6aramTu/KfJbtFPQ7jjLXpQdcH2vd0IszqHV0od 21 | z7meGIjvV6kMQ/1SF1Fq6IKd2qEX6pO0 22 | -----END CERTIFICATE----- 23 | -------------------------------------------------------------------------------- /test/fixtures/nginx/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

stuff

5 | 6 | 7 | -------------------------------------------------------------------------------- /test/fixtures/nginx/key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEowIBAAKCAQEA5viPk0xkAnP0OC2Wg3nyGJuM34IYpHZXSe/Dr7UrPt7nLp0M 3 | MQQ3x3GcKFxQPRyUnBiJnjHz03T4lKYHvYQCP/c0+SHd05vgr6EQpdfZGqKsT5gQ 4 | GKxIpVy3IyvonvZ0t5AOXEOlyp+f0fZKu9IU+JAP0KsIlKbPWg1NMaEM6qcWfb6c 5 | 35XVyqbFK7Dfk9QQT/Nm9zyvg/1odtUP0uAausxKJ52T0sH7cRt35pUpsYQVAu1D 6 | Trp6EGYkWXv+9/ToslImfDeGDBhiQyclY3cOzIBbQvVJgWc49ZM6xIq5WJaT11s9 7 | syCUZDHSROonl8qD51FGVnj4Y6d5hd/enoBAUQIDAQABAoIBAB8dq1H/v5VpA6Sx 8 | 144c1pWkFwVhZGp7muTWDTnVoV7V7rUj6SmNVOpkjtINJa4l9ItW7utF9YAuSPLV 9 | r0NDzn3JkvRhMJ46aLmgbDq7an8hHS+X38tDIoJMjEuLtcn8j9rO6HBbmLFEceZ6 10 | VLUa50JZPhgxgnVsR5DtK9IczT2rRWI6BJ1eDvZ5qCwrvBhCeCzPzIiBQeTej0+F 11 | VG5qOIsI8j9pnrv23p0noI6zQp0W8bypZaS4BDhdf76ZmAQjhHNAt2joa7G81yIJ 12 | SY86G2IZZwsfKM31BwwK8yeyhfZFi6+3TV/SU7yIeH3UZQ6tez2RTOOCSBWHYu23 13 | vJ+fkgECgYEA9Tcm58h0obcga1o9B3z1VOPUnCge6bs1Pvr1aEWeA7f18QVrKETN 14 | hKorf+GC76RHo/DZOwoLsjXptlCYC8+O7UMiU5HHjr4ufSpUnrubLGSl07oZsiAD 15 | agFaOnrzPDg1EHVVBGHyzEbBm3+l8zw8JRNoYuE+sO82LlYo4Jum8fECgYEA8SEI 16 | L1pDb/cXZVWWSGrh2dv8MNW7ukxoWy35OtOcaWElHtBCiYw6CTtgMG9uc68wH6m/ 17 | w1Bgsq0AH6Df0IuMCTa6X5y0quWhf0w/eShvGulh0VAFYDLqSevX1PqH3sKCGu8d 18 | tR+p1i6KIpTCr3+ynfMBjOIhGA2NqrkawV8T1GECgYARnZip5fia9XDaxWzE8PEe 19 | 3A8V+LvfxpcYoyamCvpDAiAk5GLCTc8FzMO7OBQT6xVKba7tUtdsQfs8IaYKkyqN 20 | WNlKb5qKYpcsXrIdhRSsp75R63iVFz+nidlVgiefF9qYCBXHbtHmYt7dsNnXE2iu 21 | sSo6kDvUshqOUZo2KHhhwQKBgFeF0d6+OLQvUAKsKjxm70uQmd1v9xAMI+TUrx43 22 | KRLm+/5PQZeDmp03PBbYm5LKCAG2L7DJQBAa02ynjBW6UT4W61dBHiLZ7uCx4Ggt 23 | 0QZHqAW9sfXVBU2HmXPo6+BjYa49FN9letQPWHxs2q2xADhsuCdW/QQqBz3sqlV+ 24 | GUiBAoGBAMt76lJ6ARHeui4/b+oA8tDOSRQ5M5i8zCkhO4T6G9DZysk6Pqvc7Era 25 | j4wzXQGZsguOliYhj1Qz9yieusW4LdiWG9Sz0A8YsCvDIRH7n9yvCWX9tfHpWJkY 26 | k75NedFrvEP5IDG8rsm8mWEBZffPxfzfHmUfbuav5W3Wr3n2JIqI 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /vendor/srfi/%3a0.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :0) 4 | (export 5 | cond-expand) 6 | (import (srfi :0 cond-expand)) 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/srfi/%3a0/cond-expand.guile.sls: -------------------------------------------------------------------------------- 1 | (library (srfi srfi-0) 2 | (export cond-expand) 3 | (import (only (guile) cond-expand))) 4 | -------------------------------------------------------------------------------- /vendor/srfi/%3a0/cond-expand.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :0 cond-expand) 6 | (export 7 | cond-expand) 8 | (import 9 | (rnrs) 10 | (for (only (srfi private registry) expand-time-features) expand)) 11 | 12 | (define-syntax cond-expand 13 | (lambda (stx) 14 | (syntax-case stx (and or not else) 15 | ((_) 16 | (syntax-violation #F "unfulfilled cond-expand" stx)) 17 | ((_ (else body ...)) 18 | #'(begin body ...)) 19 | ((_ ((and) body ...) more-clauses ...) 20 | #'(begin body ...)) 21 | ((_ ((and req1 req2 ...) body ...) more-clauses ...) 22 | #'(cond-expand 23 | (req1 24 | (cond-expand 25 | ((and req2 ...) body ...) 26 | more-clauses ...)) 27 | more-clauses ...)) 28 | ((_ ((or) body ...) more-clauses ...) 29 | #'(cond-expand more-clauses ...)) 30 | ((_ ((or req1 req2 ...) body ...) more-clauses ...) 31 | #'(cond-expand 32 | (req1 33 | (begin body ...)) 34 | (else 35 | (cond-expand 36 | ((or req2 ...) body ...) 37 | more-clauses ...)))) 38 | ((_ ((not req) body ...) more-clauses ...) 39 | #'(cond-expand 40 | (req 41 | (cond-expand more-clauses ...)) 42 | (else body ...))) 43 | ((_ (feature-id body ...) more-clauses ...) 44 | (if (member (syntax->datum #'feature-id) expand-time-features) 45 | #'(begin body ...) 46 | #'(cond-expand more-clauses ...)))))) 47 | 48 | ) 49 | -------------------------------------------------------------------------------- /vendor/srfi/%3a1/lists.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :1 lists) 6 | (export 7 | ;;; Exported: 8 | xcons #;tree-copy make-list list-tabulate list-copy 9 | proper-list? circular-list? dotted-list? not-pair? null-list? list= 10 | circular-list length+ 11 | iota 12 | first second third fourth fifth sixth seventh eighth ninth tenth 13 | car+cdr 14 | take drop 15 | take-right drop-right 16 | take! drop-right! 17 | split-at split-at! 18 | last last-pair 19 | zip unzip1 unzip2 unzip3 unzip4 unzip5 20 | count 21 | append! append-reverse append-reverse! concatenate concatenate! 22 | unfold fold pair-fold reduce 23 | unfold-right pair-fold-right reduce-right 24 | append-map append-map! map! pair-for-each filter-map map-in-order 25 | filter! partition! remove! 26 | find-tail any every list-index 27 | take-while drop-while take-while! 28 | span break span! break! 29 | delete delete! 30 | alist-cons alist-copy 31 | delete-duplicates delete-duplicates! 32 | alist-delete alist-delete! 33 | reverse! 34 | lset<= lset= lset-adjoin 35 | lset-union lset-intersection lset-difference lset-xor 36 | lset-diff+intersection 37 | lset-union! lset-intersection! lset-difference! lset-xor! 38 | lset-diff+intersection! 39 | ;; re-exported: 40 | append assq assv caaaar caaadr caaar caadar caaddr 41 | caadr caar cadaar cadadr cadar caddar cadddr caddr cadr 42 | car cdaaar cdaadr cdaar cdadar cdaddr cdadr cdar cddaar 43 | cddadr cddar cdddar cddddr cdddr cddr cdr cons cons* 44 | length list list-ref memq memv null? pair? 45 | reverse set-car! set-cdr! 46 | ;; different than R6RS: 47 | assoc filter find fold-right for-each map member partition remove) 48 | (import 49 | (rename (except (rnrs) find filter fold-right map partition remove) 50 | (assoc r6rs:assoc) 51 | (for-each r6rs:for-each) 52 | (member r6rs:member)) 53 | (rnrs mutable-pairs) 54 | (srfi :8 receive) 55 | (srfi :23 error tricks) 56 | (for (srfi private vanish) expand) 57 | (srfi private check-arg) 58 | (srfi private include)) 59 | 60 | (let-syntax ((define (vanish-define define (cons*)))) 61 | (SRFI-23-error->R6RS "(library (srfi :1 lists))" 62 | (include/resolve ("srfi" "%3a1") "srfi-1-reference.scm"))) 63 | ) 64 | -------------------------------------------------------------------------------- /vendor/srfi/%3a11.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :11) 4 | (export 5 | let*-values 6 | let-values) 7 | (import (srfi :11 let-values)) 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/srfi/%3a11/let-values.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :11 let-values) 6 | (export 7 | let-values 8 | let*-values) 9 | (import 10 | (only (rnrs) let-values let*-values)) 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/srfi/%3a115.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :115) 2 | (export regexp regexp? valid-sre? rx regexp->sre char-set->sre 3 | regexp-matches regexp-matches? regexp-search 4 | regexp-replace regexp-replace-all 5 | regexp-fold regexp-extract regexp-split regexp-partition 6 | regexp-match? regexp-match-count 7 | regexp-match-submatch regexp-match-submatch/list 8 | regexp-match-submatch-start regexp-match-submatch-end 9 | regexp-match->list regexp-match->sexp) 10 | (import (srfi :115 regexp))) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a115/regexp/boundary.sls: -------------------------------------------------------------------------------- 1 | ;; Character sets for Unicode boundaries, TR29. 2 | ;; This code is written by Alex Shinn and placed in the 3 | ;; Public Domain. All warranties are disclaimed. 4 | 5 | ;;> Char-sets used for 6 | ;;> \hyperlink["http://unicode.org/reports/tr29/"]{TR29} word 7 | ;;> boundaries. 8 | 9 | ;; Converted from lib/chibi/char-set/boundary.sld to R6RS by Göran Weinholt. 10 | 11 | (library (srfi :115 regexp boundary) 12 | (export char-set:regional-indicator 13 | char-set:extend-or-spacing-mark 14 | char-set:hangul-l 15 | char-set:hangul-v 16 | char-set:hangul-t 17 | char-set:hangul-lv 18 | char-set:hangul-lvt) 19 | (import (rnrs) 20 | (srfi :14 char-sets) 21 | (srfi private include)) 22 | (define (immutable-char-set cs) cs) 23 | ;; generated with: 24 | ;; tools/extract-unicode-props.scm --derived GraphemeBreakProperty.txt 25 | ;; Control extend-or-spacing-mark=Extend,SpacingMark Regional_Indicator 26 | ;; hangul-l=:L hangul-v=:V hangul-t=:T hangul-lv=:LV hangul-lvt=:LVT 27 | (include/resolve ("srfi" "%3a115" "regexp") "boundary.scm")) 28 | -------------------------------------------------------------------------------- /vendor/srfi/%3a117.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | (library (srfi :117) 3 | (export 4 | make-list-queue list-queue list-queue-copy list-queue-unfold list-queue-unfold-right 5 | list-queue? list-queue-empty? 6 | list-queue-front list-queue-back list-queue-list list-queue-first-last 7 | list-queue-add-front! list-queue-add-back! list-queue-remove-front! list-queue-remove-back! 8 | list-queue-remove-all! list-queue-set-list! 9 | list-queue-append list-queue-append! list-queue-concatenate 10 | list-queue-map list-queue-map! list-queue-for-each 11 | ) 12 | (import (srfi :117 list-queues)) 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/srfi/%3a117/list-queues.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :117 list-queues) 2 | (export 3 | make-list-queue list-queue list-queue-copy list-queue-unfold list-queue-unfold-right 4 | list-queue? list-queue-empty? 5 | list-queue-front list-queue-back list-queue-list list-queue-first-last 6 | list-queue-add-front! list-queue-add-back! list-queue-remove-front! list-queue-remove-back! 7 | list-queue-remove-all! list-queue-set-list! 8 | list-queue-append list-queue-append! list-queue-concatenate 9 | list-queue-map list-queue-map! list-queue-for-each) 10 | (import 11 | (only (srfi :23) error) 12 | (except (rnrs base) error) 13 | (rnrs control) 14 | (rnrs mutable-pairs) 15 | (rnrs records syntactic) 16 | (srfi private include)) 17 | (include/resolve ("srfi" "%3a117") "list-queues-impl.scm")) 18 | -------------------------------------------------------------------------------- /vendor/srfi/%3a125.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :125) 2 | (export 3 | make-hash-table hash-table hash-table-unfold alist->hash-table 4 | 5 | hash-table? hash-table-contains? hash-table-empty? hash-table=? 6 | hash-table-mutable? 7 | 8 | hash-table-ref hash-table-ref/default 9 | 10 | hash-table-set! hash-table-delete! hash-table-intern! hash-table-update! 11 | hash-table-update!/default hash-table-pop! hash-table-clear! 12 | 13 | hash-table-size hash-table-keys hash-table-values hash-table-entries 14 | hash-table-find hash-table-count 15 | 16 | hash-table-map hash-table-for-each hash-table-map! hash-table-map->list 17 | hash-table-fold hash-table-prune! 18 | 19 | hash-table-copy hash-table-empty-copy hash-table->alist 20 | 21 | hash-table-union! hash-table-intersection! hash-table-difference! 22 | hash-table-xor! 23 | 24 | ;; The following procedures are deprecated by SRFI 125: 25 | 26 | deprecated:hash deprecated:string-hash deprecated:string-ci-hash 27 | deprecated:hash-by-identity 28 | 29 | deprecated:hash-table-equivalence-function 30 | deprecated:hash-table-hash-function deprecated:hash-table-exists? 31 | deprecated:hash-table-walk deprecated:hash-table-merge!) 32 | (import (srfi :125 hashtables))) 33 | -------------------------------------------------------------------------------- /vendor/srfi/%3a125/hashtables.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :125 hashtables) 2 | (export 3 | make-hash-table hash-table hash-table-unfold alist->hash-table 4 | 5 | hash-table? hash-table-contains? hash-table-empty? hash-table=? 6 | hash-table-mutable? 7 | 8 | hash-table-ref hash-table-ref/default 9 | 10 | hash-table-set! hash-table-delete! hash-table-intern! hash-table-update! 11 | hash-table-update!/default hash-table-pop! hash-table-clear! 12 | 13 | hash-table-size hash-table-keys hash-table-values hash-table-entries 14 | hash-table-find hash-table-count 15 | 16 | hash-table-map hash-table-for-each hash-table-map! hash-table-map->list 17 | hash-table-fold hash-table-prune! 18 | 19 | hash-table-copy hash-table-empty-copy hash-table->alist 20 | 21 | hash-table-union! hash-table-intersection! hash-table-difference! 22 | hash-table-xor! 23 | 24 | ;; The following procedures are deprecated by SRFI 125: 25 | 26 | deprecated:hash 27 | deprecated:string-hash 28 | deprecated:string-ci-hash 29 | deprecated:hash-by-identity 30 | deprecated:hash-table-equivalence-function 31 | deprecated:hash-table-hash-function 32 | deprecated:hash-table-exists? 33 | deprecated:hash-table-walk 34 | deprecated:hash-table-merge!) 35 | 36 | (import (except (rnrs) 37 | make-hashtable hashtable-clear! hashtable-copy 38 | hashtable-ref hashtable-update! make-eq-hashtable 39 | make-eqv-hashtable) 40 | (srfi private include) 41 | (rename (srfi :126) 42 | (hashtable? hash-table?) 43 | (hashtable-contains? hash-table-contains?) 44 | (hashtable-empty? hash-table-empty?) 45 | (hashtable-intern! hash-table-intern!) 46 | (hashtable-clear! hash-table-clear!) 47 | (hashtable-copy hash-table-copy) 48 | (hashtable-size hash-table-size) 49 | (hashtable-pop! hash-table-pop!) 50 | (hashtable-merge! hash-table-merge!) 51 | (hashtable-hash-function hash-table-hash-function) 52 | (hashtable-equivalence-function hash-table-equivalence-function)) 53 | (except (srfi :128) hash-salt string-hash string-ci-hash symbol-hash)) 54 | 55 | (include/resolve ("srfi" "%3a125") "125.body.scm")) 56 | 57 | -------------------------------------------------------------------------------- /vendor/srfi/%3a126.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :126) 2 | (export make-eq-hashtable make-eqv-hashtable make-hashtable 3 | alist->eq-hashtable alist->eqv-hashtable alist->hashtable weakness 4 | hashtable? hashtable-size hashtable-ref hashtable-set! 5 | hashtable-delete! hashtable-contains? hashtable-lookup 6 | hashtable-update! hashtable-intern! hashtable-copy hashtable-clear! 7 | hashtable-empty-copy hashtable-keys hashtable-values 8 | hashtable-entries hashtable-key-list hashtable-value-list 9 | hashtable-entry-lists hashtable-walk hashtable-update-all! 10 | hashtable-prune! hashtable-merge! hashtable-sum hashtable-map->lset 11 | hashtable-find hashtable-empty? hashtable-pop! hashtable-inc! 12 | hashtable-dec! hashtable-equivalence-function hashtable-hash-function 13 | hashtable-weakness hashtable-mutable? hash-salt equal-hash 14 | string-hash string-ci-hash symbol-hash) 15 | (import (srfi :126 r6rs-hashtables))) 16 | 17 | -------------------------------------------------------------------------------- /vendor/srfi/%3a126/r6rs-hashtables.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :126 r6rs-hashtables) 2 | (export make-eq-hashtable make-eqv-hashtable make-hashtable 3 | alist->eq-hashtable alist->eqv-hashtable alist->hashtable weakness 4 | hashtable? hashtable-size hashtable-ref hashtable-set! 5 | hashtable-delete! hashtable-contains? hashtable-lookup 6 | hashtable-update! hashtable-intern! hashtable-copy hashtable-clear! 7 | hashtable-empty-copy hashtable-keys hashtable-values 8 | hashtable-entries hashtable-key-list hashtable-value-list 9 | hashtable-entry-lists hashtable-walk hashtable-update-all! 10 | hashtable-prune! hashtable-merge! hashtable-sum hashtable-map->lset 11 | hashtable-find hashtable-empty? hashtable-pop! hashtable-inc! 12 | hashtable-dec! hashtable-equivalence-function hashtable-hash-function 13 | hashtable-weakness hashtable-mutable? hash-salt equal-hash 14 | string-hash string-ci-hash symbol-hash) 15 | (import (rename (rnrs) 16 | (make-eq-hashtable rnrs:make-eq-hashtable) 17 | (make-eqv-hashtable rnrs:make-eqv-hashtable) 18 | (make-hashtable rnrs:make-hashtable) 19 | (hashtable-ref rnrs:hashtable-ref) 20 | (hashtable-update! rnrs:hashtable-update!) 21 | (hashtable-copy rnrs:hashtable-copy) 22 | (hashtable-clear! rnrs:hashtable-clear!)) 23 | (srfi :0 cond-expand) 24 | (srfi :126 helpers helpers) 25 | (srfi private include)) 26 | (include/resolve ("srfi" "%3a126") "126.body.scm")) 27 | -------------------------------------------------------------------------------- /vendor/srfi/%3a127.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :127) 2 | (export generator->lseq lseq? lseq=? 3 | 4 | lseq-car lseq-first lseq-cdr lseq-rest lseq-ref lseq-take lseq-drop 5 | 6 | lseq-realize lseq->generator lseq-length lseq-append lseq-zip 7 | 8 | lseq-map lseq-for-each lseq-filter lseq-remove 9 | 10 | lseq-find lseq-find-tail lseq-take-while lseq-drop-while 11 | 12 | lseq-any lseq-every lseq-index lseq-member lseq-memq lseq-memv) 13 | (import (srfi :127 lazy-sequences))) 14 | 15 | -------------------------------------------------------------------------------- /vendor/srfi/%3a127/lazy-sequences.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :127 lazy-sequences) 2 | (export generator->lseq lseq? lseq=? 3 | 4 | lseq-car lseq-first lseq-cdr lseq-rest lseq-ref lseq-take lseq-drop 5 | 6 | lseq-realize lseq->generator lseq-length lseq-append lseq-zip 7 | 8 | lseq-map lseq-for-each lseq-filter lseq-remove 9 | 10 | lseq-find lseq-find-tail lseq-take-while lseq-drop-while 11 | 12 | lseq-any lseq-every lseq-index lseq-member lseq-memq lseq-memv) 13 | (import (rnrs) (rnrs mutable-pairs) (srfi private include)) 14 | (include/resolve ("srfi" "%3a127") "lseqs-impl.scm")) 15 | -------------------------------------------------------------------------------- /vendor/srfi/%3a128.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :128) 2 | (export comparator? comparator-ordered? comparator-hashable? make-comparator 3 | make-pair-comparator make-list-comparator make-vector-comparator 4 | make-eq-comparator make-eqv-comparator make-equal-comparator 5 | boolean-hash char-hash char-ci-hash string-hash string-ci-hash 6 | symbol-hash number-hash make-default-comparator default-hash 7 | comparator-register-default! comparator-type-test-predicate 8 | comparator-equality-predicate comparator-ordering-predicate 9 | comparator-hash-function comparator-test-type comparator-check-type 10 | comparator-hash hash-bound hash-salt =? ? <=? >=? 11 | comparator-if<=>) 12 | (import (srfi :128 comparators))) 13 | -------------------------------------------------------------------------------- /vendor/srfi/%3a128/comparators.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :128 comparators) 2 | (export comparator? comparator-ordered? comparator-hashable? make-comparator 3 | make-pair-comparator make-list-comparator make-vector-comparator 4 | make-eq-comparator make-eqv-comparator make-equal-comparator 5 | boolean-hash char-hash char-ci-hash string-hash string-ci-hash 6 | symbol-hash number-hash make-default-comparator default-hash 7 | comparator-register-default! comparator-type-test-predicate 8 | comparator-equality-predicate comparator-ordering-predicate 9 | comparator-hash-function comparator-test-type comparator-check-type 10 | comparator-hash hash-bound hash-salt =? ? <=? >=? 11 | comparator-if<=>) 12 | (import (except (rnrs) define-record-type) 13 | (srfi :99) 14 | (srfi :39) 15 | (only (rnrs r5rs) modulo) 16 | (srfi private include)) 17 | (define (exact-integer? x) (and (integer? x) (exact? x))) 18 | (include/resolve ("srfi" "%3a128") "128.body1.scm") 19 | (include/resolve ("srfi" "%3a128") "128.body2.scm")) 20 | 21 | -------------------------------------------------------------------------------- /vendor/srfi/%3a129.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :129) 2 | (export char-title-case? char-titlecase string-titlecase) 3 | (import (srfi :129 titlecase))) 4 | -------------------------------------------------------------------------------- /vendor/srfi/%3a129/titlecase-impl.scm: -------------------------------------------------------------------------------- 1 | ;;;; Implementation of SRFI 129 titlecase functions 2 | 3 | ;; Returns #t if argument is a titlecase character, #f if not 4 | (define (char-title-case? ch) 5 | (let* ((codepoint (char->integer ch)) 6 | (result (assq codepoint titlecase-chars))) 7 | (if result #t #f))) 8 | 9 | ;; Returns the single-character titlecase mapping of argument 10 | (define (char-titlecase ch) 11 | (let* ((codepoint (char->integer ch)) 12 | (result (assq codepoint title-single-map))) 13 | (if result 14 | (integer->char (cadr result)) 15 | (char-upcase ch)))) 16 | 17 | ;; Returns #t if a character is caseless, otherwise #f 18 | (define (char-caseless? ch) 19 | (not (or (char-lower-case? ch) (char-upper-case? ch) (char-title-case? ch)))) 20 | 21 | ;; Push a list onto another list in reverse order 22 | (define (reverse-push new old) 23 | (if (null? new) 24 | old 25 | (reverse-push (cdr new) (cons (car new) old)))) 26 | 27 | ;; Returns the string titlecase mapping of argument 28 | (define (string-titlecase str) 29 | (let loop ((n 0) (result '())) 30 | (if (= n (string-length str)) 31 | (apply string (map integer->char (reverse result))) 32 | (let* ((ch (string-ref str n)) (codepoint (char->integer ch))) 33 | (if (or (= n 0) (char-caseless? (string-ref str (- n 1)))) 34 | ; ch must be titlecased 35 | (let ((multi-title (assq codepoint title-multiple-map))) 36 | (if multi-title 37 | ; ch has multiple- or single-character titlecase mapping 38 | (loop (+ n 1) (reverse-push (cdr multi-title) result)) 39 | ; ch has single-character uppercase mapping 40 | (loop (+ n 1) (reverse-push (list (char->integer (char-upcase ch))) result)))) 41 | ; ch must be lowercased 42 | (let ((multi-downcase (assq codepoint lower-multiple-map))) 43 | (if multi-downcase 44 | ; ch has multiple-character lowercase mapping 45 | (loop (+ n 1) (reverse-push (cdr multi-downcase) result)) 46 | ; ch has single-character lowercase mapping 47 | (loop (+ n 1) (reverse-push (list (char->integer (char-downcase ch))) result))))))))) 48 | 49 | -------------------------------------------------------------------------------- /vendor/srfi/%3a129/titlecase.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :129 titlecase) 2 | (export char-title-case? char-titlecase string-titlecase) 3 | (import (except (rnrs) char-titlecase char-title-case? string-titlecase) 4 | (srfi private include)) 5 | (include/resolve ("srfi" "%3a129") "titlemaps.scm") 6 | (include/resolve ("srfi" "%3a129") "titlecase-impl.scm")) 7 | -------------------------------------------------------------------------------- /vendor/srfi/%3a13.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :13) 4 | (export 5 | list->string 6 | make-string 7 | reverse-list->string 8 | string 9 | string->list 10 | string-any 11 | string-append 12 | string-append/shared 13 | string-ci< 14 | string-ci<= 15 | string-ci<> 16 | string-ci= 17 | string-ci> 18 | string-ci>= 19 | string-compare 20 | string-compare-ci 21 | string-concatenate 22 | string-concatenate-reverse 23 | string-concatenate-reverse/shared 24 | string-concatenate/shared 25 | string-contains 26 | string-contains-ci 27 | string-copy 28 | string-copy! 29 | string-count 30 | string-delete 31 | string-downcase 32 | string-downcase! 33 | string-drop 34 | string-drop-right 35 | string-every 36 | string-fill! 37 | string-filter 38 | string-fold 39 | string-fold-right 40 | string-for-each 41 | string-for-each-index 42 | string-hash 43 | string-hash-ci 44 | string-index 45 | string-index-right 46 | string-join 47 | string-length 48 | string-map 49 | string-map! 50 | string-null? 51 | string-pad 52 | string-pad-right 53 | string-prefix-ci? 54 | string-prefix-length 55 | string-prefix-length-ci 56 | string-prefix? 57 | string-ref 58 | string-replace 59 | string-reverse 60 | string-reverse! 61 | string-set! 62 | string-skip 63 | string-skip-right 64 | string-suffix-ci? 65 | string-suffix-length 66 | string-suffix-length-ci 67 | string-suffix? 68 | string-tabulate 69 | string-take 70 | string-take-right 71 | string-titlecase 72 | string-titlecase! 73 | string-tokenize 74 | string-trim 75 | string-trim-both 76 | string-trim-right 77 | string-unfold 78 | string-unfold-right 79 | string-upcase 80 | string-upcase! 81 | string-xcopy! 82 | string< 83 | string<= 84 | string<> 85 | string= 86 | string> 87 | string>= 88 | string? 89 | substring/shared 90 | xsubstring) 91 | (import (srfi :13 strings)) 92 | ) 93 | -------------------------------------------------------------------------------- /vendor/srfi/%3a130.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :130) 2 | (export 3 | string-cursor? string-cursor-start string-cursor-end string-cursor-next 4 | string-cursor-prev string-cursor-forward string-cursor-back string-cursor=? 5 | string-cursor? string-cursor<=? string-cursor>=? 6 | string-cursor-diff string-cursor->index string-index->cursor 7 | 8 | string-null? string-every string-any 9 | 10 | string-tabulate string-unfold string-unfold-right 11 | 12 | string->list/cursors string->vector/cursors reverse-list->string 13 | string-join 14 | 15 | string-ref/cursor substring/cursors string-copy/cursors string-take 16 | string-take-right string-drop string-drop-right string-pad string-pad-right 17 | string-trim string-trim-right string-trim-both 18 | 19 | string-prefix-length string-suffix-length string-prefix? string-suffix? 20 | 21 | string-index string-index-right string-skip string-skip-right 22 | string-contains string-contains-right 23 | 24 | string-reverse string-concatenate string-concatenate-reverse string-fold 25 | string-fold-right string-for-each-cursor string-replicate string-count 26 | string-replace string-split string-filter string-remove) 27 | (import (srfi :130 string-cursors))) 28 | -------------------------------------------------------------------------------- /vendor/srfi/%3a130/string-cursors.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :130 string-cursors) 2 | (export 3 | string-cursor? string-cursor-start string-cursor-end string-cursor-next 4 | string-cursor-prev string-cursor-forward string-cursor-back string-cursor=? 5 | string-cursor? string-cursor<=? string-cursor>=? 6 | string-cursor-diff string-cursor->index string-index->cursor 7 | 8 | string-null? string-every string-any 9 | 10 | string-tabulate string-unfold string-unfold-right 11 | 12 | string->list/cursors string->vector/cursors reverse-list->string 13 | string-join 14 | 15 | string-ref/cursor substring/cursors string-copy/cursors string-take 16 | string-take-right string-drop string-drop-right string-pad string-pad-right 17 | string-trim string-trim-right string-trim-both 18 | 19 | string-prefix-length string-suffix-length string-prefix? string-suffix? 20 | 21 | string-index string-index-right string-skip string-skip-right 22 | string-contains string-contains-right 23 | 24 | string-reverse string-concatenate string-concatenate-reverse string-fold 25 | string-fold-right string-for-each-cursor string-replicate string-count 26 | string-replace string-split string-filter string-remove) 27 | (import (rnrs) 28 | (rename (only (srfi :13) string-index string-index-right 29 | string-contains string-filter string-replace 30 | string-count string-fold-right string-fold 31 | string-concatenate-reverse string-concatenate 32 | string-reverse string-suffix? string-prefix? 33 | string-suffix-length string-prefix-length 34 | string-trim-both string-trim-right string-trim 35 | string-pad-right string-pad string-drop-right 36 | string-drop string-take-right string-take string-join 37 | reverse-list->string string-unfold-right string-unfold 38 | string-tabulate string-any string-every string-null?) 39 | (string-index srfi-13:string-index) 40 | (string-index-right srfi-13:string-index-right)) 41 | (only (srfi :1) last-pair) 42 | (srfi private include)) 43 | (include/resolve ("srfi" "%3a130") "130.body.scm")) 44 | -------------------------------------------------------------------------------- /vendor/srfi/%3a131.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :131) 2 | (export define-record-type) 3 | (import (srfi :131 records))) 4 | -------------------------------------------------------------------------------- /vendor/srfi/%3a132.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :132) 2 | (export 3 | list-sorted? vector-sorted? list-merge vector-merge list-sort vector-sort 4 | list-stable-sort vector-stable-sort list-merge! vector-merge! list-sort! 5 | vector-sort! list-stable-sort! vector-stable-sort! 6 | list-delete-neighbor-dups vector-delete-neighbor-dups 7 | list-delete-neighbor-dups! vector-delete-neighbor-dups! vector-find-median 8 | vector-find-median!) 9 | (import (srfi :132 sorting))) 10 | -------------------------------------------------------------------------------- /vendor/srfi/%3a132/median.scm: -------------------------------------------------------------------------------- 1 | ;;;; Finding the median of a vector 2 | ;; This involves sorting the vector, which is why it's part 3 | ;; of this package. 4 | 5 | (define (vector-find-median < v knil . maybe-mean) 6 | (define mean (if (null? maybe-mean) 7 | (lambda (a b) (/ (+ a b) 2)) 8 | (car maybe-mean))) 9 | (define len (vector-length v)) 10 | (define newv (vector-sort < v)) 11 | (cond 12 | ((= len 0) knil) 13 | ((odd? len) (vector-ref newv (/ (- len 1) 2))) 14 | (else (mean 15 | (vector-ref newv (- (/ len 2) 1)) 16 | (vector-ref newv (/ len 2)))))) 17 | 18 | (define (vector-find-median! < v knil . maybe-mean) 19 | (define mean (if (null? maybe-mean) 20 | (lambda (a b) (/ (+ a b) 2)) 21 | (car maybe-mean))) 22 | (define len (vector-length v)) 23 | (define newv (vector-sort! < v)) 24 | (cond 25 | ((= len 0) knil) 26 | ((odd? len) (vector-ref newv (/ (- len 1) 2))) 27 | (else (mean 28 | (vector-ref newv (- (/ len 2) 1)) 29 | (vector-ref newv (/ len 2)))))) 30 | 31 | -------------------------------------------------------------------------------- /vendor/srfi/%3a132/sort.scm: -------------------------------------------------------------------------------- 1 | ;;; The sort package -- general sort & merge procedures 2 | ;;; 3 | ;;; Copyright (c) 1998 by Olin Shivers. 4 | ;;; You may do as you please with this code, as long as you do not delete this 5 | ;;; notice or hold me responsible for any outcome related to its use. 6 | ;;; Olin Shivers 10/98. 7 | 8 | ;;; This file just defines the general sort API in terms of some 9 | ;;; algorithm-specific calls. 10 | 11 | (define (list-sort < l) ; Sort lists by converting to 12 | (let ((v (list->vector l))) ; a vector and sorting that. 13 | (vector-heap-sort! < v) 14 | (vector->list v))) 15 | 16 | (define list-sort! list-merge-sort!) 17 | 18 | (define list-stable-sort list-merge-sort) 19 | (define list-stable-sort! list-merge-sort!) 20 | 21 | (define vector-sort vector-quick-sort) 22 | (define vector-sort! vector-quick-sort!) 23 | 24 | (define vector-stable-sort vector-merge-sort) 25 | (define vector-stable-sort! vector-merge-sort!) 26 | 27 | -------------------------------------------------------------------------------- /vendor/srfi/%3a132/sortfaster.scm: -------------------------------------------------------------------------------- 1 | ;;; SRFI 132 specifies these eight procedures. 2 | ;;; 3 | ;;; Benchmarking has shown that the (rnrs sorting) procedures 4 | ;;; are faster than the sorting procedures defined by SRFI 132's 5 | ;;; reference implementation, so the R6RS procedures are used here. 6 | ;;; 7 | ;;; This file is a plug-and-play alternative to sort.scm in the 8 | ;;; same directory. 9 | 10 | (define list-sort r6rs-list-sort) 11 | (define list-sort! r6rs-list-sort) 12 | (define list-stable-sort r6rs-list-sort) 13 | (define list-stable-sort! r6rs-list-sort) 14 | 15 | (define (vector-sort < v . rest) 16 | (cond ((null? rest) 17 | (r6rs-vector-sort < v)) 18 | ((null? (cdr rest)) 19 | (r6rs-vector-sort < (r7rs-vector-copy v (car rest)))) 20 | ((null? (cddr rest)) 21 | (r6rs-vector-sort < (r7rs-vector-copy v (car rest) (cadr rest)))) 22 | (else 23 | (error 'vector-sort 24 | "too many arguments" 25 | (cons < (cons v rest)))))) 26 | 27 | (define vector-stable-sort vector-sort) 28 | 29 | (define (vector-sort! < v . rest) 30 | (cond ((null? rest) 31 | (r6rs-vector-sort! < v)) 32 | ((null? (cdr rest)) 33 | (let* ((start (car rest)) 34 | (v2 (r7rs-vector-copy v start))) 35 | (r6rs-vector-sort! < v2) 36 | (r7rs-vector-copy! v start v2 0))) 37 | ((null? (cddr rest)) 38 | (let* ((start (car rest)) 39 | (end (cadr rest)) 40 | (v2 (r7rs-vector-copy v start end))) 41 | (r6rs-vector-sort! < v2) 42 | (r7rs-vector-copy! v start v2 0))) 43 | (else 44 | (error 'vector-sort! 45 | "too many arguments" 46 | (cons < (cons v rest)))))) 47 | 48 | (define vector-stable-sort! vector-sort!) 49 | 50 | -------------------------------------------------------------------------------- /vendor/srfi/%3a132/sorting.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :132 sorting) 2 | (export 3 | list-sorted? vector-sorted? list-merge vector-merge list-sort vector-sort 4 | list-stable-sort vector-stable-sort list-merge! vector-merge! list-sort! 5 | vector-sort! list-stable-sort! vector-stable-sort! 6 | list-delete-neighbor-dups vector-delete-neighbor-dups 7 | list-delete-neighbor-dups! vector-delete-neighbor-dups! vector-find-median 8 | vector-find-median!) 9 | (import (except (rnrs) list-sort vector-sort vector-sort!) 10 | (rnrs mutable-pairs) 11 | (rename (only (srfi :133 vectors) vector-copy! vector-copy) 12 | (vector-copy! r7rs-vector-copy!) 13 | (vector-copy r7rs-vector-copy)) 14 | (only (rnrs r5rs) quotient) 15 | (srfi private include)) 16 | (include/resolve ("srfi" "%3a132") "delndups.scm") 17 | (include/resolve ("srfi" "%3a132") "lmsort.scm") 18 | (include/resolve ("srfi" "%3a132") "sortp.scm") 19 | (include/resolve ("srfi" "%3a132") "vector-util.scm") 20 | (include/resolve ("srfi" "%3a132") "vhsort.scm") 21 | (include/resolve ("srfi" "%3a132") "visort.scm") 22 | (include/resolve ("srfi" "%3a132") "vmsort.scm") 23 | (include/resolve ("srfi" "%3a132") "vqsort2.scm") 24 | (include/resolve ("srfi" "%3a132") "median.scm") 25 | (include/resolve ("srfi" "%3a132") "sort.scm") ; must be last 26 | ) 27 | -------------------------------------------------------------------------------- /vendor/srfi/%3a132/sortp.scm: -------------------------------------------------------------------------------- 1 | ;;; The sort package -- sorted predicates 2 | ;;; Olin Shivers 10/98. 3 | ;;; 4 | ;;; (list-sorted? < lis) -> boolean 5 | ;;; (vector-sorted? < v [start end]) -> boolean 6 | 7 | (define (list-sorted? < list) 8 | (or (not (pair? list)) 9 | (let lp ((prev (car list)) (tail (cdr list))) 10 | (or (not (pair? tail)) 11 | (let ((next (car tail))) 12 | (and (not (< next prev)) 13 | (lp next (cdr tail)))))))) 14 | 15 | (define (vector-sorted? elt< v . maybe-start+end) 16 | (call-with-values 17 | (lambda () (vector-start+end v maybe-start+end)) 18 | (lambda (start end) 19 | (or (>= start end) ; Empty range 20 | (let lp ((i (+ start 1)) (vi-1 (vector-ref v start))) 21 | (or (>= i end) 22 | (let ((vi (vector-ref v i))) 23 | (and (not (elt< vi vi-1)) 24 | (lp (+ i 1) vi))))))))) 25 | 26 | ;;; Copyright and porting non-notices 27 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 28 | ;;; Give me a break. It's fifteen lines of code. I place this code in the 29 | ;;; public domain; help yourself. 30 | ;;; 31 | ;;; If your Scheme has a faster mechanism for handling optional arguments 32 | ;;; (e.g., Chez), you should definitely port over to it. Note that argument 33 | ;;; defaulting and error-checking are interleaved -- you don't have to 34 | ;;; error-check defaulted START/END args to see if they are fixnums that are 35 | ;;; legal vector indices for the corresponding vector, etc. 36 | -------------------------------------------------------------------------------- /vendor/srfi/%3a132/vbinsearch.scm: -------------------------------------------------------------------------------- 1 | ;;; The sort package -- binary search -*- Scheme -*- 2 | ;;; Copyright (c) 1998 by Olin Shivers. 3 | ;;; This code is in the public domain. 4 | ;;; Olin Shivers 98/11 5 | 6 | ;;; Returns the index of the matching element. 7 | ;;; (vector-binary-search < car 4 '#((1 . one) (3 . three) 8 | ;;; (4 . four) (25 . twenty-five))) 9 | ;;; => 2 10 | 11 | (define (vector-binary-search key< elt->key key v . maybe-start+end) 12 | (call-with-values 13 | (lambda () (vector-start+end v maybe-start+end)) 14 | (lambda (start end) 15 | (let lp ((left start) (right end)) ; Search V[left,right). 16 | (and (< left right) 17 | (let* ((m (quotient (+ left right) 2)) 18 | (elt (vector-ref v m)) 19 | (elt-key (elt->key elt))) 20 | (cond ((key< key elt-key) (lp left m)) 21 | ((key< elt-key key) (lp (+ m 1) right)) 22 | (else m)))))))) 23 | 24 | (define (vector-binary-search3 compare v . maybe-start+end) 25 | (call-with-values 26 | (lambda () (vector-start+end v maybe-start+end)) 27 | (lambda (start end) 28 | (let lp ((left start) (right end)) ; Search V[left,right). 29 | (and (< left right) 30 | (let* ((m (quotient (+ left right) 2)) 31 | (sign (compare (vector-ref v m)))) 32 | (cond ((> sign 0) (lp left m)) 33 | ((< sign 0) (lp (+ m 1) right)) 34 | (else m)))))))) 35 | -------------------------------------------------------------------------------- /vendor/srfi/%3a132/vector-util.scm: -------------------------------------------------------------------------------- 1 | ;;; This code is 2 | ;;; Copyright (c) 1998 by Olin Shivers. 3 | ;;; The terms are: You may do as you please with this code, as long as 4 | ;;; you do not delete this notice or hold me responsible for any outcome 5 | ;;; related to its use. 6 | ;;; 7 | ;;; Blah blah blah. Don't you think source files should contain more lines 8 | ;;; of code than copyright notice? 9 | 10 | (define (vector-portion-copy vec start end) 11 | (let* ((len (vector-length vec)) 12 | (new-len (- end start)) 13 | (new (make-vector new-len))) 14 | (do ((i start (+ i 1)) 15 | (j 0 (+ j 1))) 16 | ((= i end) new) 17 | (vector-set! new j (vector-ref vec i))))) 18 | 19 | (define (vector-copy vec) 20 | (vector-portion-copy vec 0 (vector-length vec))) 21 | 22 | (define (vector-portion-copy! target src start end) 23 | (let ((len (- end start))) 24 | (do ((i (- len 1) (- i 1)) 25 | (j (- end 1) (- j 1))) 26 | ((< i 0)) 27 | (vector-set! target i (vector-ref src j))))) 28 | 29 | (define (has-element list index) 30 | (cond 31 | ((zero? index) 32 | (if (pair? list) 33 | (values #t (car list)) 34 | (values #f #f))) 35 | ((null? list) 36 | (values #f #f)) 37 | (else 38 | (has-element (cdr list) (- index 1))))) 39 | 40 | (define (list-ref-or-default list index default) 41 | (call-with-values 42 | (lambda () (has-element list index)) 43 | (lambda (has? maybe) 44 | (if has? 45 | maybe 46 | default)))) 47 | 48 | (define (vector-start+end vector maybe-start+end) 49 | (let ((start (list-ref-or-default maybe-start+end 50 | 0 0)) 51 | (end (list-ref-or-default maybe-start+end 52 | 1 (vector-length vector)))) 53 | (values start end))) 54 | 55 | (define (vectors-start+end-2 vector-1 vector-2 maybe-start+end) 56 | (let ((start-1 (list-ref-or-default maybe-start+end 57 | 0 0)) 58 | (end-1 (list-ref-or-default maybe-start+end 59 | 1 (vector-length vector-1))) 60 | (start-2 (list-ref-or-default maybe-start+end 61 | 2 0)) 62 | (end-2 (list-ref-or-default maybe-start+end 63 | 3 (vector-length vector-2)))) 64 | (values start-1 end-1 65 | start-2 end-2))) 66 | -------------------------------------------------------------------------------- /vendor/srfi/%3a133.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :133) 2 | (export 3 | ;; Constructors 4 | vector-unfold vector-unfold-right vector-reverse-copy 5 | vector-concatenate vector-append-subvectors 6 | ;; Predicates 7 | vector-empty? vector= 8 | ;; Iteration 9 | vector-fold vector-fold-right vector-map! 10 | vector-count vector-cumulate 11 | ;; Searching 12 | vector-index vector-index-right vector-skip vector-skip-right 13 | vector-binary-search vector-any vector-every vector-partition 14 | ;; Mutators 15 | vector-swap! vector-reverse! 16 | vector-reverse-copy! vector-unfold! vector-unfold-right! 17 | ;; Conversion 18 | reverse-vector->list reverse-list->vector) 19 | (import (srfi :133 vectors))) 20 | -------------------------------------------------------------------------------- /vendor/srfi/%3a133/vectors.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :133 vectors) 2 | (export 3 | ;;; * Constructors 4 | vector-unfold vector-unfold-right vector-copy vector-reverse-copy 5 | vector-append vector-concatenate vector-append-subvectors 6 | 7 | ;;; * Predicates 8 | vector-empty? vector= 9 | 10 | ;;; * Iteration 11 | vector-fold vector-fold-right vector-map vector-map! vector-for-each 12 | vector-count vector-cumulate 13 | 14 | ;;; * Searching 15 | vector-index vector-skip vector-index-right vector-skip-right 16 | vector-binary-search vector-any vector-every vector-partition 17 | 18 | ;;; * Mutators 19 | vector-swap! vector-fill! vector-reverse! vector-copy! vector-reverse-copy! 20 | vector-reverse! vector-unfold! vector-unfold-right! 21 | 22 | ;;; * Conversion 23 | vector->list reverse-vector->list list->vector reverse-list->vector 24 | vector->string string->vector) 25 | (import (rename (rnrs) 26 | (vector-fill! rnrs:vector-fill!) 27 | (vector->list rnrs:vector->list) 28 | (list->vector rnrs:list->vector)) 29 | (rnrs mutable-strings) 30 | (srfi private include)) 31 | (include/resolve ("srfi" "%3a133") "vectors-impl.scm")) 32 | -------------------------------------------------------------------------------- /vendor/srfi/%3a133/vectors.sls3a132.sls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibawt/chezuv/c0f63b1772b0b3de290ebfab235014bd5ce6b866/vendor/srfi/%3a133/vectors.sls3a132.sls -------------------------------------------------------------------------------- /vendor/srfi/%3a14.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :14) 4 | (export 5 | ->char-set 6 | char-set 7 | char-set->list 8 | char-set->string 9 | char-set-adjoin 10 | char-set-adjoin! 11 | char-set-any 12 | char-set-complement 13 | char-set-complement! 14 | char-set-contains? 15 | char-set-copy 16 | char-set-count 17 | char-set-cursor 18 | char-set-cursor-next 19 | char-set-delete 20 | char-set-delete! 21 | char-set-diff+intersection 22 | char-set-diff+intersection! 23 | char-set-difference 24 | char-set-difference! 25 | char-set-every 26 | char-set-filter 27 | char-set-filter! 28 | char-set-fold 29 | char-set-for-each 30 | char-set-hash 31 | char-set-intersection 32 | char-set-intersection! 33 | char-set-map 34 | char-set-ref 35 | char-set-size 36 | char-set-unfold 37 | char-set-unfold! 38 | char-set-union 39 | char-set-union! 40 | char-set-xor 41 | char-set-xor! 42 | char-set:ascii 43 | char-set:blank 44 | char-set:digit 45 | char-set:empty 46 | char-set:full 47 | char-set:graphic 48 | char-set:hex-digit 49 | char-set:iso-control 50 | char-set:letter 51 | char-set:letter+digit 52 | char-set:lower-case 53 | char-set:printing 54 | char-set:punctuation 55 | char-set:symbol 56 | char-set:title-case 57 | char-set:upper-case 58 | char-set:whitespace 59 | char-set<= 60 | char-set= 61 | char-set? 62 | end-of-char-set? 63 | list->char-set 64 | list->char-set! 65 | string->char-set 66 | string->char-set! 67 | ucs-range->char-set 68 | ucs-range->char-set!) 69 | (import (srfi :14 char-sets)) 70 | ) 71 | -------------------------------------------------------------------------------- /vendor/srfi/%3a14/COPYING: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibawt/chezuv/c0f63b1772b0b3de290ebfab235014bd5ce6b866/vendor/srfi/%3a14/COPYING -------------------------------------------------------------------------------- /vendor/srfi/%3a14/char-sets/inversion-list.sls: -------------------------------------------------------------------------------- 1 | ;; -*- mode: scheme; coding: utf-8 -*- 2 | ;; Copyright © 2018 Göran Weinholt 3 | ;; SPDX-License-Identifier: (MIT OR BSD-3-Clause OR LicenseRef-LICENSE) 4 | #!r6rs 5 | 6 | (library (srfi :14 char-sets inversion-list) 7 | (export 8 | inversion-list? 9 | make-empty-inversion-list 10 | number->inversion-list 11 | numbers->inversion-list 12 | range->inversion-list 13 | ranges->inversion-list 14 | 15 | inversion-list=? 16 | inversion-list-adjoin 17 | inversion-list-complement 18 | inversion-list-copy 19 | inversion-list-difference 20 | inversion-list-fold/done? 21 | inversion-list-hash 22 | inversion-list-intersection 23 | inversion-list-member? 24 | inversion-list-remove 25 | inversion-list-size 26 | inversion-list-union 27 | 28 | inversion-list-cursor 29 | inversion-list-cursor? 30 | inversion-list-cursor-ref 31 | inversion-list-cursor-next 32 | inversion-list-cursor-at-end?) 33 | (import 34 | (except (rnrs) define-record-type) 35 | (rnrs r5rs) 36 | (srfi :9 records) 37 | (srfi private include)) 38 | 39 | (define-syntax define-record-discloser 40 | (syntax-rules () 41 | ((_ type discloser) 42 | (define dummy #f)))) 43 | 44 | (let-syntax ((define-record-type 45 | (lambda (x) 46 | (syntax-case x () 47 | ((_ tag typename (constructor field-init* ...) etc ...) 48 | #'(define-record-type typename 49 | (constructor field-init* ...) etc ...)))))) 50 | 51 | (include/resolve ("srfi" "%3a14" "char-sets") "inversion-list.scm"))) 52 | -------------------------------------------------------------------------------- /vendor/srfi/%3a14/srfi-14-char-sets.scm: -------------------------------------------------------------------------------- 1 | ; Part of Scheme 48 1.9. See file COPYING for notices and license. 2 | 3 | ; Authors: Mike Sperber 4 | 5 | ; This constructs the SRFI 14 char sets from thin air and what's defined in 6 | ; srfi-14-base-char-sets.scm. 7 | 8 | ; Defined there: 9 | ; lower-case, upper-case, title-case, letter, digit, punctuation, symbol 10 | 11 | (define char-set:empty (char-set)) 12 | (define char-set:full (char-set-complement char-set:empty)) 13 | 14 | (define char-set:letter+digit 15 | (char-set-union char-set:letter char-set:digit)) 16 | 17 | (define char-set:graphic 18 | (char-set-union char-set:mark 19 | char-set:letter 20 | char-set:digit 21 | char-set:symbol 22 | char-set:punctuation)) 23 | 24 | (define char-set:whitespace 25 | (char-set-union char-set:separator 26 | (list->char-set (map scalar-value->char 27 | '(9 ; tab 28 | 10 ; newline 29 | 11 ; vtab 30 | 12 ; page 31 | 13 ; return 32 | ))))) 33 | 34 | 35 | (define char-set:printing 36 | (char-set-union char-set:whitespace char-set:graphic)) 37 | 38 | (define char-set:iso-control 39 | (char-set-union (ucs-range->char-set 0 #x20) 40 | (ucs-range->char-set #x7f #xa0))) 41 | 42 | (define char-set:blank 43 | (char-set-union char-set:space-separator 44 | (char-set (scalar-value->char 9)))) ; tab 45 | 46 | (define char-set:ascii (ucs-range->char-set 0 128)) 47 | (define char-set:hex-digit (string->char-set "0123456789abcdefABCDEF")) 48 | 49 | (make-char-set-immutable! char-set:empty) 50 | (make-char-set-immutable! char-set:full) 51 | (make-char-set-immutable! char-set:lower-case) 52 | (make-char-set-immutable! char-set:upper-case) 53 | (make-char-set-immutable! char-set:letter) 54 | (make-char-set-immutable! char-set:digit) 55 | (make-char-set-immutable! char-set:hex-digit) 56 | (make-char-set-immutable! char-set:letter+digit) 57 | (make-char-set-immutable! char-set:punctuation) 58 | (make-char-set-immutable! char-set:symbol) 59 | (make-char-set-immutable! char-set:graphic) 60 | (make-char-set-immutable! char-set:whitespace) 61 | (make-char-set-immutable! char-set:printing) 62 | (make-char-set-immutable! char-set:blank) 63 | (make-char-set-immutable! char-set:iso-control) 64 | (make-char-set-immutable! char-set:ascii) 65 | -------------------------------------------------------------------------------- /vendor/srfi/%3a141.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :141) 2 | (export 3 | ceiling/ ceiling-quotient ceiling-remainder 4 | floor/ floor-quotient floor-remainder 5 | truncate/ truncate-quotient truncate-remainder 6 | round/ round-quotient round-remainder 7 | euclidean/ euclidean-quotient euclidean-remainder 8 | balanced/ balanced-quotient balanced-remainder) 9 | (import (srfi :141 integer-division))) 10 | 11 | 12 | -------------------------------------------------------------------------------- /vendor/srfi/%3a141/integer-division.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :141 integer-division) 2 | (export 3 | ceiling/ ceiling-quotient ceiling-remainder 4 | floor/ floor-quotient floor-remainder 5 | truncate/ truncate-quotient truncate-remainder 6 | round/ round-quotient round-remainder 7 | euclidean/ euclidean-quotient euclidean-remainder 8 | balanced/ balanced-quotient balanced-remainder) 9 | (import (rnrs) (rnrs r5rs) (srfi private include)) 10 | 11 | (include/resolve ("srfi" "%3a141") "srfi-141-impl.scm")) 12 | -------------------------------------------------------------------------------- /vendor/srfi/%3a143.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :143) 2 | (export 3 | fx-width fx-greatest fx-least 4 | 5 | fixnum? fx=? fx? fx<=? fx>=? fxzero? fxpositive? fxnegative? fxodd? 6 | fxeven? fxmax fxmin 7 | 8 | fx+ fx- fxneg fx* fxquotient fxremainder fxabs fxsquare fxsqrt 9 | 10 | fx+/carry fx-/carry fx*/carry 11 | 12 | fxnot fxand fxior fxxor fxarithmetic-shift fxarithmetic-shift-left 13 | fxarithmetic-shift-right fxbit-count fxlength fxif fxbit-set? fxcopy-bit 14 | fxfirst-set-bit fxbit-field fxbit-field-rotate fxbit-field-reverse) 15 | (import (srfi :143 fixnums))) 16 | -------------------------------------------------------------------------------- /vendor/srfi/%3a143/fixnums.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :143 fixnums) 2 | (export 3 | fx-width fx-greatest fx-least 4 | 5 | fixnum? fx=? fx? fx<=? fx>=? fxzero? fxpositive? fxnegative? fxodd? 6 | fxeven? fxmax fxmin 7 | 8 | fx+ fx- fxneg fx* fxquotient fxremainder fxabs fxsquare fxsqrt 9 | 10 | fx+/carry fx-/carry fx*/carry 11 | 12 | fxnot fxand fxior fxxor fxarithmetic-shift fxarithmetic-shift-left 13 | fxarithmetic-shift-right fxbit-count fxlength fxif fxbit-set? fxcopy-bit 14 | fxfirst-set-bit fxbit-field fxbit-field-rotate fxbit-field-reverse) 15 | (import (rnrs) (srfi :143 fixnums helpers)) 16 | 17 | (define fx-width (fixnum-width)) 18 | (define fx-greatest (greatest-fixnum)) 19 | (define fx-least (least-fixnum)) 20 | 21 | (define fxneg (lambda (i) (fx- i))) 22 | 23 | (define fxsquare (lambda (i) (fx* i i))) 24 | 25 | (define fxsqrt (lambda (i) (exact-integer-sqrt i))) 26 | 27 | (define fxfirst-set-bit (lambda (i) (fxfirst-bit-set i))) 28 | 29 | (define fxbit-field-rotate (lambda (i c s e) (fxrotate-bit-field i s e c))) 30 | 31 | (define fxbit-field-reverse (lambda (i s e) (fxreverse-bit-field i s e)))) 32 | -------------------------------------------------------------------------------- /vendor/srfi/%3a143/helpers/helpers.chezscheme.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :143 fixnums helpers) 2 | (export fxabs fxremainder fxquotient) 3 | (import (chezscheme))) 4 | -------------------------------------------------------------------------------- /vendor/srfi/%3a143/helpers/helpers.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :143 fixnums helpers) 2 | (export fxabs fxremainder fxquotient) 3 | (import (rnrs) (rnrs r5rs)) 4 | 5 | (define fxabs (lambda (i) (if (fxlist list->bits bits->vector vector->bits 23 | bits 24 | bitwise-fold bitwise-for-each bitwise-unfold 25 | make-bitwise-generator) 26 | (import (srfi :151 bitwise-operations))) 27 | -------------------------------------------------------------------------------- /vendor/srfi/%3a152.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :152) 2 | (export 3 | ;; Predicates 4 | string? string-null? string-every string-any 5 | 6 | ;; Constructors 7 | make-string string string-tabulate string-unfold string-unfold-right 8 | 9 | ;; Conversion 10 | string->vector string->list vector->string list->string reverse-list->string 11 | 12 | ;; Selection 13 | string-length string-ref substring string-copy string-take 14 | string-take-right string-drop string-drop-right string-pad string-pad-right 15 | string-trim string-trim-right string-trim-both 16 | 17 | ;; Replacement 18 | string-replace 19 | 20 | ;; Comparision 21 | string=? string-ci=? string? string-ci>? string<=? 22 | string-ci<=? string>=? string-ci>=? 23 | 24 | ;; Prefixes and suffixes 25 | string-prefix-length string-suffix-length string-prefix? string-suffix? 26 | 27 | ;; Searching 28 | string-index string-index-right string-skip string-skip-right 29 | string-contains string-contains-right string-take-while 30 | string-take-while-right string-drop-while string-drop-while-right 31 | string-break string-span 32 | 33 | ;; Concatenation 34 | string-append string-concatenate string-concatenate-reverse string-join 35 | 36 | ;; Fold and map and friends 37 | string-fold string-fold-right string-map string-for-each string-count 38 | string-filter string-remove 39 | 40 | ;; Replication and splitting 41 | string-replicate string-segment string-split 42 | 43 | ;; Input-output 44 | read-string write-string 45 | 46 | ;; Mutation 47 | string-set! string-fill! string-copy!) 48 | (import (srfi :152 strings))) 49 | -------------------------------------------------------------------------------- /vendor/srfi/%3a152/extend-comparisons.scm: -------------------------------------------------------------------------------- 1 | ;;; Extend comparisons to 0 and 1 arguments. 2 | ;; 2017-10-04 Sudarshan S Chawathe 3 | 4 | ;; For each (name . base-name) pair in arguments, define name to be 5 | ;; comparison procedure similar to base-name, but allow it to accept 0 6 | ;; or 1 arguments in addition to more (as permitted by base-name), 7 | ;; returning true in the former cases. 8 | (define-syntax define-comparison/base/pairs 9 | (syntax-rules () 10 | ((_ (name . base-name) ...) 11 | (begin 12 | (define (name . strs) 13 | (or (null? strs) 14 | (null? (cdr strs)) 15 | (apply base-name strs))) ...)))) 16 | 17 | ;; Extend the usual string comparison procedures as above. 18 | (define-comparison/base/pairs 19 | (string=? . base-string=?) 20 | (string? . base-string>?) 22 | (string<=? . base-string<=?) 23 | (string>=? . base-string>=?) 24 | (string-ci=? . base-string-ci=?) 25 | (string-ci? . base-string-ci>?) 27 | (string-ci<=? . base-string-ci<=?) 28 | (string-ci>=? . base-string-ci>=?)) 29 | 30 | ;;; 31 | -------------------------------------------------------------------------------- /vendor/srfi/%3a152/macros.scm: -------------------------------------------------------------------------------- 1 | ;;;; Definitions of macros 2 | 3 | ;;; From SRFI 8 4 | (define-syntax receive 5 | (syntax-rules () 6 | ((receive formals expression body ...) 7 | (call-with-values (lambda () expression) 8 | (lambda formals body ...))))) 9 | 10 | ;;; Shivers-compatible let-optionals* 11 | ;;; This version from Scheme-48 1.9.2, 12 | ;;; using error instead of assertion-violation 13 | (define-syntax let-optionals* 14 | (syntax-rules () 15 | ((let-optionals* arg (opt-clause ...) body ...) 16 | (let ((rest arg)) 17 | (%let-optionals* rest (opt-clause ...) body ...))))) 18 | 19 | (define-syntax %let-optionals* 20 | (syntax-rules () 21 | ((%let-optionals* arg (((var ...) xparser) opt-clause ...) body ...) 22 | (call-with-values (lambda () (xparser arg)) 23 | (lambda (rest var ...) 24 | (%let-optionals* rest (opt-clause ...) body ...)))) 25 | 26 | ((%let-optionals* arg ((var default) opt-clause ...) body ...) 27 | (call-with-values (lambda () (if (null? arg) (values default '()) 28 | (values (car arg) (cdr arg)))) 29 | (lambda (var rest) 30 | (%let-optionals* rest (opt-clause ...) body ...)))) 31 | 32 | ((%let-optionals* arg ((var default test) opt-clause ...) body ...) 33 | (call-with-values (lambda () 34 | (if (null? arg) (values default '()) 35 | (let ((var (car arg))) 36 | (if test (values var (cdr arg)) 37 | (error "arg failed LET-OPT test" var))))) 38 | (lambda (var rest) 39 | (%let-optionals* rest (opt-clause ...) body ...)))) 40 | 41 | ((%let-optionals* arg ((var default test supplied?) opt-clause ...) body ...) 42 | (call-with-values (lambda () 43 | (if (null? arg) (values default #f '()) 44 | (let ((var (car arg))) 45 | (if test (values var #t (cdr arg)) 46 | (error "arg failed LET-OPT test" var))))) 47 | (lambda (var supplied? rest) 48 | (%let-optionals* rest (opt-clause ...) body ...)))) 49 | 50 | ((%let-optionals* arg (rest) body ...) 51 | (let ((rest arg)) body ...)) 52 | 53 | ((%let-optionals* arg () body ...) 54 | (if (null? arg) (begin body ...) 55 | (error "Too many arguments in let-opt" arg))))) 56 | 57 | -------------------------------------------------------------------------------- /vendor/srfi/%3a152/strings.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :152 strings) 2 | (export 3 | ;; Predicates 4 | string? string-null? string-every string-any 5 | 6 | ;; Constructors 7 | make-string string string-tabulate string-unfold string-unfold-right 8 | 9 | ;; Conversion 10 | string->vector string->list vector->string list->string reverse-list->string 11 | 12 | ;; Selection 13 | string-length string-ref substring string-copy string-take 14 | string-take-right string-drop string-drop-right string-pad string-pad-right 15 | string-trim string-trim-right string-trim-both 16 | 17 | ;; Replacement 18 | string-replace 19 | 20 | ;; Comparision 21 | string=? string-ci=? string? string-ci>? string<=? 22 | string-ci<=? string>=? string-ci>=? 23 | 24 | ;; Prefixes and suffixes 25 | string-prefix-length string-suffix-length string-prefix? string-suffix? 26 | 27 | ;; Searching 28 | string-index string-index-right string-skip string-skip-right 29 | string-contains string-contains-right string-take-while 30 | string-take-while-right string-drop-while string-drop-while-right 31 | string-break string-span 32 | 33 | ;; Concatenation 34 | string-append string-concatenate string-concatenate-reverse string-join 35 | 36 | ;; Fold and map and friends 37 | string-fold string-fold-right string-map string-for-each string-count 38 | string-filter string-remove 39 | 40 | ;; Replication and splitting 41 | string-replicate string-segment string-split 42 | 43 | ;; Input-output 44 | read-string write-string 45 | 46 | ;; Mutation 47 | string-set! string-fill! string-copy!) 48 | (import (rename 49 | (except (rnrs) string->list string-for-each string-copy error) 50 | (string=? base-string=?) 51 | (string? base-string>?) 53 | (string<=? base-string<=?) 54 | (string>=? base-string>=?) 55 | (string-ci=? base-string-ci=?) 56 | (string-ci? base-string-ci>?) 58 | (string-ci<=? base-string-ci<=?) 59 | (string-ci>=? base-string-ci>=?)) 60 | (except (rnrs mutable-strings) string-fill!) 61 | (rnrs r5rs) 62 | (srfi :0) (srfi :23) 63 | (srfi private include)) 64 | 65 | (include/resolve ("srfi" "%3a152") "macros.scm") 66 | (include/resolve ("srfi" "%3a152") "portable.scm") 67 | (include/resolve ("srfi" "%3a152") "r7rs-shim.scm") 68 | (include/resolve ("srfi" "%3a152") "extend-comparisons.scm")) 69 | -------------------------------------------------------------------------------- /vendor/srfi/%3a156.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :156) 2 | (export is isnt) 3 | (import (srfi :156 predicate-combiners))) 4 | -------------------------------------------------------------------------------- /vendor/srfi/%3a156/predicate-combiners.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :156 predicate-combiners) 2 | (export is isnt) 3 | (import (rnrs) (srfi private include)) 4 | 5 | (include/resolve ("srfi" "%3a156") "srfi-156-impl.scm")) 6 | -------------------------------------------------------------------------------- /vendor/srfi/%3a158.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :158) 2 | (export 3 | ;; Generator constructors 4 | generator circular-generator make-iota-generator make-range-generator 5 | make-coroutine-generator list->generator vector->generator 6 | reverse-vector->generator string->generator bytevector->generator 7 | make-for-each-generator make-unfold-generator 8 | 9 | ;; Generator operations 10 | gcons* gappend gflatten ggroup gmerge gmap gcombine gfilter gremove 11 | gstate-filter gtake gdrop gtake-while gdrop-while gdelete 12 | gdelete-neighbor-dups gindex gselect 13 | 14 | ;; Consuming generated values 15 | generator->list generator->reverse-list generator->vector 16 | generator->vector! generator->string generator-fold generator-for-each 17 | generator-map->list generator-find generator-count generator-any 18 | generator-every generator-unfold 19 | 20 | ;; accumulator constructors 21 | make-accumulator count-accumulator list-accumulator 22 | reverse-list-accumulator vector-accumulator reverse-vector-accumulator 23 | vector-accumulator! string-accumulator bytevector-accumulator 24 | bytevector-accumulator! sum-accumulator product-accumulator) 25 | (import (srfi :158 generators-and-accumulators))) 26 | -------------------------------------------------------------------------------- /vendor/srfi/%3a158/generators-and-accumulators.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :158 generators-and-accumulators) 2 | (export 3 | ;; Generator constructors 4 | generator circular-generator make-iota-generator make-range-generator 5 | make-coroutine-generator list->generator vector->generator 6 | reverse-vector->generator string->generator bytevector->generator 7 | make-for-each-generator make-unfold-generator 8 | 9 | ;; Generator operations 10 | gcons* gappend gflatten ggroup gmerge gmap gcombine gfilter gremove 11 | gstate-filter gtake gdrop gtake-while gdrop-while gdelete 12 | gdelete-neighbor-dups gindex gselect 13 | 14 | ;; Consuming generated values 15 | generator->list generator->reverse-list generator->vector 16 | generator->vector! generator->string generator-fold generator-for-each 17 | generator-map->list generator-find generator-count generator-any 18 | generator-every generator-unfold 19 | 20 | ;; accumulator constructors 21 | make-accumulator count-accumulator list-accumulator 22 | reverse-list-accumulator vector-accumulator reverse-vector-accumulator 23 | vector-accumulator! string-accumulator bytevector-accumulator 24 | bytevector-accumulator! sum-accumulator product-accumulator) 25 | (import (rnrs) 26 | (only (srfi :1) make-list) 27 | (srfi private include) 28 | (srfi private define-values)) 29 | 30 | (include/resolve ("srfi" "%3a158") "srfi-158-impl.scm")) 31 | -------------------------------------------------------------------------------- /vendor/srfi/%3a16.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :16) 4 | (export 5 | case-lambda) 6 | (import (srfi :16 case-lambda)) 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/srfi/%3a16/case-lambda.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :16 case-lambda) 6 | (export 7 | case-lambda) 8 | (import 9 | (only (rnrs control) case-lambda)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a17.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :17) 2 | (export getter-with-setter set! 3 | car cdr 4 | caar cadr cdar cddr 5 | caaar caadr cadar caddr cdaar cdadr cddar cdddr 6 | caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr 7 | cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr 8 | string-ref vector-ref 9 | bytevector-ieee-double-native-ref bytevector-ieee-double-ref 10 | bytevector-ieee-single-native-ref bytevector-ieee-single-ref 11 | bytevector-s16-native-ref bytevector-s16-ref bytevector-s24-ref 12 | bytevector-s32-native-ref bytevector-s32-ref bytevector-s40-ref 13 | bytevector-s48-ref bytevector-s56-ref bytevector-s64-native-ref 14 | bytevector-s64-ref bytevector-s8-ref bytevector-sint-ref 15 | bytevector-u16-native-ref bytevector-u16-ref bytevector-u24-ref 16 | bytevector-u32-native-ref bytevector-u32-ref bytevector-u40-ref 17 | bytevector-u48-ref bytevector-u56-ref bytevector-u64-native-ref 18 | bytevector-u64-ref bytevector-u8-ref bytevector-uint-ref 19 | foreign-ref fxvector-ref hashtable-ref eq-hashtable-ref 20 | symbol-hashtable-ref list-ref) 21 | (import (srfi :17 generalized-set!))) 22 | -------------------------------------------------------------------------------- /vendor/srfi/%3a17/generalized-set!.chezscheme.sls: -------------------------------------------------------------------------------- 1 | generalized-set%21.chezscheme.sls -------------------------------------------------------------------------------- /vendor/srfi/%3a19.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :19) 4 | (export 5 | add-duration 6 | add-duration! 7 | copy-time 8 | current-date 9 | current-julian-day 10 | current-modified-julian-day 11 | current-time 12 | date->julian-day 13 | date->modified-julian-day 14 | date->string 15 | date->time-monotonic 16 | date->time-tai 17 | date->time-utc 18 | date-day 19 | date-hour 20 | date-minute 21 | date-month 22 | date-nanosecond 23 | date-second 24 | date-week-day 25 | date-week-number 26 | date-year 27 | date-year-day 28 | date-zone-offset 29 | date? 30 | julian-day->date 31 | julian-day->time-monotonic 32 | julian-day->time-tai 33 | julian-day->time-utc 34 | make-date 35 | make-time 36 | modified-julian-day->date 37 | modified-julian-day->time-monotonic 38 | modified-julian-day->time-tai 39 | modified-julian-day->time-utc 40 | set-time-nanosecond! 41 | set-time-second! 42 | set-time-type! 43 | string->date 44 | subtract-duration 45 | subtract-duration! 46 | time-difference 47 | time-difference! 48 | time-duration 49 | time-monotonic 50 | time-monotonic->date 51 | time-monotonic->julian-day 52 | time-monotonic->modified-julian-day 53 | time-monotonic->time-tai 54 | time-monotonic->time-tai! 55 | time-monotonic->time-utc 56 | time-monotonic->time-utc! 57 | time-nanosecond 58 | time-process 59 | time-resolution 60 | time-second 61 | time-tai 62 | time-tai->date 63 | time-tai->julian-day 64 | time-tai->modified-julian-day 65 | time-tai->time-monotonic 66 | time-tai->time-monotonic! 67 | time-tai->time-utc 68 | time-tai->time-utc! 69 | time-thread 70 | time-type 71 | time-utc 72 | time-utc->date 73 | time-utc->julian-day 74 | time-utc->modified-julian-day 75 | time-utc->time-monotonic 76 | time-utc->time-monotonic! 77 | time-utc->time-tai 78 | time-utc->time-tai! 79 | time<=? 80 | time=? 83 | time>? 84 | time?) 85 | (import (srfi :19 time)) 86 | ) 87 | -------------------------------------------------------------------------------- /vendor/srfi/%3a19/time/compat.chezscheme.sls: -------------------------------------------------------------------------------- 1 | ;;; Copyright (c) 2012 Aaron W. Hsu 2 | ;;; 3 | ;;; Permission to use, copy, modify, and distribute this software for 4 | ;;; any purpose with or without fee is hereby granted, provided that the 5 | ;;; above copyright notice and this permission notice appear in all 6 | ;;; copies. 7 | ;;; 8 | ;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 9 | ;;; WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 10 | ;;; WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 11 | ;;; AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 12 | ;;; DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA 13 | ;;; OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 14 | ;;; TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | ;;; PERFORMANCE OF THIS SOFTWARE. 16 | 17 | (library (srfi :19 time compat) 18 | (export time-resolution 19 | timezone-offset 20 | current-time 21 | cumulative-thread-time 22 | (rename (cpu-time cumulative-process-time)) 23 | cumulative-gc-time 24 | time-nanosecond 25 | time-second) 26 | (import (chezscheme)) 27 | 28 | (define time-resolution 1) 29 | 30 | (define (cumulative-thread-time . args) 31 | (assertion-violation 'cumulative-thread-time "not implemented")) 32 | 33 | (define (cumulative-gc-time) (sstats-gc-cpu (statistics))) 34 | 35 | (define timezone-offset (date-zone-offset (time-utc->date (current-time)))) 36 | 37 | ) 38 | -------------------------------------------------------------------------------- /vendor/srfi/%3a19/time/compat.ikarus.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :19 time compat) 6 | (export 7 | time-resolution 8 | timezone-offset 9 | current-time 10 | cumulative-thread-time 11 | cumulative-process-time 12 | cumulative-gc-time 13 | time-nanosecond 14 | time-second) 15 | (import 16 | (rnrs base) 17 | (only (ikarus) 18 | current-time 19 | time-nanosecond 20 | time-second 21 | time-gmt-offset) 22 | (srfi :19 time not-implemented)) 23 | 24 | ;; Ikarus uses gettimeofday() which gives microseconds, 25 | ;; so our resolution is 1000 nanoseconds 26 | (define time-resolution 1000) 27 | 28 | (define timezone-offset (time-gmt-offset (current-time))) 29 | ) 30 | -------------------------------------------------------------------------------- /vendor/srfi/%3a19/time/compat.larceny.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :19 time compat) 6 | (export 7 | time-resolution 8 | (rename (my:timezone-offset timezone-offset)) 9 | current-time 10 | cumulative-thread-time 11 | cumulative-process-time 12 | cumulative-gc-time 13 | time-nanosecond 14 | time-second) 15 | (import 16 | (rnrs base) 17 | (primitives r5rs:require current-utc-time timezone-offset) 18 | (srfi :19 time not-implemented)) 19 | 20 | (define dummy (begin (r5rs:require 'time) #F)) 21 | 22 | ;; Larceny uses gettimeofday() which gives microseconds, 23 | ;; so our resolution is 1000 nanoseconds 24 | (define time-resolution 1000) 25 | 26 | (define my:timezone-offset 27 | (let-values (((secs _) (current-utc-time))) 28 | (timezone-offset secs))) 29 | 30 | (define (current-time) 31 | (let-values (((secs micros) (current-utc-time))) 32 | (cons secs (* micros 1000)))) 33 | 34 | (define time-nanosecond cdr) 35 | (define time-second car) 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/srfi/%3a19/time/compat.mzscheme.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :19 time compat) 6 | (export 7 | time-resolution 8 | timezone-offset 9 | current-time 10 | cumulative-thread-time 11 | cumulative-process-time 12 | cumulative-gc-time 13 | time-nanosecond 14 | time-second) 15 | (import 16 | (rnrs base) 17 | (only (scheme base) 18 | current-seconds 19 | seconds->date 20 | date-time-zone-offset 21 | current-inexact-milliseconds 22 | current-thread 23 | current-process-milliseconds 24 | current-gc-milliseconds)) 25 | 26 | ;; MzScheme uses milliseconds, so our resolution in nanoseconds is #e1e6 27 | (define time-resolution #e1e6) 28 | 29 | (define timezone-offset 30 | (date-time-zone-offset (seconds->date (current-seconds)))) 31 | 32 | (define (millis->repr x) 33 | (let-values (((d m) (div-and-mod x 1000))) 34 | (cons d (* m #e1e6)))) 35 | 36 | (define (current-time) 37 | (millis->repr (exact (floor (current-inexact-milliseconds))))) 38 | 39 | (define (cumulative-thread-time) 40 | (millis->repr (current-process-milliseconds (current-thread)))) 41 | 42 | (define (cumulative-process-time) 43 | (millis->repr (current-process-milliseconds #F))) 44 | 45 | (define (cumulative-gc-time) 46 | (millis->repr (current-gc-milliseconds))) 47 | 48 | (define time-nanosecond cdr) 49 | (define time-second car) 50 | ) 51 | -------------------------------------------------------------------------------- /vendor/srfi/%3a19/time/compat.ypsilon.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :19 time compat) 6 | (export 7 | time-resolution 8 | timezone-offset 9 | current-time 10 | cumulative-thread-time 11 | cumulative-process-time 12 | cumulative-gc-time 13 | time-nanosecond 14 | time-second) 15 | (import 16 | (rnrs base) 17 | (only (core) microsecond microsecond->utc) 18 | (srfi :19 time not-implemented)) 19 | 20 | (define time-resolution 1000) 21 | 22 | (define timezone-offset 23 | (let ((t (microsecond))) 24 | (/ (- t (microsecond->utc t)) #e1e6))) 25 | 26 | (define (current-time) 27 | (let-values (((d m) (div-and-mod (microsecond) #e1e6))) 28 | (cons d (* m 1000)))) 29 | 30 | (define time-nanosecond cdr) 31 | (define time-second car) 32 | ) 33 | -------------------------------------------------------------------------------- /vendor/srfi/%3a19/time/not-implemented.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :19 time not-implemented) 6 | (export 7 | cumulative-thread-time 8 | cumulative-process-time 9 | cumulative-gc-time) 10 | (import 11 | (rnrs base)) 12 | 13 | (define (NI who) 14 | (lambda _ (assertion-violation who "not implemented"))) 15 | 16 | (define-syntax not-implemented 17 | (syntax-rules () 18 | ((_ name ...) 19 | (begin 20 | (define name (NI 'name)) 21 | ...)))) 22 | 23 | (not-implemented 24 | cumulative-thread-time 25 | cumulative-process-time 26 | cumulative-gc-time) 27 | ) 28 | -------------------------------------------------------------------------------- /vendor/srfi/%3a2.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :2) 4 | (export 5 | and-let*) 6 | (import (srfi :2 and-let*)) 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/srfi/%3a2/and-let%2a.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :2 and-let*) 6 | (export 7 | and-let*) 8 | (import 9 | (rnrs)) 10 | 11 | (define-syntax and-let* 12 | (syntax-rules () 13 | ((_ . r) 14 | (and-let*-core #T . r)))) 15 | 16 | (define-syntax and-let*-core 17 | (lambda (stx) 18 | (syntax-case stx () 19 | ((kw _ ((var expr) . c) . b) 20 | #'(let ((var expr)) 21 | (and var 22 | (kw var c . b)))) 23 | ((kw last ((expr) . c) . b) 24 | #'(kw last ((t expr) . c) . b)) 25 | ((kw _ (id . c) . b) 26 | (identifier? #'id) 27 | #'(and id 28 | (kw id c . b))) 29 | ((_ last ()) 30 | #'last) 31 | ((_ _ () . b) 32 | #'(let () . b))))) 33 | ) 34 | -------------------------------------------------------------------------------- /vendor/srfi/%3a2/and-let*.sls: -------------------------------------------------------------------------------- 1 | and-let%2a.sls -------------------------------------------------------------------------------- /vendor/srfi/%3a23.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :23) 4 | (export 5 | error) 6 | (import (srfi :23 error)) 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/srfi/%3a23/error.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :23 error) 6 | (export 7 | error) 8 | (import 9 | (rename (rnrs base) (error rnrs:error))) 10 | 11 | (define (error . args) 12 | (apply rnrs:error #F args)) 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/srfi/%3a23/error/tricks.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :23 error tricks) 6 | (export 7 | SRFI-23-error->R6RS) 8 | (import 9 | (rnrs)) 10 | 11 | (define-syntax error-wrap 12 | (lambda (stx) 13 | (syntax-case stx () 14 | ((_ ctxt signal . forms) 15 | (with-syntax ((e (datum->syntax #'ctxt 'error))) 16 | #'(let-syntax ((e (identifier-syntax signal))) 17 | . forms)))))) 18 | 19 | (define (AV who) 20 | (lambda args (apply assertion-violation who args))) 21 | 22 | (define-syntax SRFI-23-error->R6RS 23 | (lambda (stx) 24 | (syntax-case stx () 25 | ((ctxt ewho . forms) 26 | (with-syntax ((e (datum->syntax #'ctxt 'error)) 27 | (d (datum->syntax #'ctxt 'define))) 28 | #'(let-syntax ((e (identifier-syntax (AV 'ewho))) 29 | (d (lambda (stx) 30 | (syntax-case stx () 31 | ((kw (id . formals) . body) 32 | (identifier? #'id) 33 | #'(error-wrap kw (AV 'id) 34 | (d (id . formals) . body))) 35 | ((kw id . r) 36 | (identifier? #'id) 37 | #'(error-wrap kw (AV 'id) 38 | (d id . r))))))) 39 | . forms)))))) 40 | ) 41 | -------------------------------------------------------------------------------- /vendor/srfi/%3a25.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :25) 4 | (export 5 | array 6 | array-end 7 | array-rank 8 | array-ref 9 | array-set! 10 | array-start 11 | array? 12 | make-array 13 | shape 14 | share-array) 15 | (import (srfi :25 multi-dimensional-arrays)) 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/srfi/%3a25/array.scm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibawt/chezuv/c0f63b1772b0b3de290ebfab235014bd5ce6b866/vendor/srfi/%3a25/array.scm -------------------------------------------------------------------------------- /vendor/srfi/%3a25/multi-dimensional-arrays.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :25 multi-dimensional-arrays) 6 | (export 7 | array? 8 | make-array 9 | shape 10 | array 11 | array-rank 12 | array-start 13 | array-end 14 | array-ref 15 | array-set! 16 | share-array) 17 | (import 18 | (srfi :25 multi-dimensional-arrays all)) 19 | ) 20 | -------------------------------------------------------------------------------- /vendor/srfi/%3a25/multi-dimensional-arrays/arlib.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :25 multi-dimensional-arrays arlib) 6 | (export 7 | array-shape 8 | array-length 9 | array-size 10 | array-equal? 11 | shape-for-each 12 | array-for-each-index 13 | tabulate-array 14 | tabulate-array! 15 | array-retabulate! 16 | array-map 17 | array-map! 18 | array->vector 19 | array->list 20 | share-array/prefix 21 | share-row 22 | share-column 23 | share-array/origin 24 | share-array/index! 25 | array-append 26 | transpose 27 | share-nths) 28 | (import 29 | (rnrs) 30 | (rnrs r5rs) 31 | (srfi :23 error tricks) 32 | (srfi :25 multi-dimensional-arrays all) 33 | (srfi private include)) 34 | 35 | (SRFI-23-error->R6RS "(library (srfi :25 multi-dimensional-arrays arlib))" 36 | (include/resolve ("srfi" "%3a25") "arlib.scm")) 37 | ) 38 | -------------------------------------------------------------------------------- /vendor/srfi/%3a26.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :26) 4 | (export 5 | cut 6 | cute 7 | <> 8 | <...>) 9 | (import (srfi :26 cut)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a26/check.scm: -------------------------------------------------------------------------------- 1 | ; CONFIDENCE TEST FOR IMPLEMENTATION OF SRFI-26 2 | ; ============================================= 3 | ; 4 | ; Sebastian.Egner@philips.com, 3-Jun-2002. 5 | ; 6 | ; This file checks a few assertions about the implementation. 7 | ; If you run it and no error message is issued, the implementation 8 | ; is correct on the cases that have been tested. 9 | ; 10 | ; compliance: 11 | ; Scheme R5RS with 12 | ; SRFI-23: error 13 | ; 14 | ; loading this file into Scheme 48 0.57 after 'cut.scm' has been loaded: 15 | ; ,open srfi-23 16 | ; ,load check.scm 17 | 18 | ; (check expr) 19 | ; evals expr and issues an error if it is not #t. 20 | 21 | (define (check expr) 22 | (if (not (eq? (eval expr (interaction-environment)) #t)) 23 | (error "check failed" expr))) 24 | 25 | ; (check-all) 26 | ; runs several tests on cut and reports. 27 | 28 | (define (check-all) 29 | (for-each 30 | check 31 | '( ; cuts 32 | (equal? ((cut list)) '()) 33 | (equal? ((cut list <...>)) '()) 34 | (equal? ((cut list 1)) '(1)) 35 | (equal? ((cut list <>) 1) '(1)) 36 | (equal? ((cut list <...>) 1) '(1)) 37 | (equal? ((cut list 1 2)) '(1 2)) 38 | (equal? ((cut list 1 <>) 2) '(1 2)) 39 | (equal? ((cut list 1 <...>) 2) '(1 2)) 40 | (equal? ((cut list 1 <...>) 2 3 4) '(1 2 3 4)) 41 | (equal? ((cut list 1 <> 3 <>) 2 4) '(1 2 3 4)) 42 | (equal? ((cut list 1 <> 3 <...>) 2 4 5 6) '(1 2 3 4 5 6)) 43 | (equal? (let* ((x 'wrong) (y (cut list x))) (set! x 'ok) (y)) '(ok)) 44 | (equal? 45 | (let ((a 0)) 46 | (map (cut + (begin (set! a (+ a 1)) a) <>) 47 | '(1 2)) 48 | a) 49 | 2) 50 | ; cutes 51 | (equal? ((cute list)) '()) 52 | (equal? ((cute list <...>)) '()) 53 | (equal? ((cute list 1)) '(1)) 54 | (equal? ((cute list <>) 1) '(1)) 55 | (equal? ((cute list <...>) 1) '(1)) 56 | (equal? ((cute list 1 2)) '(1 2)) 57 | (equal? ((cute list 1 <>) 2) '(1 2)) 58 | (equal? ((cute list 1 <...>) 2) '(1 2)) 59 | (equal? ((cute list 1 <...>) 2 3 4) '(1 2 3 4)) 60 | (equal? ((cute list 1 <> 3 <>) 2 4) '(1 2 3 4)) 61 | (equal? ((cute list 1 <> 3 <...>) 2 4 5 6) '(1 2 3 4 5 6)) 62 | (equal? (let* ((x 'ok) (y (cute list x))) (set! x 'wrong) (y)) '(ok)) 63 | (equal? 64 | (let ((a 0)) 65 | (map (cute + (begin (set! a (+ a 1)) a) <>) 66 | '(1 2)) 67 | a) 68 | 1)))) 69 | 70 | ; run the checks when loading 71 | (check-all) 72 | (display "passed") 73 | (newline) -------------------------------------------------------------------------------- /vendor/srfi/%3a26/cut.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :26 cut) 6 | (export cut cute <> <...>) 7 | (import (rnrs) (srfi private include)) 8 | 9 | (include/resolve ("srfi" "%3a26") "cut.scm") 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a27.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :27) 4 | (export 5 | default-random-source 6 | make-random-source 7 | random-integer 8 | random-real 9 | random-source-make-integers 10 | random-source-make-reals 11 | random-source-pseudo-randomize! 12 | random-source-randomize! 13 | random-source-state-ref 14 | random-source-state-set! 15 | random-source?) 16 | (import (srfi :27 random-bits)) 17 | ) 18 | -------------------------------------------------------------------------------- /vendor/srfi/%3a27/mrg32k3a-a.scm: -------------------------------------------------------------------------------- 1 | ; 54-BIT INTEGER IMPLEMENTATION OF THE "MRG32K3A"-GENERATOR 2 | ; ========================================================= 3 | ; 4 | ; Sebastian.Egner@philips.com, Mar-2002. 5 | ; 6 | ; This file is an implementation of Pierre L'Ecuyer's MRG32k3a 7 | ; pseudo random number generator. Please refer to 'mrg32k3a.scm' 8 | ; for more information. 9 | ; 10 | ; compliance: 11 | ; Scheme R5RS with integers covering at least {-2^53..2^53-1}. 12 | ; 13 | ; history of this file: 14 | ; SE, 18-Mar-2002: initial version 15 | ; SE, 22-Mar-2002: comments adjusted, range added 16 | ; SE, 25-Mar-2002: pack/unpack just return their argument 17 | 18 | ; the actual generator 19 | 20 | (define (mrg32k3a-random-m1 state) 21 | (let ((x11 (vector-ref state 0)) 22 | (x12 (vector-ref state 1)) 23 | (x13 (vector-ref state 2)) 24 | (x21 (vector-ref state 3)) 25 | (x22 (vector-ref state 4)) 26 | (x23 (vector-ref state 5))) 27 | (let ((x10 (modulo (- (* 1403580 x12) (* 810728 x13)) 4294967087)) 28 | (x20 (modulo (- (* 527612 x21) (* 1370589 x23)) 4294944443))) 29 | (vector-set! state 0 x10) 30 | (vector-set! state 1 x11) 31 | (vector-set! state 2 x12) 32 | (vector-set! state 3 x20) 33 | (vector-set! state 4 x21) 34 | (vector-set! state 5 x22) 35 | (modulo (- x10 x20) 4294967087)))) 36 | 37 | ; interface to the generic parts of the generator 38 | 39 | (define (mrg32k3a-pack-state unpacked-state) 40 | unpacked-state) 41 | 42 | (define (mrg32k3a-unpack-state state) 43 | state) 44 | 45 | (define (mrg32k3a-random-range) ; m1 46 | 4294967087) 47 | 48 | (define (mrg32k3a-random-integer state range) ; rejection method 49 | (let* ((q (quotient 4294967087 range)) 50 | (qn (* q range))) 51 | (do ((x (mrg32k3a-random-m1 state) (mrg32k3a-random-m1 state))) 52 | ((< x qn) (quotient x q))))) 53 | 54 | (define (mrg32k3a-random-real state) ; normalization is 1/(m1+1) 55 | (* 0.0000000002328306549295728 (+ 1.0 (mrg32k3a-random-m1 state)))) 56 | 57 | -------------------------------------------------------------------------------- /vendor/srfi/%3a27/random-bits.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :27 random-bits) 6 | (export 7 | random-integer 8 | random-real 9 | default-random-source 10 | make-random-source 11 | random-source? 12 | random-source-state-ref 13 | random-source-state-set! 14 | random-source-randomize! 15 | random-source-pseudo-randomize! 16 | random-source-make-integers 17 | random-source-make-reals) 18 | (import 19 | (rnrs) 20 | (rnrs r5rs) 21 | (only (srfi :19 time) current-time time-nanosecond) 22 | (srfi :23 error tricks) 23 | (srfi private include)) 24 | 25 | (define-record-type (:random-source :random-source-make :random-source?) 26 | (fields state-ref 27 | state-set! 28 | randomize! 29 | pseudo-randomize! 30 | make-integers 31 | make-reals)) 32 | 33 | (define (:random-source-current-time) 34 | (time-nanosecond (current-time))) 35 | 36 | (SRFI-23-error->R6RS "(library (srfi :27 random-bits))" 37 | (include/resolve ("srfi" "%3a27") "mrg32k3a-a.scm") 38 | (include/resolve ("srfi" "%3a27") "mrg32k3a.scm")) 39 | ) 40 | -------------------------------------------------------------------------------- /vendor/srfi/%3a28.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :28) (export format) (import (srfi :28 basic-format-strings))) 2 | -------------------------------------------------------------------------------- /vendor/srfi/%3a29.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :29) 2 | (export current-language current-country current-locale-details 3 | declare-bundle! store-bundle store-bundle! load-bundle! 4 | localized-template) 5 | (import (srfi :29 localization))) 6 | -------------------------------------------------------------------------------- /vendor/srfi/%3a31.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :31) 4 | (export 5 | rec) 6 | (import (srfi :31 rec)) 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/srfi/%3a31/rec.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :31 rec) 6 | (export rec) 7 | (import (rnrs)) 8 | 9 | ;; Taken directly from the SRFI-31 10 | (define-syntax rec 11 | (syntax-rules () 12 | ((rec (NAME . VARIABLES) . BODY) 13 | (letrec ( (NAME (lambda VARIABLES . BODY)) ) NAME)) 14 | ((rec NAME EXPRESSION) 15 | (letrec ( (NAME EXPRESSION) ) NAME)))) 16 | 17 | ) 18 | -------------------------------------------------------------------------------- /vendor/srfi/%3a34.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :34) 2 | (export with-exception-handler guard raise) 3 | (import (srfi :34 exception-handling))) 4 | -------------------------------------------------------------------------------- /vendor/srfi/%3a35.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :35) 2 | (export make-condition-type condition-type? make-condition condition? 3 | condition-has-type? condition-ref make-compound-condition 4 | extract-condition define-condition-type condition &condition &serious 5 | &error) 6 | (import (srfi :35 conditions))) 7 | -------------------------------------------------------------------------------- /vendor/srfi/%3a37.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :37) 4 | (export 5 | args-fold 6 | option 7 | option-names 8 | option-optional-arg? 9 | option-processor 10 | option-required-arg? 11 | option?) 12 | (import (srfi :37 args-fold)) 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/srfi/%3a37/args-fold.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :37 args-fold) 6 | (export 7 | args-fold 8 | (rename (make-option option)) 9 | option? 10 | option-names 11 | option-required-arg? 12 | option-optional-arg? 13 | option-processor) 14 | (import 15 | (rnrs) 16 | (srfi private include)) 17 | 18 | 19 | (define-record-type option 20 | (fields 21 | names required-arg? optional-arg? processor) 22 | (protocol 23 | (lambda (c) 24 | (lambda (n ra oa p) 25 | (if (and 26 | (and (list? n) 27 | (positive? (length n)) 28 | (for-all (lambda (x) 29 | (or (and (string? x) (positive? (string-length x))) 30 | (char? x))) 31 | n)) 32 | (boolean? ra) 33 | (boolean? oa) 34 | (not (and ra oa)) 35 | (procedure? p)) 36 | (c n ra oa p) 37 | (assertion-violation 'option "invalid arguments" n ra oa p)))))) 38 | 39 | (define args-fold 40 | (let ((option make-option)) 41 | (include/resolve ("srfi" "%3a37") "srfi-37-reference.scm") 42 | args-fold)) 43 | ) 44 | -------------------------------------------------------------------------------- /vendor/srfi/%3a38.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :38) 4 | (export 5 | read-with-shared-structure 6 | read/ss 7 | write-with-shared-structure 8 | write/ss) 9 | (import (srfi :38 with-shared-structure)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a38/with-shared-structure.chezscheme.sls: -------------------------------------------------------------------------------- 1 | ;;; Copyright (c) 2012 Aaron W. Hsu 2 | ;;; 3 | ;;; Permission to use, copy, modify, and distribute this software for 4 | ;;; any purpose with or without fee is hereby granted, provided that the 5 | ;;; above copyright notice and this permission notice appear in all 6 | ;;; copies. 7 | ;;; 8 | ;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 9 | ;;; WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 10 | ;;; WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 11 | ;;; AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 12 | ;;; DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA 13 | ;;; OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 14 | ;;; TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | ;;; PERFORMANCE OF THIS SOFTWARE. 16 | 17 | (library (srfi :38 with-shared-structure) 18 | (export write-with-shared-structure 19 | (rename (write-with-shared-structure write/ss)) 20 | read-with-shared-structure 21 | (rename (read-with-shared-structure read/ss))) 22 | (import (chezscheme)) 23 | 24 | (define write-with-shared-structure 25 | (case-lambda 26 | [(obj) 27 | (write-with-shared-structure obj (current-output-port))] 28 | [(obj port) 29 | (parameterize ((print-graph #T)) 30 | (write obj port))] 31 | [(obj port optarg) 32 | (assertion-violation 'write-with-shared-structure 33 | "this implementation does not support optarg")])) 34 | 35 | (define read-with-shared-structure read) 36 | 37 | ) 38 | -------------------------------------------------------------------------------- /vendor/srfi/%3a38/with-shared-structure.ikarus.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :38 with-shared-structure) 6 | (export 7 | write-with-shared-structure 8 | (rename (write-with-shared-structure write/ss)) 9 | read-with-shared-structure 10 | (rename (read-with-shared-structure read/ss))) 11 | (import 12 | (rnrs) 13 | (only (ikarus) print-graph parameterize)) 14 | 15 | (define write-with-shared-structure 16 | (case-lambda 17 | ((obj) 18 | (write-with-shared-structure obj (current-output-port))) 19 | ((obj port) 20 | (parameterize ((print-graph #T)) 21 | (write obj port))) 22 | ((obj port optarg) 23 | (assertion-violation 'write-with-shared-structure 24 | "this implementation does not support optarg")))) 25 | 26 | (define read-with-shared-structure read) 27 | 28 | ) 29 | -------------------------------------------------------------------------------- /vendor/srfi/%3a38/with-shared-structure.ypsilon.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :38 with-shared-structure) 6 | (export 7 | write-with-shared-structure 8 | (rename (write-with-shared-structure write/ss)) 9 | read-with-shared-structure 10 | (rename (read-with-shared-structure read/ss))) 11 | (import 12 | (only (core) write-with-shared-structure read-with-shared-structure)) 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/srfi/%3a39.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :39) 4 | (export 5 | make-parameter 6 | parameterize) 7 | (import (srfi :39 parameters)) 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/srfi/%3a39/parameters.chezscheme.sls: -------------------------------------------------------------------------------- 1 | ;;; Copyright (c) 2012 Aaron W. Hsu 2 | ;;; 3 | ;;; Permission to use, copy, modify, and distribute this software for 4 | ;;; any purpose with or without fee is hereby granted, provided that the 5 | ;;; above copyright notice and this permission notice appear in all 6 | ;;; copies. 7 | ;;; 8 | ;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 9 | ;;; WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 10 | ;;; WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 11 | ;;; AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 12 | ;;; DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA 13 | ;;; OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 14 | ;;; TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | ;;; PERFORMANCE OF THIS SOFTWARE. 16 | 17 | (library (srfi :39 parameters) 18 | (export make-parameter 19 | parameterize) 20 | (import (only (chezscheme) make-parameter parameterize))) 21 | -------------------------------------------------------------------------------- /vendor/srfi/%3a39/parameters.ikarus.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :39 parameters) 6 | (export 7 | make-parameter 8 | parameterize) 9 | (import 10 | (only (ikarus) make-parameter parameterize)) 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/srfi/%3a39/parameters.mzscheme.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :39 parameters) 6 | (export 7 | make-parameter 8 | parameterize) 9 | (import 10 | (only (scheme base) make-parameter parameterize)) 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/srfi/%3a39/parameters.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | ;; Fall-back library in case the host Scheme system does not provide SRFI-39. 6 | 7 | (library (srfi :39 parameters) 8 | (export 9 | make-parameter 10 | parameterize) 11 | (import 12 | (rnrs)) 13 | 14 | (define make-parameter 15 | (case-lambda 16 | ((val) (make-parameter val values)) 17 | ((val guard) 18 | (unless (procedure? guard) 19 | (assertion-violation 'make-parameter "not a procedure" guard)) 20 | (let ((p (case-lambda 21 | (() val) 22 | ((x) (set! val (guard x)))))) 23 | (p val) 24 | p)))) 25 | 26 | (define-syntax parameterize 27 | ;; Derived from Ikarus's implementation of parameterize. 28 | (lambda (stx) 29 | (syntax-case stx () 30 | ((_ () b0 b ...) 31 | #'(let () b0 b ...)) 32 | ((_ ((p e) ...) b0 b ...) 33 | (with-syntax (((tp ...) (generate-temporaries #'(p ...))) 34 | ((te ...) (generate-temporaries #'(e ...)))) 35 | #'(let ((tp p) ... 36 | (te e) ...) 37 | (let ((swap (lambda () 38 | (let ((t (tp))) 39 | (tp te) 40 | (set! te t)) 41 | ...))) 42 | (dynamic-wind 43 | swap 44 | (lambda () b0 b ...) 45 | swap)))))))) 46 | 47 | ) 48 | 49 | -------------------------------------------------------------------------------- /vendor/srfi/%3a39/parameters.ypsilon.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :39 parameters) 6 | (export 7 | make-parameter parameterize) 8 | (import 9 | (only (core) make-parameter parameterize)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a4.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :4) 2 | (export 3 | s8vector? make-s8vector s8vector s8vector-length s8vector-ref s8vector-set! 4 | s8vector->list list->s8vector 5 | 6 | s16vector? make-s16vector s16vector s16vector-length s16vector-ref 7 | s16vector-set! s16vector->list list->s16vector 8 | 9 | s32vector? make-s32vector s32vector s32vector-length s32vector-ref 10 | s32vector-set! s32vector->list list->s32vector 11 | 12 | s64vector? make-s64vector s64vector s64vector-length s64vector-ref 13 | s64vector-set! s64vector->list list->s64vector 14 | 15 | u8vector? make-u8vector u8vector u8vector-length u8vector-ref u8vector-set! 16 | u8vector->list list->u8vector 17 | 18 | u16vector? make-u16vector u16vector u16vector-length u16vector-ref 19 | u16vector-set! u16vector->list list->u16vector 20 | 21 | u32vector? make-u32vector u32vector u32vector-length u32vector-ref 22 | u32vector-set! u32vector->list list->u32vector 23 | 24 | u64vector? make-u64vector u64vector u64vector-length u64vector-ref 25 | u64vector-set! u64vector->list list->u64vector 26 | 27 | f32vector? make-f32vector f32vector f32vector-length f32vector-ref 28 | f32vector-set! f32vector->list list->f32vector 29 | 30 | f64vector? make-f64vector f64vector f64vector-length f64vector-ref 31 | f64vector-set! f64vector->list list->f64vector) 32 | (import (srfi :4 numeric-vectors))) 33 | -------------------------------------------------------------------------------- /vendor/srfi/%3a41.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :41) 4 | (export 5 | define-stream 6 | list->stream 7 | port->stream 8 | stream 9 | stream->list 10 | stream-append 11 | stream-car 12 | stream-cdr 13 | stream-concat 14 | stream-cons 15 | stream-constant 16 | stream-drop 17 | stream-drop-while 18 | stream-filter 19 | stream-fold 20 | stream-for-each 21 | stream-from 22 | stream-iterate 23 | stream-lambda 24 | stream-length 25 | stream-let 26 | stream-map 27 | stream-match 28 | stream-null 29 | stream-null? 30 | stream-of 31 | stream-pair? 32 | stream-range 33 | stream-ref 34 | stream-reverse 35 | stream-scan 36 | stream-take 37 | stream-take-while 38 | stream-unfold 39 | stream-unfolds 40 | stream-zip 41 | stream?) 42 | (import (srfi :41 streams)) 43 | ) 44 | -------------------------------------------------------------------------------- /vendor/srfi/%3a41/streams.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;;; Copyright (C) Philip L. Bewig (2007). All Rights Reserved. 3 | ;;; Permission is hereby granted, free of charge, to any person 4 | ;;; obtaining a copy of this software and associated documentation files 5 | ;;; (the "Software"), to deal in the Software without restriction, 6 | ;;; including without limitation the rights to use, copy, modify, merge, 7 | ;;; publish, distribute, sublicense, and/or sell copies of the Software, 8 | ;;; and to permit persons to whom the Software is furnished to do so, 9 | ;;; subject to the following conditions: 10 | ;;; 11 | ;;; The above copyright notice and this permission notice shall be 12 | ;;; included in all copies or substantial portions of the Software. 13 | ;;; 14 | ;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | ;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | ;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | ;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 18 | ;;; BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | ;;; ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | ;;; CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | ;;; SOFTWARE. 22 | 23 | (library (srfi :41 streams) 24 | 25 | (export stream-null stream-cons stream? stream-null? stream-pair? stream-car 26 | stream-cdr stream-lambda define-stream list->stream port->stream stream 27 | stream->list stream-append stream-concat stream-constant stream-drop 28 | stream-drop-while stream-filter stream-fold stream-for-each stream-from 29 | stream-iterate stream-length stream-let stream-map stream-match 30 | stream-of stream-range stream-ref stream-reverse stream-scan stream-take 31 | stream-take-while stream-unfold stream-unfolds stream-zip) 32 | 33 | (import (srfi :41 streams primitive) 34 | (srfi :41 streams derived))) 35 | -------------------------------------------------------------------------------- /vendor/srfi/%3a42.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :42) 4 | (export 5 | : 6 | :-dispatch-ref 7 | :-dispatch-set! 8 | :char-range 9 | :dispatched 10 | :do 11 | :generator-proc 12 | :integers 13 | :let 14 | :list 15 | :parallel 16 | :port 17 | :range 18 | :real-range 19 | :string 20 | :until 21 | :vector 22 | :while 23 | any?-ec 24 | append-ec 25 | dispatch-union 26 | do-ec 27 | every?-ec 28 | first-ec 29 | fold-ec 30 | fold3-ec 31 | last-ec 32 | list-ec 33 | make-initial-:-dispatch 34 | max-ec 35 | min-ec 36 | product-ec 37 | string-append-ec 38 | string-ec 39 | sum-ec 40 | vector-ec 41 | vector-of-length-ec) 42 | (import (srfi :42 eager-comprehensions)) 43 | ) 44 | -------------------------------------------------------------------------------- /vendor/srfi/%3a42/eager-comprehensions.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :42 eager-comprehensions) 6 | (export 7 | do-ec list-ec append-ec string-ec string-append-ec vector-ec 8 | vector-of-length-ec sum-ec product-ec min-ec max-ec any?-ec 9 | every?-ec first-ec last-ec fold-ec fold3-ec 10 | : :list :string :vector :integers :range :real-range :char-range 11 | :port :dispatched :do :let :parallel :while :until 12 | :-dispatch-ref :-dispatch-set! make-initial-:-dispatch 13 | dispatch-union :generator-proc) 14 | (import 15 | (rnrs) 16 | (rnrs r5rs) 17 | (srfi :39 parameters) 18 | (srfi :23 error tricks) 19 | (for (srfi private vanish) expand) 20 | (srfi private include)) 21 | 22 | (define-syntax :-dispatch 23 | (identifier-syntax 24 | (_ (:-dispatch-param)) 25 | ((set! _ expr) (:-dispatch-param expr)))) 26 | 27 | (let-syntax ((define (vanish-define define (:-dispatch)))) 28 | (SRFI-23-error->R6RS "(library (srfi :42 eager-comprehensions))" 29 | (include/resolve ("srfi" "%3a42") "ec.scm"))) 30 | 31 | (define :-dispatch-param (make-parameter (make-initial-:-dispatch))) 32 | ) 33 | -------------------------------------------------------------------------------- /vendor/srfi/%3a43.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :43) 4 | (export 5 | list->vector 6 | make-vector 7 | reverse-list->vector 8 | reverse-vector->list 9 | vector 10 | vector->list 11 | vector-any 12 | vector-append 13 | vector-binary-search 14 | vector-concatenate 15 | vector-copy 16 | vector-copy! 17 | vector-count 18 | vector-empty? 19 | vector-every 20 | vector-fill! 21 | vector-fold 22 | vector-fold-right 23 | vector-for-each 24 | vector-index 25 | vector-index-right 26 | vector-length 27 | vector-map 28 | vector-map! 29 | vector-ref 30 | vector-reverse! 31 | vector-reverse-copy 32 | vector-reverse-copy! 33 | vector-set! 34 | vector-skip 35 | vector-skip-right 36 | vector-swap! 37 | vector-unfold 38 | vector-unfold-right 39 | vector= 40 | vector?) 41 | (import (srfi :43 vectors)) 42 | ) 43 | -------------------------------------------------------------------------------- /vendor/srfi/%3a45.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :45) 4 | (export 5 | delay 6 | eager 7 | force 8 | lazy) 9 | (import (srfi :45 lazy)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a48.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :48) 4 | (export 5 | format) 6 | (import (srfi :48 intermediate-format-strings)) 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/srfi/%3a48/intermediate-format-strings/compat.chezscheme.sls: -------------------------------------------------------------------------------- 1 | ;;; Copyright (c) 2012 Aaron W. Hsu 2 | ;;; 3 | ;;; Permission to use, copy, modify, and distribute this software for 4 | ;;; any purpose with or without fee is hereby granted, provided that the 5 | ;;; above copyright notice and this permission notice appear in all 6 | ;;; copies. 7 | ;;; 8 | ;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 9 | ;;; WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 10 | ;;; WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 11 | ;;; AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 12 | ;;; DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA 13 | ;;; OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 14 | ;;; TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | ;;; PERFORMANCE OF THIS SOFTWARE. 16 | 17 | (library (srfi :48 intermediate-format-strings compat) 18 | (export pretty-print) 19 | (import (only (chezscheme) pretty-print))) 20 | -------------------------------------------------------------------------------- /vendor/srfi/%3a48/intermediate-format-strings/compat.guile.sls: -------------------------------------------------------------------------------- 1 | (library (srfi srfi-48 compat) 2 | (export pretty-print) 3 | (import (only (ice-9 pretty-print) pretty-print))) 4 | -------------------------------------------------------------------------------- /vendor/srfi/%3a48/intermediate-format-strings/compat.ikarus.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :48 intermediate-format-strings compat) 6 | (export 7 | pretty-print) 8 | (import 9 | (only (ikarus) pretty-print)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a48/intermediate-format-strings/compat.larceny.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :48 intermediate-format-strings compat) 6 | (export 7 | pretty-print) 8 | (import 9 | (primitives pretty-print)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a48/intermediate-format-strings/compat.mzscheme.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :48 intermediate-format-strings compat) 6 | (export 7 | pretty-print) 8 | (import 9 | (only (scheme pretty) pretty-print)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a48/intermediate-format-strings/compat.ypsilon.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :48 intermediate-format-strings compat) 6 | (export 7 | pretty-print) 8 | (import 9 | (only (core) pretty-print)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a5.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :5) (export let) (import (srfi :5 let))) 2 | -------------------------------------------------------------------------------- /vendor/srfi/%3a51.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :51) 2 | (export rest-values arg-and arg-ands err-and err-ands arg-or arg-ors err-or err-ors) 3 | (import (srfi :51 rest-values))) 4 | -------------------------------------------------------------------------------- /vendor/srfi/%3a51/rest-values.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :51 rest-values) 2 | (export rest-values arg-and arg-ands err-and err-ands arg-or arg-ors err-or err-ors) 3 | (import (except (rnrs) error) (only (srfi :1) every append-reverse) 4 | (srfi :23) (srfi private include)) 5 | 6 | (include/resolve ("srfi" "%3a51") "srfi-51-impl.scm")) 7 | -------------------------------------------------------------------------------- /vendor/srfi/%3a54.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :54) 2 | (export cat) 3 | (import (srfi :54 cat))) 4 | -------------------------------------------------------------------------------- /vendor/srfi/%3a54/cat.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :54 cat) 2 | (export cat) 3 | (import (except (rnrs) error) (rnrs r5rs) (srfi :23) 4 | (srfi private include)) 5 | 6 | (include/resolve ("srfi" "%3a54") "srfi-54-impl.scm")) 7 | -------------------------------------------------------------------------------- /vendor/srfi/%3a6.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :6) 4 | (export 5 | get-output-string 6 | open-input-string 7 | open-output-string) 8 | (import (srfi :6 basic-string-ports)) 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/srfi/%3a6/basic-string-ports.mzscheme.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :6 basic-string-ports) 6 | (export 7 | (rename (open-string-input-port open-input-string)) 8 | open-output-string 9 | get-output-string) 10 | (import 11 | (rnrs) 12 | (only (scheme base) make-weak-hasheq hash-ref hash-set!)) 13 | 14 | (define accumed-ht (make-weak-hasheq)) 15 | 16 | (define (open-output-string) 17 | (letrec ((sop 18 | (make-custom-textual-output-port 19 | "string-output-port" 20 | (lambda (string start count) ; write! 21 | (when (positive? count) 22 | (let ((al (hash-ref accumed-ht sop))) 23 | (hash-set! accumed-ht sop 24 | (cons (substring string start (+ start count)) al)))) 25 | count) 26 | #F ; get-position TODO? 27 | #F ; set-position! TODO? 28 | #F #| closed TODO? |# ))) 29 | (hash-set! accumed-ht sop '()) 30 | sop)) 31 | 32 | (define (get-output-string sop) 33 | (if (output-port? sop) 34 | (cond ((hash-ref accumed-ht sop #F) 35 | => (lambda (al) (apply string-append (reverse al)))) 36 | (else 37 | (assertion-violation 'get-output-string "not a string-output-port" sop))) 38 | (assertion-violation 'get-output-string "not an output-port" sop))) 39 | 40 | ) 41 | -------------------------------------------------------------------------------- /vendor/srfi/%3a6/basic-string-ports.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :6 basic-string-ports) 6 | (export 7 | (rename (open-string-input-port open-input-string)) 8 | open-output-string 9 | get-output-string) 10 | (import 11 | (only (rnrs io ports) open-string-input-port) 12 | (srfi :6 basic-string-ports compat)) 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/srfi/%3a6/basic-string-ports/compat.chezscheme.sls: -------------------------------------------------------------------------------- 1 | ;;; Copyright (c) 2012 Aaron W. Hsu 2 | ;;; 3 | ;;; Permission to use, copy, modify, and distribute this software for 4 | ;;; any purpose with or without fee is hereby granted, provided that the 5 | ;;; above copyright notice and this permission notice appear in all 6 | ;;; copies. 7 | ;;; 8 | ;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 9 | ;;; WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 10 | ;;; WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 11 | ;;; AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 12 | ;;; DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA 13 | ;;; OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 14 | ;;; TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | ;;; PERFORMANCE OF THIS SOFTWARE. 16 | 17 | (library (srfi :6 basic-string-ports compat) 18 | (export open-output-string get-output-string) 19 | (import (chezscheme))) 20 | -------------------------------------------------------------------------------- /vendor/srfi/%3a6/basic-string-ports/compat.ikarus.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :6 basic-string-ports compat) 6 | (export 7 | open-output-string get-output-string) 8 | (import 9 | (only (ikarus) open-output-string get-output-string))) 10 | -------------------------------------------------------------------------------- /vendor/srfi/%3a6/basic-string-ports/compat.larceny.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :6 basic-string-ports compat) 6 | (export 7 | open-output-string get-output-string) 8 | (import 9 | (primitives 10 | open-output-string get-output-string)) 11 | ) -------------------------------------------------------------------------------- /vendor/srfi/%3a6/basic-string-ports/compat.ypsilon.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :6 basic-string-ports compat) 6 | (export 7 | (rename 8 | (make-string-output-port open-output-string) 9 | (get-accumulated-string get-output-string))) 10 | (import 11 | (only (core) make-string-output-port get-accumulated-string)) 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/srfi/%3a60.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :60) 2 | (export logand bitwise-and logior bitwise-ior logxor bitwise-xor lognot 3 | bitwise-not bitwise-if bitwise-merge logtest any-bits-set? logcount 4 | bit-count integer-length log2-binary-factors first-set-bit logbit? 5 | bit-set? copy-bit bit-field copy-bit-field ash arithmetic-shift 6 | rotate-bit-field reverse-bit-field integer->list integer->list 7 | list->integer booleans->integer) 8 | (import (srfi :60 integer-bits))) 9 | -------------------------------------------------------------------------------- /vendor/srfi/%3a61.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :61) 4 | (export 5 | cond) 6 | (import (srfi :61 cond)) 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/srfi/%3a61/cond.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :61 cond) 6 | (export 7 | (rename (general-cond cond))) 8 | (import 9 | (rnrs)) 10 | 11 | (define-syntax general-cond 12 | (lambda (stx) 13 | (syntax-case stx () 14 | ((_ clauses ...) 15 | (with-syntax (((ours ...) 16 | (map (lambda (c) 17 | (syntax-case c (=>) 18 | ((generator guard => receiver) 19 | #'((let-values ((vals generator)) 20 | (and (apply guard vals) 21 | vals)) 22 | => (lambda (vals) 23 | (apply receiver vals)))) 24 | (_ c))) 25 | #'(clauses ...)))) 26 | #'(cond ours ...)))))) 27 | ) 28 | -------------------------------------------------------------------------------- /vendor/srfi/%3a64.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :64) 4 | (export 5 | test-apply 6 | test-approximate 7 | test-assert 8 | test-begin 9 | test-end 10 | test-eq 11 | test-equal 12 | test-eqv 13 | test-error 14 | test-expect-fail 15 | test-group 16 | test-group-with-cleanup 17 | test-log-to-file 18 | test-match-all 19 | test-match-any 20 | test-match-name 21 | test-match-nth 22 | test-on-bad-count-simple 23 | test-on-bad-end-name-simple 24 | test-on-final-simple 25 | test-on-group-begin-simple 26 | test-on-group-end-simple 27 | test-on-test-end-simple 28 | test-passed? 29 | test-read-eval-string 30 | test-result-alist 31 | test-result-alist! 32 | test-result-clear 33 | test-result-kind 34 | test-result-ref 35 | test-result-remove 36 | test-result-set! 37 | test-runner-aux-value 38 | test-runner-aux-value! 39 | test-runner-create 40 | test-runner-current 41 | test-runner-factory 42 | test-runner-fail-count 43 | test-runner-fail-count! 44 | test-runner-get 45 | test-runner-group-path 46 | test-runner-group-stack 47 | test-runner-group-stack! 48 | test-runner-null 49 | test-runner-on-bad-count 50 | test-runner-on-bad-count! 51 | test-runner-on-bad-end-name 52 | test-runner-on-bad-end-name! 53 | test-runner-on-final 54 | test-runner-on-final! 55 | test-runner-on-group-begin 56 | test-runner-on-group-begin! 57 | test-runner-on-group-end 58 | test-runner-on-group-end! 59 | test-runner-on-test-begin 60 | test-runner-on-test-begin! 61 | test-runner-on-test-end 62 | test-runner-on-test-end! 63 | test-runner-pass-count 64 | test-runner-pass-count! 65 | test-runner-reset 66 | test-runner-simple 67 | test-runner-skip-count 68 | test-runner-skip-count! 69 | test-runner-test-name 70 | test-runner-xfail-count 71 | test-runner-xfail-count! 72 | test-runner-xpass-count 73 | test-runner-xpass-count! 74 | test-runner? 75 | test-skip 76 | test-with-runner) 77 | (import (srfi :64 testing)) 78 | ) 79 | -------------------------------------------------------------------------------- /vendor/srfi/%3a67.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :67) 4 | (export 5 | />=? 13 | >/>? 14 | >=/>=? 15 | >=/>? 16 | >=? 17 | >? 18 | boolean-compare 19 | chain<=? 20 | chain=? 23 | chain>? 24 | char-compare 25 | char-compare-ci 26 | compare-by< 27 | compare-by<= 28 | compare-by=/< 29 | compare-by=/> 30 | compare-by> 31 | compare-by>= 32 | complex-compare 33 | cond-compare 34 | debug-compare 35 | default-compare 36 | if-not=? 37 | if3 38 | if<=? 39 | if=? 42 | if>? 43 | integer-compare 44 | kth-largest 45 | list-compare 46 | list-compare-as-vector 47 | max-compare 48 | min-compare 49 | not=? 50 | number-compare 51 | pair-compare 52 | pair-compare-car 53 | pair-compare-cdr 54 | pairwise-not=? 55 | rational-compare 56 | real-compare 57 | refine-compare 58 | select-compare 59 | string-compare 60 | string-compare-ci 61 | symbol-compare 62 | vector-compare 63 | vector-compare-as-list) 64 | (import (srfi :67 compare-procedures)) 65 | ) 66 | -------------------------------------------------------------------------------- /vendor/srfi/%3a67/compare-procedures.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :67 compare-procedures) 6 | (export 7 | />=? >/>? >=/>=? >=/>? >=? >? 9 | boolean-compare chain<=? chain=? chain>? 10 | char-compare char-compare-ci 11 | compare-by< compare-by<= compare-by=/< compare-by=/> compare-by> 12 | compare-by>= complex-compare cond-compare 13 | debug-compare default-compare 14 | if-not=? if3 if<=? if=? if>? integer-compare 15 | kth-largest list-compare list-compare-as-vector 16 | max-compare min-compare not=? number-compare 17 | pair-compare pair-compare-car pair-compare-cdr 18 | pairwise-not=? rational-compare real-compare 19 | refine-compare select-compare string-compare string-compare-ci 20 | symbol-compare vector-compare vector-compare-as-list) 21 | (import 22 | (except (rnrs) error) 23 | (only (rnrs r5rs) modulo) 24 | (only (srfi :27 random-bits) random-integer) 25 | (srfi :23 error) 26 | (srfi private include)) 27 | 28 | (include/resolve ("srfi" "%3a67") "compare.scm") 29 | ) 30 | -------------------------------------------------------------------------------- /vendor/srfi/%3a69.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :69) 4 | (export 5 | alist->hash-table 6 | hash 7 | hash-by-identity 8 | hash-table->alist 9 | hash-table-copy 10 | hash-table-delete! 11 | hash-table-equivalence-function 12 | hash-table-exists? 13 | hash-table-fold 14 | hash-table-hash-function 15 | hash-table-keys 16 | hash-table-merge! 17 | hash-table-ref 18 | hash-table-ref/default 19 | hash-table-set! 20 | hash-table-size 21 | hash-table-update! 22 | hash-table-update!/default 23 | hash-table-values 24 | hash-table-walk 25 | hash-table? 26 | make-hash-table 27 | string-ci-hash 28 | string-hash) 29 | (import (srfi :69 basic-hash-tables)) 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/srfi/%3a78.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :78) 4 | (export 5 | check 6 | check-ec 7 | check-passed? 8 | check-report 9 | check-reset! 10 | check-set-mode!) 11 | (import (srfi :78 lightweight-testing)) 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/srfi/%3a78/lightweight-testing.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :78 lightweight-testing) 6 | (export 7 | check 8 | check-ec 9 | check-report 10 | check-set-mode! 11 | check-reset! 12 | check-passed?) 13 | (import 14 | (rnrs) 15 | (srfi :78 lightweight-testing compat) 16 | (srfi :39 parameters) 17 | (srfi :42 eager-comprehensions) 18 | (srfi :23 error tricks) 19 | (for (srfi private vanish) expand) 20 | (srfi private include)) 21 | 22 | (define-syntax check:mode 23 | (identifier-syntax 24 | (_ (check:mode-param)) 25 | ((set! _ expr) (check:mode-param expr)))) 26 | 27 | (define check:mode-param (make-parameter #F)) 28 | 29 | (let-syntax ((define (vanish-define define (check:write check:mode)))) 30 | (SRFI-23-error->R6RS "(library (srfi :78 lightweight-testing))" 31 | (include/resolve ("srfi" "%3a78") "check.scm"))) 32 | ) 33 | -------------------------------------------------------------------------------- /vendor/srfi/%3a78/lightweight-testing/compat.chezscheme.sls: -------------------------------------------------------------------------------- 1 | ;;; Copyright (c) 2012 Aaron W. Hsu 2 | ;;; 3 | ;;; Permission to use, copy, modify, and distribute this software for 4 | ;;; any purpose with or without fee is hereby granted, provided that the 5 | ;;; above copyright notice and this permission notice appear in all 6 | ;;; copies. 7 | ;;; 8 | ;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 9 | ;;; WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 10 | ;;; WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 11 | ;;; AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 12 | ;;; DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA 13 | ;;; OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 14 | ;;; TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | ;;; PERFORMANCE OF THIS SOFTWARE. 16 | 17 | (library (srfi :78 lightweight-testing compat) 18 | (export (rename (pretty-print check:write))) 19 | (import (chezscheme))) 20 | -------------------------------------------------------------------------------- /vendor/srfi/%3a78/lightweight-testing/compat.guile.sls: -------------------------------------------------------------------------------- 1 | (library (srfi srfi-78 compat) 2 | (export (rename (pretty-print check:write))) 3 | (import (only (ice-9 pretty-print) pretty-print))) 4 | -------------------------------------------------------------------------------- /vendor/srfi/%3a78/lightweight-testing/compat.ikarus.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :78 lightweight-testing compat) 6 | (export 7 | (rename (pretty-print check:write))) 8 | (import 9 | (only (ikarus) pretty-print)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a78/lightweight-testing/compat.larceny.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :78 lightweight-testing compat) 6 | (export 7 | (rename (pretty-print check:write))) 8 | (import 9 | (primitives pretty-print)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a78/lightweight-testing/compat.mzscheme.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :78 lightweight-testing compat) 6 | (export 7 | (rename (pretty-print check:write))) 8 | (import 9 | (only (scheme pretty) pretty-print)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a78/lightweight-testing/compat.ypsilon.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :78 lightweight-testing compat) 6 | (export 7 | check:write) 8 | (import 9 | (rnrs) 10 | (only (core) pretty-print)) 11 | 12 | (define check:write 13 | (case-lambda 14 | ((x) (check:write x (current-output-port))) 15 | ((x p) 16 | (pretty-print x p) 17 | (newline p)))) 18 | ) 19 | -------------------------------------------------------------------------------- /vendor/srfi/%3a8.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :8) 4 | (export 5 | receive) 6 | (import (srfi :8 receive)) 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/srfi/%3a8/receive.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :8 receive) 6 | (export receive) 7 | (import (rnrs)) 8 | 9 | (define-syntax receive 10 | (syntax-rules () 11 | ((_ formals expression b b* ...) 12 | (call-with-values 13 | (lambda () expression) 14 | (lambda formals b b* ...))))) 15 | 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/srfi/%3a9.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :9) 4 | (export 5 | define-record-type) 6 | (import (srfi :9 records)) 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/srfi/%3a9/records.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :9 records) 6 | (export 7 | (rename (my:define-record-type define-record-type))) 8 | (import 9 | (rnrs)) 10 | 11 | (define-syntax my:define-record-type 12 | (lambda (stx) 13 | (syntax-case stx () 14 | ((_ type (constructor constructor-tag ...) 15 | predicate 16 | (field-tag accessor setter ...) ...) 17 | (and (for-all identifier? 18 | #'(type constructor constructor-tag ... predicate 19 | field-tag ... accessor ... setter ... ...)) 20 | (for-all (lambda (s) (<= 0 (length s) 1)) 21 | #'((setter ...) ...)) 22 | (for-all (lambda (ct) 23 | (memp (lambda (ft) (bound-identifier=? ct ft)) 24 | #'(field-tag ...))) 25 | #'(constructor-tag ...))) 26 | (with-syntax (((field-clause ...) 27 | (map (lambda (clause) 28 | (if (= 2 (length clause)) 29 | #`(immutable . #,clause) 30 | #`(mutable . #,clause))) 31 | #'((field-tag accessor setter ...) ...))) 32 | ((unspec-tag ...) 33 | (remp (lambda (ft) 34 | (memp (lambda (ct) (bound-identifier=? ft ct)) 35 | #'(constructor-tag ...))) 36 | #'(field-tag ...)))) 37 | #'(define-record-type (type constructor predicate) 38 | (protocol (lambda (ctor) 39 | (lambda (constructor-tag ...) 40 | (define unspec-tag) ... 41 | (ctor field-tag ...)))) 42 | (fields field-clause ...))))))) 43 | ) 44 | -------------------------------------------------------------------------------- /vendor/srfi/%3a98.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :98) 4 | (export 5 | get-environment-variable 6 | get-environment-variables) 7 | (import (srfi :98 os-environment-variables)) 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/srfi/%3a98/os-environment-variables.ikarus.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :98 os-environment-variables) 6 | (export 7 | (rename (getenv get-environment-variable) 8 | (environ get-environment-variables))) 9 | (import 10 | (only (ikarus) getenv environ))) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a98/os-environment-variables.mzscheme.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | ;; Inspired by Danny Yoo's get-environment PLaneT package. 6 | 7 | (library (srfi :98 os-environment-variables) 8 | (export 9 | (rename (getenv get-environment-variable)) 10 | get-environment-variables) 11 | (import 12 | (rnrs base) 13 | (only (scheme base) getenv) 14 | (scheme foreign)) 15 | 16 | (unsafe!) 17 | 18 | (define environ (get-ffi-obj "environ" (ffi-lib #F) _pointer)) 19 | 20 | (define (get-environment-variables) 21 | (let loop ((i 0) (accum '())) 22 | (let ((next (ptr-ref environ _string/locale i))) 23 | (if next 24 | (loop (+ 1 i) 25 | (cons (let loop ((i 0) (len (string-length next))) 26 | (if (< i len) 27 | (if (char=? #\= (string-ref next i)) 28 | (cons (substring next 0 i) 29 | (substring next (+ 1 i) len)) 30 | (loop (+ 1 i) len)) 31 | (cons next #F))) 32 | accum)) 33 | accum)))) 34 | ) 35 | -------------------------------------------------------------------------------- /vendor/srfi/%3a98/os-environment-variables.ypsilon.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi :98 os-environment-variables) 6 | (export 7 | (rename (lookup-process-environment get-environment-variable) 8 | (process-environment->alist get-environment-variables))) 9 | (import 10 | (only (core) lookup-process-environment process-environment->alist))) 11 | -------------------------------------------------------------------------------- /vendor/srfi/%3a99.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Automatically generated by private/make-aliased-libraries.sps 3 | (library (srfi :99) 4 | (export 5 | define-record-type 6 | make-rtd 7 | record-rtd 8 | record? 9 | rtd-accessor 10 | rtd-all-field-names 11 | rtd-constructor 12 | rtd-field-mutable? 13 | rtd-field-names 14 | rtd-mutator 15 | rtd-name 16 | rtd-parent 17 | rtd-predicate 18 | rtd?) 19 | (import (srfi :99 records)) 20 | ) 21 | -------------------------------------------------------------------------------- /vendor/srfi/%3a99/records.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright (C) William D Clinger 2008. All Rights Reserved. 3 | ;; 4 | ;; Permission is hereby granted, free of charge, to any person obtaining a copy 5 | ;; of this software and associated documentation files (the "Software"), to deal 6 | ;; in the Software without restriction, including without limitation the rights 7 | ;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | ;; copies of the Software, and to permit persons to whom the Software is 9 | ;; furnished to do so, subject to the following conditions: 10 | ;; 11 | ;; The above copyright notice and this permission notice shall be included in 12 | ;; all copies or substantial portions of the Software. 13 | ;; 14 | ;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | ;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | ;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. REMEMBER, THERE IS NO 17 | ;; SCHEME UNDERGROUND. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | ;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | ;; CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | (library (srfi :99 records) 23 | 24 | (export record? record-rtd 25 | rtd-name rtd-parent 26 | rtd-field-names rtd-all-field-names rtd-field-mutable? 27 | 28 | make-rtd rtd? rtd-constructor 29 | rtd-predicate rtd-accessor rtd-mutator 30 | 31 | define-record-type) 32 | 33 | (import (srfi :99 records inspection) 34 | (srfi :99 records procedural) 35 | (srfi :99 records syntactic))) 36 | -------------------------------------------------------------------------------- /vendor/srfi/%3a99/records/helper.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright (C) William D Clinger 2008. All Rights Reserved. 3 | ;; 4 | ;; Permission is hereby granted, free of charge, to any person obtaining a copy 5 | ;; of this software and associated documentation files (the "Software"), to deal 6 | ;; in the Software without restriction, including without limitation the rights 7 | ;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | ;; copies of the Software, and to permit persons to whom the Software is 9 | ;; furnished to do so, subject to the following conditions: 10 | ;; 11 | ;; The above copyright notice and this permission notice shall be included in 12 | ;; all copies or substantial portions of the Software. 13 | ;; 14 | ;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | ;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | ;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. REMEMBER, THERE IS NO 17 | ;; SCHEME UNDERGROUND. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | ;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | ;; CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | ; This library breaks a circular interdependence between the 23 | ; procedural and inspection layers. 24 | 25 | (library (srfi :99 records helper) 26 | (export rtd?) 27 | (import (rnrs base) (rnrs records procedural)) 28 | 29 | (define rtd? record-type-descriptor?) 30 | 31 | ) 32 | -------------------------------------------------------------------------------- /vendor/srfi/%3a99/records/inspection.larceny.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :99 records inspection) 2 | (export 3 | record? record-rtd rtd-name rtd-parent 4 | rtd-field-names rtd-all-field-names rtd-field-mutable?) 5 | (import (err5rs records inspection))) 6 | -------------------------------------------------------------------------------- /vendor/srfi/%3a99/records/procedural.larceny.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :99 records procedural) 2 | (export 3 | make-rtd rtd? rtd-constructor rtd-predicate rtd-accessor rtd-mutator) 4 | (import (err5rs records procedural))) 5 | -------------------------------------------------------------------------------- /vendor/srfi/%3a99/records/syntactic.larceny.sls: -------------------------------------------------------------------------------- 1 | (library (srfi :99 records syntactic) 2 | (export define-record-type) 3 | (import (err5rs records syntactic))) 4 | -------------------------------------------------------------------------------- /vendor/srfi/:0: -------------------------------------------------------------------------------- 1 | %3a0 -------------------------------------------------------------------------------- /vendor/srfi/:0.sls: -------------------------------------------------------------------------------- 1 | %3a0.sls -------------------------------------------------------------------------------- /vendor/srfi/:1: -------------------------------------------------------------------------------- 1 | %3a1 -------------------------------------------------------------------------------- /vendor/srfi/:1.sls: -------------------------------------------------------------------------------- 1 | %3a1.sls -------------------------------------------------------------------------------- /vendor/srfi/:11: -------------------------------------------------------------------------------- 1 | %3a11 -------------------------------------------------------------------------------- /vendor/srfi/:11.sls: -------------------------------------------------------------------------------- 1 | %3a11.sls -------------------------------------------------------------------------------- /vendor/srfi/:115: -------------------------------------------------------------------------------- 1 | %3a115 -------------------------------------------------------------------------------- /vendor/srfi/:115.sls: -------------------------------------------------------------------------------- 1 | %3a115.sls -------------------------------------------------------------------------------- /vendor/srfi/:117: -------------------------------------------------------------------------------- 1 | %3a117 -------------------------------------------------------------------------------- /vendor/srfi/:117.sls: -------------------------------------------------------------------------------- 1 | %3a117.sls -------------------------------------------------------------------------------- /vendor/srfi/:125: -------------------------------------------------------------------------------- 1 | %3a125 -------------------------------------------------------------------------------- /vendor/srfi/:125.sls: -------------------------------------------------------------------------------- 1 | %3a125.sls -------------------------------------------------------------------------------- /vendor/srfi/:126: -------------------------------------------------------------------------------- 1 | %3a126 -------------------------------------------------------------------------------- /vendor/srfi/:126.sls: -------------------------------------------------------------------------------- 1 | %3a126.sls -------------------------------------------------------------------------------- /vendor/srfi/:127: -------------------------------------------------------------------------------- 1 | %3a127 -------------------------------------------------------------------------------- /vendor/srfi/:127.sls: -------------------------------------------------------------------------------- 1 | %3a127.sls -------------------------------------------------------------------------------- /vendor/srfi/:128: -------------------------------------------------------------------------------- 1 | %3a128 -------------------------------------------------------------------------------- /vendor/srfi/:128.sls: -------------------------------------------------------------------------------- 1 | %3a128.sls -------------------------------------------------------------------------------- /vendor/srfi/:129: -------------------------------------------------------------------------------- 1 | %3a129 -------------------------------------------------------------------------------- /vendor/srfi/:129.sls: -------------------------------------------------------------------------------- 1 | %3a129.sls -------------------------------------------------------------------------------- /vendor/srfi/:13: -------------------------------------------------------------------------------- 1 | %3a13 -------------------------------------------------------------------------------- /vendor/srfi/:13.sls: -------------------------------------------------------------------------------- 1 | %3a13.sls -------------------------------------------------------------------------------- /vendor/srfi/:130: -------------------------------------------------------------------------------- 1 | %3a130 -------------------------------------------------------------------------------- /vendor/srfi/:130.sls: -------------------------------------------------------------------------------- 1 | %3a130.sls -------------------------------------------------------------------------------- /vendor/srfi/:131: -------------------------------------------------------------------------------- 1 | %3a131 -------------------------------------------------------------------------------- /vendor/srfi/:131.sls: -------------------------------------------------------------------------------- 1 | %3a131.sls -------------------------------------------------------------------------------- /vendor/srfi/:132: -------------------------------------------------------------------------------- 1 | %3a132 -------------------------------------------------------------------------------- /vendor/srfi/:132.sls: -------------------------------------------------------------------------------- 1 | %3a132.sls -------------------------------------------------------------------------------- /vendor/srfi/:133: -------------------------------------------------------------------------------- 1 | %3a133 -------------------------------------------------------------------------------- /vendor/srfi/:133.sls: -------------------------------------------------------------------------------- 1 | %3a133.sls -------------------------------------------------------------------------------- /vendor/srfi/:14: -------------------------------------------------------------------------------- 1 | %3a14 -------------------------------------------------------------------------------- /vendor/srfi/:14.sls: -------------------------------------------------------------------------------- 1 | %3a14.sls -------------------------------------------------------------------------------- /vendor/srfi/:141: -------------------------------------------------------------------------------- 1 | %3a141 -------------------------------------------------------------------------------- /vendor/srfi/:141.sls: -------------------------------------------------------------------------------- 1 | %3a141.sls -------------------------------------------------------------------------------- /vendor/srfi/:143: -------------------------------------------------------------------------------- 1 | %3a143 -------------------------------------------------------------------------------- /vendor/srfi/:143.sls: -------------------------------------------------------------------------------- 1 | %3a143.sls -------------------------------------------------------------------------------- /vendor/srfi/:145: -------------------------------------------------------------------------------- 1 | %3a145 -------------------------------------------------------------------------------- /vendor/srfi/:145.sls: -------------------------------------------------------------------------------- 1 | %3a145.sls -------------------------------------------------------------------------------- /vendor/srfi/:151: -------------------------------------------------------------------------------- 1 | %3a151 -------------------------------------------------------------------------------- /vendor/srfi/:151.sls: -------------------------------------------------------------------------------- 1 | %3a151.sls -------------------------------------------------------------------------------- /vendor/srfi/:152: -------------------------------------------------------------------------------- 1 | %3a152 -------------------------------------------------------------------------------- /vendor/srfi/:152.sls: -------------------------------------------------------------------------------- 1 | %3a152.sls -------------------------------------------------------------------------------- /vendor/srfi/:156: -------------------------------------------------------------------------------- 1 | %3a156 -------------------------------------------------------------------------------- /vendor/srfi/:156.sls: -------------------------------------------------------------------------------- 1 | %3a156.sls -------------------------------------------------------------------------------- /vendor/srfi/:158: -------------------------------------------------------------------------------- 1 | %3a158 -------------------------------------------------------------------------------- /vendor/srfi/:158.sls: -------------------------------------------------------------------------------- 1 | %3a158.sls -------------------------------------------------------------------------------- /vendor/srfi/:16: -------------------------------------------------------------------------------- 1 | %3a16 -------------------------------------------------------------------------------- /vendor/srfi/:16.sls: -------------------------------------------------------------------------------- 1 | %3a16.sls -------------------------------------------------------------------------------- /vendor/srfi/:17: -------------------------------------------------------------------------------- 1 | %3a17 -------------------------------------------------------------------------------- /vendor/srfi/:17.sls: -------------------------------------------------------------------------------- 1 | %3a17.sls -------------------------------------------------------------------------------- /vendor/srfi/:19: -------------------------------------------------------------------------------- 1 | %3a19 -------------------------------------------------------------------------------- /vendor/srfi/:19.sls: -------------------------------------------------------------------------------- 1 | %3a19.sls -------------------------------------------------------------------------------- /vendor/srfi/:2: -------------------------------------------------------------------------------- 1 | %3a2 -------------------------------------------------------------------------------- /vendor/srfi/:2.sls: -------------------------------------------------------------------------------- 1 | %3a2.sls -------------------------------------------------------------------------------- /vendor/srfi/:23: -------------------------------------------------------------------------------- 1 | %3a23 -------------------------------------------------------------------------------- /vendor/srfi/:23.sls: -------------------------------------------------------------------------------- 1 | %3a23.sls -------------------------------------------------------------------------------- /vendor/srfi/:25: -------------------------------------------------------------------------------- 1 | %3a25 -------------------------------------------------------------------------------- /vendor/srfi/:25.sls: -------------------------------------------------------------------------------- 1 | %3a25.sls -------------------------------------------------------------------------------- /vendor/srfi/:26: -------------------------------------------------------------------------------- 1 | %3a26 -------------------------------------------------------------------------------- /vendor/srfi/:26.sls: -------------------------------------------------------------------------------- 1 | %3a26.sls -------------------------------------------------------------------------------- /vendor/srfi/:27: -------------------------------------------------------------------------------- 1 | %3a27 -------------------------------------------------------------------------------- /vendor/srfi/:27.sls: -------------------------------------------------------------------------------- 1 | %3a27.sls -------------------------------------------------------------------------------- /vendor/srfi/:28: -------------------------------------------------------------------------------- 1 | %3a28 -------------------------------------------------------------------------------- /vendor/srfi/:28.sls: -------------------------------------------------------------------------------- 1 | %3a28.sls -------------------------------------------------------------------------------- /vendor/srfi/:29: -------------------------------------------------------------------------------- 1 | %3a29 -------------------------------------------------------------------------------- /vendor/srfi/:29.sls: -------------------------------------------------------------------------------- 1 | %3a29.sls -------------------------------------------------------------------------------- /vendor/srfi/:31: -------------------------------------------------------------------------------- 1 | %3a31 -------------------------------------------------------------------------------- /vendor/srfi/:31.sls: -------------------------------------------------------------------------------- 1 | %3a31.sls -------------------------------------------------------------------------------- /vendor/srfi/:34: -------------------------------------------------------------------------------- 1 | %3a34 -------------------------------------------------------------------------------- /vendor/srfi/:34.sls: -------------------------------------------------------------------------------- 1 | %3a34.sls -------------------------------------------------------------------------------- /vendor/srfi/:35: -------------------------------------------------------------------------------- 1 | %3a35 -------------------------------------------------------------------------------- /vendor/srfi/:35.sls: -------------------------------------------------------------------------------- 1 | %3a35.sls -------------------------------------------------------------------------------- /vendor/srfi/:37: -------------------------------------------------------------------------------- 1 | %3a37 -------------------------------------------------------------------------------- /vendor/srfi/:37.sls: -------------------------------------------------------------------------------- 1 | %3a37.sls -------------------------------------------------------------------------------- /vendor/srfi/:38: -------------------------------------------------------------------------------- 1 | %3a38 -------------------------------------------------------------------------------- /vendor/srfi/:38.sls: -------------------------------------------------------------------------------- 1 | %3a38.sls -------------------------------------------------------------------------------- /vendor/srfi/:39: -------------------------------------------------------------------------------- 1 | %3a39 -------------------------------------------------------------------------------- /vendor/srfi/:39.sls: -------------------------------------------------------------------------------- 1 | %3a39.sls -------------------------------------------------------------------------------- /vendor/srfi/:4: -------------------------------------------------------------------------------- 1 | %3a4 -------------------------------------------------------------------------------- /vendor/srfi/:4.sls: -------------------------------------------------------------------------------- 1 | %3a4.sls -------------------------------------------------------------------------------- /vendor/srfi/:41: -------------------------------------------------------------------------------- 1 | %3a41 -------------------------------------------------------------------------------- /vendor/srfi/:41.sls: -------------------------------------------------------------------------------- 1 | %3a41.sls -------------------------------------------------------------------------------- /vendor/srfi/:42: -------------------------------------------------------------------------------- 1 | %3a42 -------------------------------------------------------------------------------- /vendor/srfi/:42.sls: -------------------------------------------------------------------------------- 1 | %3a42.sls -------------------------------------------------------------------------------- /vendor/srfi/:43: -------------------------------------------------------------------------------- 1 | %3a43 -------------------------------------------------------------------------------- /vendor/srfi/:43.sls: -------------------------------------------------------------------------------- 1 | %3a43.sls -------------------------------------------------------------------------------- /vendor/srfi/:45: -------------------------------------------------------------------------------- 1 | %3a45 -------------------------------------------------------------------------------- /vendor/srfi/:45.sls: -------------------------------------------------------------------------------- 1 | %3a45.sls -------------------------------------------------------------------------------- /vendor/srfi/:48: -------------------------------------------------------------------------------- 1 | %3a48 -------------------------------------------------------------------------------- /vendor/srfi/:48.sls: -------------------------------------------------------------------------------- 1 | %3a48.sls -------------------------------------------------------------------------------- /vendor/srfi/:5: -------------------------------------------------------------------------------- 1 | %3a5 -------------------------------------------------------------------------------- /vendor/srfi/:5.sls: -------------------------------------------------------------------------------- 1 | %3a5.sls -------------------------------------------------------------------------------- /vendor/srfi/:51: -------------------------------------------------------------------------------- 1 | %3a51 -------------------------------------------------------------------------------- /vendor/srfi/:51.sls: -------------------------------------------------------------------------------- 1 | %3a51.sls -------------------------------------------------------------------------------- /vendor/srfi/:54: -------------------------------------------------------------------------------- 1 | %3a54 -------------------------------------------------------------------------------- /vendor/srfi/:54.sls: -------------------------------------------------------------------------------- 1 | %3a54.sls -------------------------------------------------------------------------------- /vendor/srfi/:6: -------------------------------------------------------------------------------- 1 | %3a6 -------------------------------------------------------------------------------- /vendor/srfi/:6.sls: -------------------------------------------------------------------------------- 1 | %3a6.sls -------------------------------------------------------------------------------- /vendor/srfi/:60: -------------------------------------------------------------------------------- 1 | %3a60 -------------------------------------------------------------------------------- /vendor/srfi/:60.sls: -------------------------------------------------------------------------------- 1 | %3a60.sls -------------------------------------------------------------------------------- /vendor/srfi/:61: -------------------------------------------------------------------------------- 1 | %3a61 -------------------------------------------------------------------------------- /vendor/srfi/:61.sls: -------------------------------------------------------------------------------- 1 | %3a61.sls -------------------------------------------------------------------------------- /vendor/srfi/:64: -------------------------------------------------------------------------------- 1 | %3a64 -------------------------------------------------------------------------------- /vendor/srfi/:64.sls: -------------------------------------------------------------------------------- 1 | %3a64.sls -------------------------------------------------------------------------------- /vendor/srfi/:67: -------------------------------------------------------------------------------- 1 | %3a67 -------------------------------------------------------------------------------- /vendor/srfi/:67.sls: -------------------------------------------------------------------------------- 1 | %3a67.sls -------------------------------------------------------------------------------- /vendor/srfi/:69: -------------------------------------------------------------------------------- 1 | %3a69 -------------------------------------------------------------------------------- /vendor/srfi/:69.sls: -------------------------------------------------------------------------------- 1 | %3a69.sls -------------------------------------------------------------------------------- /vendor/srfi/:78: -------------------------------------------------------------------------------- 1 | %3a78 -------------------------------------------------------------------------------- /vendor/srfi/:78.sls: -------------------------------------------------------------------------------- 1 | %3a78.sls -------------------------------------------------------------------------------- /vendor/srfi/:8: -------------------------------------------------------------------------------- 1 | %3a8 -------------------------------------------------------------------------------- /vendor/srfi/:8.sls: -------------------------------------------------------------------------------- 1 | %3a8.sls -------------------------------------------------------------------------------- /vendor/srfi/:9: -------------------------------------------------------------------------------- 1 | %3a9 -------------------------------------------------------------------------------- /vendor/srfi/:9.sls: -------------------------------------------------------------------------------- 1 | %3a9.sls -------------------------------------------------------------------------------- /vendor/srfi/:98: -------------------------------------------------------------------------------- 1 | %3a98 -------------------------------------------------------------------------------- /vendor/srfi/:98.sls: -------------------------------------------------------------------------------- 1 | %3a98.sls -------------------------------------------------------------------------------- /vendor/srfi/:99: -------------------------------------------------------------------------------- 1 | %3a99 -------------------------------------------------------------------------------- /vendor/srfi/:99.sls: -------------------------------------------------------------------------------- 1 | %3a99.sls -------------------------------------------------------------------------------- /vendor/srfi/LICENSE: -------------------------------------------------------------------------------- 1 | The following license applies to all files written by Derick Eddington, 2 | unless otherwise stated. 3 | 4 | =========================================================================== 5 | Copyright (c) 2008-2010 Derick Eddington. All rights reserved. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a 8 | copy of this software and associated documentation files (the "Software"), 9 | to deal in the Software without restriction, including without limitation 10 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 | and/or sell copies of the Software, and to permit persons to whom the 12 | Software is furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | Except as contained in this notice, the name(s) of the above copyright 18 | holders shall not be used in advertising or otherwise to promote the sale, 19 | use or other dealings in this Software without prior written authorization. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 24 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 27 | DEALINGS IN THE SOFTWARE. 28 | =========================================================================== 29 | 30 | 31 | Files written by others retain any copyright, license, and/or other notice 32 | they originally had. 33 | -------------------------------------------------------------------------------- /vendor/srfi/README.md: -------------------------------------------------------------------------------- 1 | # Chez SRFIs 2 | 3 | This is a quiet holding place for the SRFI port that I did based on the 4 | Scheme Libraries project: 5 | 6 | https://launchpad.net/scheme-libraries 7 | 8 | These were originally intended to simply provide a place for me to tweak 9 | and maintain my own copy of the SRFIs for use in Chez Scheme. 10 | 11 | With the release of Chez Scheme as an Open Source project and additional 12 | implementations beginning to become more widespread, this repository has 13 | found some use for other people as well. As such, it now serves as a 14 | sort of clearing house for some patches that people have applied to my 15 | original efforts. 16 | 17 | I no longer spend a great deal of time working on these libraries, but I 18 | welcome additional patches and changes as people would like to submit them, 19 | provided that they respect the following: 20 | 21 | 1. They should work. 22 | 2. They should not result in breakage for Chez Scheme, which is the primary 23 | intended target of this repository. 24 | 3. They should strive for simplicity and avoid too many dirty hacks. 25 | 26 | More information on the SRFIs can be found upstream or in the upstream 27 | README. 28 | -------------------------------------------------------------------------------- /vendor/srfi/link-dirs.chezscheme.sps: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env scheme-script 2 | ;;; Copyright (c) 2012 Aaron W. Hsu 3 | ;;; 4 | ;;; Permission to use, copy, modify, and distribute this software for 5 | ;;; any purpose with or without fee is hereby granted, provided that the 6 | ;;; above copyright notice and this permission notice appear in all 7 | ;;; copies. 8 | ;;; 9 | ;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 | ;;; WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 | ;;; WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 | ;;; AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 | ;;; DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA 14 | ;;; OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 | ;;; TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 | ;;; PERFORMANCE OF THIS SOFTWARE. 17 | 18 | (import (chezscheme)) 19 | 20 | ;;; Link all of the SRFIs to their normal directories like sane 21 | ;;; people who use Chez Scheme prefer. :-) 22 | 23 | (define (translate-name name) 24 | (let f ([i 0] [j 0]) 25 | (if (fx= i (string-length name)) 26 | (make-string j) 27 | (let ([c (string-ref name i)]) 28 | (cond 29 | [(and (char=? c #\%) 30 | (let ([next-i (fx+ i 3)]) 31 | (and (fx<= next-i (string-length name)) next-i))) => 32 | (lambda (next-i) 33 | (let ([translated-name (f next-i (fx+ j 1))]) 34 | (string-set! translated-name j 35 | (integer->char 36 | (string->number 37 | (substring name (fx+ i 1) next-i) 16))) 38 | translated-name))] 39 | [else 40 | (let ([translated-name (f (fx+ i 1) (fx+ j 1))]) 41 | (string-set! translated-name j c) 42 | translated-name)]))))) 43 | 44 | (define (link-files!) 45 | (let file-loop ([ls (directory-list (current-directory))]) 46 | (unless (null? ls) 47 | (let ([name (car ls)]) 48 | (let ([translated-name (translate-name name)]) 49 | (unless (or (string=? name translated-name) 50 | (file-exists? translated-name)) 51 | (system (format "ln -sf '~a' '~a'" name translated-name))) 52 | (when (file-directory? translated-name) 53 | (parameterize ([current-directory translated-name]) 54 | (link-files!))) 55 | (file-loop (cdr ls))))))) 56 | 57 | (link-files!) 58 | -------------------------------------------------------------------------------- /vendor/srfi/private/OS-id-features.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi private OS-id-features) 6 | (export 7 | OS-id-features) 8 | (import 9 | (rnrs)) 10 | 11 | (define (OS-id-features OS-id features-alist) 12 | (define OS-id-len (string-length OS-id)) 13 | (define (OS-id-contains? str) 14 | (define str-len (string-length str)) 15 | (let loop ((i 0)) 16 | (and (<= (+ i str-len) OS-id-len) 17 | (or (string-ci=? str (substring OS-id i (+ i str-len))) 18 | (loop (+ 1 i)))))) 19 | (apply append 20 | (map cdr (filter (lambda (x) (OS-id-contains? (car x))) 21 | features-alist)))) 22 | ) 23 | -------------------------------------------------------------------------------- /vendor/srfi/private/check-arg.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | ;; If your Scheme system doesn't have a stack-tracing debugger, you can change 6 | ;; this to use the version which actually does check. 7 | 8 | (library (srfi private check-arg) 9 | (export 10 | check-arg) 11 | (import 12 | (rnrs)) 13 | 14 | #;(define (check-arg pred val who) 15 | (if (pred val) 16 | val 17 | (assertion-violation #F "check-arg failed" who pred val))) 18 | 19 | (define-syntax check-arg 20 | (syntax-rules () 21 | ((_ pred val who) 22 | val))) 23 | ) 24 | -------------------------------------------------------------------------------- /vendor/srfi/private/define-values.chezscheme.sls: -------------------------------------------------------------------------------- 1 | (library (srfi private define-values) 2 | (export define-values) 3 | (import (chezscheme))) 4 | -------------------------------------------------------------------------------- /vendor/srfi/private/define-values.sls: -------------------------------------------------------------------------------- 1 | (library (srfi private define-values) 2 | (export define-values) 3 | (import (rnrs) (srfi private helpers)) 4 | 5 | (define-syntax define-values 6 | (lambda (x) 7 | (syntax-case x () 8 | [(_ (fmls ...) expr) 9 | (with-syntax ([(i ...) (enumerate #'(fmls ...))] 10 | [(t ...) (generate-temporaries #'(fmls ...))]) 11 | #'(begin 12 | (define tmp 13 | (let-values ([(t ...) expr]) 14 | (vector t ...))) 15 | (define fmls (vector-ref tmp i)) ...))] 16 | [(_ (fmls ... . rest-fml) expr) 17 | (with-syntax ([(t ...) (generate-temporaries #'(fmls ...))] 18 | [(rest-t) (generate-temporaries #'(rest-fml))] 19 | [(all-fmls ...) #'(rest-fml fmls ...)] 20 | [(i ...) (enumerate #'(rest-fml fmls ...))]) 21 | #'(begin 22 | (define tmp 23 | (let-values ([(t ... . rest-t) expr]) 24 | (vector rest-t t ...))) 25 | (define all-fmls (vector-ref tmp i)) ...))])))) 26 | -------------------------------------------------------------------------------- /vendor/srfi/private/feature-cond.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi private feature-cond) 6 | (export 7 | feature-cond) 8 | (import 9 | (rnrs) 10 | (only (srfi private registry) available-features)) 11 | 12 | (define-syntax feature-cond 13 | (lambda (stx) 14 | (define (identifier?/name=? x n) 15 | (and (identifier? x) 16 | (symbol=? n (syntax->datum x)))) 17 | (define (make-test f) 18 | (define (invalid) 19 | (syntax-violation #F "invalid feature syntax" stx f)) 20 | (syntax-case f () 21 | ((c x ...) 22 | (identifier?/name=? (syntax c) (quote and)) 23 | (cons (syntax and) (map make-test (syntax (x ...))))) 24 | ((c x ...) 25 | (identifier?/name=? (syntax c) (quote or)) 26 | (cons (syntax or) (map make-test (syntax (x ...))))) 27 | ((c x ...) 28 | (identifier?/name=? (syntax c) (quote not)) 29 | (if (= 1 (length (syntax (x ...)))) 30 | (list (syntax not) (make-test (car (syntax (x ...))))) 31 | (invalid))) 32 | (datum 33 | (not (memq (syntax->datum (syntax datum)) 34 | (quote (and or not else)))) 35 | (syntax (and (member (quote datum) available-features) #T))) 36 | (_ (invalid)))) 37 | (syntax-case stx () 38 | ((_ (feature . exprs) ... (e . eexprs)) 39 | (identifier?/name=? (syntax e) (quote else)) 40 | (with-syntax (((test ...) (map make-test (syntax (feature ...))))) 41 | (syntax (cond (test . exprs) ... (else . eexprs))))) 42 | ((kw (feature . exprs) ...) 43 | (syntax (kw (feature . exprs) ... (else (no-clause-true)))))))) 44 | 45 | (define (no-clause-true) 46 | (assertion-violation (quote feature-cond) "no clause true")) 47 | ) 48 | -------------------------------------------------------------------------------- /vendor/srfi/private/helpers.chezscheme.sls: -------------------------------------------------------------------------------- 1 | (library (srfi private helpers) 2 | (export enumerate) 3 | (import (chezscheme))) 4 | -------------------------------------------------------------------------------- /vendor/srfi/private/helpers.sls: -------------------------------------------------------------------------------- 1 | (library (srfi private helpers) 2 | (export enumerate) 3 | (import (rnrs)) 4 | 5 | (define enumerate 6 | (lambda (ls) 7 | (let f ([ls ls] [i 0]) 8 | (if (null? ls) 9 | '() 10 | (cons i (f (cdr ls) (fx+ i 1)))))))) 11 | -------------------------------------------------------------------------------- /vendor/srfi/private/include.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi private include) 6 | (export 7 | include/resolve) 8 | (import 9 | (rnrs) 10 | (for (srfi private include compat) expand)) 11 | 12 | (define-syntax include/resolve 13 | (lambda (stx) 14 | (define (include/lexical-context ctxt filename) 15 | (with-exception-handler 16 | (lambda (ex) 17 | (raise 18 | (condition 19 | (make-error) 20 | (make-who-condition 'include/resolve) 21 | (make-message-condition "error while trying to include") 22 | (make-irritants-condition (list filename)) 23 | (if (condition? ex) ex (make-irritants-condition (list ex)))))) 24 | (lambda () 25 | (call-with-input-file filename 26 | (lambda (fip) 27 | (let loop ((a '())) 28 | (let ((x (read fip))) 29 | (if (eof-object? x) 30 | (cons #'begin (datum->syntax ctxt (reverse a))) 31 | (loop (cons x a)))))))))) 32 | (syntax-case stx () 33 | ((ctxt (lib-path* ...) file-path) 34 | (for-all (lambda (s) (and (string? s) (positive? (string-length s)))) 35 | (syntax->datum #'(lib-path* ... file-path))) 36 | (let ((p (apply string-append 37 | (map (lambda (ps) (string-append "/" ps)) 38 | (syntax->datum #'(lib-path* ... file-path))))) 39 | (sp (search-paths))) 40 | (let loop ((search sp)) 41 | (if (null? search) 42 | (error 'include/resolve "cannot find file in search paths" 43 | (substring p 1 (string-length p)) sp) 44 | (let ((full (string-append (car search) p))) 45 | (if (file-exists? full) 46 | (include/lexical-context #'ctxt full) 47 | (loop (cdr search))))))))))) 48 | ) 49 | -------------------------------------------------------------------------------- /vendor/srfi/private/include/compat.chezscheme.sls: -------------------------------------------------------------------------------- 1 | ;;; Copyright (c) 2012 Aaron W. Hsu 2 | ;;; 3 | ;;; Permission to use, copy, modify, and distribute this software for 4 | ;;; any purpose with or without fee is hereby granted, provided that the 5 | ;;; above copyright notice and this permission notice appear in all 6 | ;;; copies. 7 | ;;; 8 | ;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 9 | ;;; WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 10 | ;;; WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 11 | ;;; AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 12 | ;;; DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA 13 | ;;; OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 14 | ;;; TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | ;;; PERFORMANCE OF THIS SOFTWARE. 16 | 17 | (library (srfi private include compat) 18 | (export search-paths) 19 | (import (rnrs) (only (chezscheme) source-directories library-directories)) 20 | 21 | (define (search-paths) 22 | (fold-left (lambda (ls as) (cons (car as) ls)) 23 | (source-directories) (library-directories)))) 24 | -------------------------------------------------------------------------------- /vendor/srfi/private/include/compat.guile.sls: -------------------------------------------------------------------------------- 1 | (library (srfi private include compat) 2 | (export search-paths) 3 | (import (rnrs) (only (guile) %load-path)) 4 | 5 | (define (search-paths) 6 | %load-path)) 7 | -------------------------------------------------------------------------------- /vendor/srfi/private/include/compat.ikarus.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi private include compat) 6 | (export 7 | (rename (library-path search-paths))) 8 | (import 9 | (only (ikarus) library-path)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/private/include/compat.larceny.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi private include compat) 6 | (export 7 | search-paths) 8 | (import 9 | (rnrs base) 10 | (primitives current-require-path getenv absolute-path-string?)) 11 | 12 | (define (search-paths) 13 | (let ((larceny-root (getenv "LARCENY_ROOT"))) 14 | (map (lambda (crp) 15 | (if (absolute-path-string? crp) 16 | crp 17 | (string-append larceny-root "/" crp))) 18 | (current-require-path)))) 19 | 20 | ) 21 | -------------------------------------------------------------------------------- /vendor/srfi/private/include/compat.mzscheme.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi private include compat) 6 | (export 7 | search-paths) 8 | (import 9 | (rnrs base) 10 | (only (scheme base) current-library-collection-paths path->string) 11 | (only (scheme mpair) list->mlist)) 12 | 13 | (define (search-paths) 14 | (map path->string 15 | (list->mlist (current-library-collection-paths)))) 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/srfi/private/include/compat.ypsilon.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi private include compat) 6 | (export 7 | (rename (scheme-library-paths search-paths))) 8 | (import 9 | (only (core) scheme-library-paths)) 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/srfi/private/make-aliased-libraries.sps: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (import 6 | (rnrs) 7 | (only (srfi private registry) available-features) 8 | (only (xitomatl lists) map/filter) 9 | (only (xitomatl match) match-lambda) 10 | (only (xitomatl common) format fprintf printf) 11 | (only (xitomatl strings) string-intersperse) 12 | (only (xitomatl predicates) symbolnumber (symbol->string num)) 21 | name)) 22 | (_ #F)) 23 | available-features)) 24 | 25 | (define alias-template 26 | "#!r6rs 27 | ;; Automatically generated by ~a 28 | (library ~s 29 | (export 30 | ~a) 31 | (import ~s) 32 | ) 33 | ") 34 | 35 | (define program-name (car (command-line))) 36 | 37 | (for-each 38 | (lambda (x) 39 | (let* ((srfi-num (car x)) 40 | (lib-name (cadr x)) 41 | (exports (list-sort symbolsymbol (format ":~d" srfi-num)))) 44 | (out-file (format "%3a~d.sls" srfi-num))) 45 | (cond 46 | ((file-exists? out-file) 47 | (printf "Skipping ~a because it already exists.\n" out-file)) 48 | (else 49 | (call-with-output-file out-file 50 | (lambda (fop) 51 | (fprintf fop alias-template 52 | program-name 53 | alias-name 54 | (string-intersperse (map symbol->string exports) "\n ") 55 | lib-name))) 56 | (printf "~a\n" out-file))))) 57 | srfi-libraries/mnemonics) 58 | -------------------------------------------------------------------------------- /vendor/srfi/private/platform-features.chezscheme.sls: -------------------------------------------------------------------------------- 1 | ;;; Copyright (c) 2012 Aaron W. Hsu 2 | ;;; 3 | ;;; Permission to use, copy, modify, and distribute this software for any 4 | ;;; purpose with or without fee is hereby granted, provided that the above 5 | ;;; copyright notice and this permission notice appear in all copies. 6 | ;;; 7 | ;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | ;;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | ;;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ;;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | ;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ;;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | ;;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | 15 | (library (srfi private platform-features) 16 | (export expand-time-features run-time-features) 17 | (import (chezscheme) (srfi private OS-id-features)) 18 | 19 | (define (expand-time-features) '(chezscheme syntax-case)) 20 | 21 | (define (run-time-features) 22 | (OS-id-features (symbol->string (machine-type)) 23 | '(("t" threads) 24 | ("a6" x86-64) 25 | ("i3" x86) 26 | ("le" linux posix) 27 | ("ob" openbsd posix bsd) 28 | ("fb" freebsd posix bsd) 29 | ("nb" netbsd posix bsd) 30 | ("osx" darwin posix) 31 | ("s2" solaris posix) 32 | ("nt" windows)))) 33 | 34 | ) 35 | -------------------------------------------------------------------------------- /vendor/srfi/private/platform-features.ikarus.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi private platform-features) 6 | (export 7 | expand-time-features 8 | run-time-features) 9 | (import 10 | (rnrs) 11 | (only (ikarus) host-info) 12 | (srfi private OS-id-features)) 13 | 14 | (define (expand-time-features) 15 | '(ikarus)) 16 | 17 | (define (run-time-features) 18 | (OS-id-features 19 | (host-info) 20 | '(("linux" linux posix) 21 | ("solaris" solaris posix) 22 | ("darwin" darwin posix) 23 | ("bsd" bsd) 24 | ("freebsd" freebsd posix) 25 | ("openbsd" openbsd posix) 26 | ("cygwin" cygwin posix) ;; correct? 27 | ("gnu" gnu)))) 28 | ) 29 | -------------------------------------------------------------------------------- /vendor/srfi/private/platform-features.larceny.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi private platform-features) 6 | (export 7 | expand-time-features 8 | run-time-features) 9 | (import 10 | (rnrs base) 11 | (rnrs lists) 12 | (primitives system-features) 13 | (srfi private OS-id-features)) 14 | 15 | (define (expand-time-features) 16 | '(larceny)) 17 | 18 | (define (run-time-features) 19 | (OS-id-features 20 | (cdr (assq 'os-name (system-features))) 21 | '(("linux" linux posix) 22 | ("solaris" solaris posix) 23 | ("darwin" darwin posix) 24 | ("bsd" bsd) 25 | ("freebsd" freebsd posix) 26 | ("openbsd" openbsd posix) 27 | ("windows" windows)))) 28 | ) 29 | -------------------------------------------------------------------------------- /vendor/srfi/private/platform-features.mzscheme.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi private platform-features) 6 | (export 7 | expand-time-features 8 | run-time-features) 9 | (import 10 | (rnrs) 11 | (only (scheme base) system-type) 12 | (srfi private OS-id-features)) 13 | 14 | (define (expand-time-features) 15 | '(mzscheme)) 16 | 17 | (define (run-time-features) 18 | (OS-id-features 19 | (string-append (symbol->string (system-type 'os)) 20 | " " (system-type 'machine)) 21 | '(("linux" linux posix) 22 | ("macosx" mac-os-x darwin posix) 23 | ("solaris" solaris posix) 24 | ("gnu" gnu) 25 | ("bsd" bsd) 26 | ("freebsd" freebsd posix) 27 | ("openbsd" openbsd posix) 28 | ("windows" windows)))) 29 | ) 30 | -------------------------------------------------------------------------------- /vendor/srfi/private/platform-features.ypsilon.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi private platform-features) 6 | (export 7 | expand-time-features 8 | run-time-features) 9 | (import 10 | (rnrs) 11 | (only (core) architecture-feature) 12 | (srfi private OS-id-features)) 13 | 14 | (define (expand-time-features) 15 | '(ypsilon)) 16 | 17 | (define (run-time-features) 18 | (OS-id-features 19 | (architecture-feature 'operating-system) 20 | '(("linux" linux posix) 21 | ("solaris" solaris posix) 22 | ("darwin" darwin posix) 23 | ("bsd" bsd) 24 | ("freebsd" freebsd posix) 25 | ("openbsd" openbsd posix) 26 | ("windows" windows)))) 27 | ) 28 | -------------------------------------------------------------------------------- /vendor/srfi/private/vanish.sls: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (library (srfi private vanish) 6 | (export 7 | vanish-define) 8 | (import 9 | (rnrs) 10 | (for (only (rnrs base) begin) (meta -1))) 11 | 12 | (define-syntax vanish-define 13 | (lambda (stx) 14 | (syntax-case stx () 15 | ((_ def (vanish ...)) 16 | (for-all identifier? #'(def vanish ...)) 17 | #'(make-vanish-define (syntax def) (syntax vanish) ...))))) 18 | 19 | (define (make-vanish-define def . to-vanish) 20 | (lambda (stx) 21 | (define (vanish? id) 22 | (memp (lambda (x) (free-identifier=? id x)) 23 | to-vanish)) 24 | (syntax-case stx () 25 | ((_ name . _) 26 | (and (identifier? #'name) 27 | (vanish? #'name)) 28 | #'(begin)) 29 | ((_ (name . _) . _) 30 | (and (identifier? #'name) 31 | (vanish? #'name)) 32 | #'(begin)) 33 | ((_ . r) 34 | (cons def #'r))))) 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/srfi/tests/and-let*.sps: -------------------------------------------------------------------------------- 1 | and-let%2a.sps -------------------------------------------------------------------------------- /vendor/srfi/tests/char-sets.sps: -------------------------------------------------------------------------------- 1 | ;; -*- mode: scheme; coding: utf-8 -*- 2 | ;; Copyright © 2018 Göran Weinholt 3 | ;; SPDX-License-Identifier: (MIT OR BSD-3-Clause OR LicenseRef-LICENSE) 4 | #!r6rs 5 | 6 | (import 7 | (rnrs) 8 | (srfi :14 char-sets inversion-list) 9 | (srfi :14 char-sets) 10 | (srfi :48 intermediate-format-strings) 11 | (srfi private include)) 12 | 13 | ;; Compatibility for Scheme 48 test suites 14 | 15 | (define-syntax define-test-suite 16 | (syntax-rules () 17 | ((_ suite) 18 | (define dummy 'suite)))) 19 | 20 | (define-syntax define-test-case 21 | (syntax-rules () 22 | ((_ test-case suite checks ...) 23 | (begin checks ...)))) 24 | 25 | (define (is-true) (lambda (x) x)) 26 | 27 | (define (is-false) not) 28 | 29 | (define-syntax check 30 | (syntax-rules (=>) 31 | ((_ expr) 32 | (check-that expr (is-true))) 33 | ((_ expr => expect) 34 | (check-that expr (lambda (x) (equal? x expect)))) 35 | ((_ expr (=> equal?) expect) 36 | (check-that expr (lambda (x) (equal? x expect)))))) 37 | 38 | (define-syntax check-that 39 | (syntax-rules () 40 | ((_ expr ok?) 41 | (let ((v expr)) 42 | (format #t "~s~%=>~%~s~%" 'expr v) 43 | (cond ((ok? v) 44 | (format #t ";; correct~%~%")) 45 | (else 46 | (format #t ";; *** failed ***~%test: ~s~%~%" 'ok?))))))) 47 | 48 | (define is 49 | (case-lambda 50 | ((= x) (lambda (y) (= x y))) 51 | ((x) (if (procedure? x) x (lambda (y) (equal? x y)))))) 52 | 53 | (define (opposite f) (lambda (x) (not (f x)))) 54 | 55 | (define (all-of . fs) 56 | (lambda (x) (for-all (lambda (f) (f x)) fs))) 57 | 58 | (define x->char-set ->char-set) 59 | (define char->scalar-value char->integer) 60 | (define scalar-value->char integer->char) 61 | 62 | (include/resolve ("srfi" "%3a14" "char-sets") "inversion-list-check.scm") 63 | (include/resolve ("srfi" "%3a14") "srfi-14-check.scm") 64 | -------------------------------------------------------------------------------- /vendor/srfi/tests/compare-procedures.sps: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (import 6 | (except (rnrs) error) 7 | (rnrs r5rs) 8 | (rename (only (rnrs) write) (write pretty-write)) 9 | (srfi :23 error) 10 | (srfi :42 eager-comprehensions) 11 | (srfi private include) 12 | (srfi :67 compare-procedures)) 13 | 14 | (include/resolve ("srfi" "%3a67") "examples.scm") 15 | -------------------------------------------------------------------------------- /vendor/srfi/tests/cut.sps: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (import 6 | (except (rnrs) display newline) 7 | (srfi :78 lightweight-testing) 8 | (srfi private include) 9 | (srfi :26 cut)) 10 | 11 | (define (ignore . _) (values)) 12 | (define display ignore) 13 | (define newline ignore) 14 | (define check-all ignore) 15 | 16 | (let-syntax ((define (syntax-rules (check check-all for-each quote equal?) 17 | ((_ (check _) . _) 18 | (begin)) 19 | ((_ (check-all) (for-each check '((equal? expr val) ...))) 20 | (begin (check expr => val) ...))))) 21 | (include/resolve ("srfi" "%3a26") "check.scm")) 22 | 23 | ;;;; free-identifier=? of <> and <...> 24 | 25 | (check 26 | (let* ((<> 'wrong) (f (cut list <> <...>))) 27 | (set! <> 'ok) 28 | (f 1 2)) 29 | => '(ok 1 2)) 30 | (check 31 | (let* ((<...> 'wrong) (f (cut list <> <...>))) 32 | (set! <...> 'ok) 33 | (f 1)) 34 | => '(1 ok)) 35 | (check 36 | (let* ((<> 'ok) (f (cute list <> <...>))) 37 | (set! <> 'wrong) 38 | (f 1 2)) 39 | => '(ok 1 2)) 40 | (check 41 | (let* ((<...> 'ok) (f (cute list <> <...>))) 42 | (set! <...> 'wrong) 43 | (f 1)) 44 | => '(1 ok)) 45 | 46 | (check-report) 47 | -------------------------------------------------------------------------------- /vendor/srfi/tests/eager-comprehensions.sps: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (import 6 | (except (rnrs) error) 7 | (rnrs mutable-strings) 8 | (srfi :23 error) 9 | (srfi private include) 10 | (srfi :42 eager-comprehensions)) 11 | 12 | (define (my-open-output-file filename) 13 | (open-file-output-port filename 14 | (file-options no-fail) 15 | 'block 16 | (native-transcoder))) 17 | 18 | (define (my-call-with-input-file filename thunk) 19 | (call-with-input-file filename thunk)) 20 | 21 | (include/resolve ("srfi" "%3a42") "examples.scm") 22 | -------------------------------------------------------------------------------- /vendor/srfi/tests/lightweight-testing.sps: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (import 6 | (rnrs) 7 | (rnrs r5rs) 8 | (srfi :42 eager-comprehensions) 9 | (srfi private include) 10 | (srfi :78 lightweight-testing)) 11 | 12 | (include/resolve ("srfi" "%3a78") "examples.scm") 13 | -------------------------------------------------------------------------------- /vendor/srfi/tests/multi-dimensional-arrays--arlib.sps: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (import 6 | (rnrs) 7 | (srfi :25 multi-dimensional-arrays) 8 | (srfi :25 multi-dimensional-arrays arlib) 9 | (srfi :78 lightweight-testing) 10 | (srfi private include)) 11 | 12 | (define-syntax past (syntax-rules () ((_ . r) (begin)))) 13 | 14 | (let-syntax ((or 15 | (syntax-rules (error) 16 | ((_ expr (error msg)) 17 | (check expr => #T)) 18 | ((_ . r) (or . r))))) 19 | (include/resolve ("srfi" "%3a25") "list.scm")) 20 | 21 | (check-report) 22 | -------------------------------------------------------------------------------- /vendor/srfi/tests/multi-dimensional-arrays.sps: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (import 6 | (rnrs) 7 | (srfi :25 multi-dimensional-arrays) 8 | (srfi :78 lightweight-testing) 9 | (srfi private include)) 10 | 11 | (let-syntax ((or 12 | (syntax-rules (error) 13 | ((_ expr (error msg)) 14 | (check (and expr #T) => #T)) 15 | ((_ . r) (or . r)))) 16 | (past 17 | (syntax-rules () 18 | ((_ . r) (values))))) 19 | (include/resolve ("srfi" "%3a25") "test.scm")) 20 | 21 | (check-report) 22 | -------------------------------------------------------------------------------- /vendor/srfi/tests/os-environment-variables.sps: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (import 6 | (rename (rnrs) (for-all andmap)) 7 | (srfi :78 lightweight-testing) 8 | (srfi :98 os-environment-variables)) 9 | 10 | (check (list? (get-environment-variables)) 11 | => #T) 12 | (check (andmap (lambda (a) 13 | (and (pair? a) 14 | (string? (car a)) 15 | (positive? (string-length (car a))) 16 | (string? (cdr a)))) 17 | (get-environment-variables)) 18 | => #T) 19 | (check (andmap (lambda (a) 20 | (let ((v (get-environment-variable (car a)))) 21 | (and (string? v) 22 | (string=? v (cdr a))))) 23 | (get-environment-variables)) 24 | => #T) 25 | (assert (not (assoc "BLAH" (get-environment-variables)))) 26 | (check (get-environment-variable "BLAH") 27 | => #F) 28 | 29 | (check-report) 30 | -------------------------------------------------------------------------------- /vendor/srfi/tests/random-bits.sps: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (import 6 | (except (rnrs) error) 7 | (rnrs r5rs) 8 | (srfi :23 error) 9 | (srfi private include) 10 | (srfi :27 random-bits)) 11 | 12 | (define eval 'ignore) 13 | (define interaction-environment 'ignore) 14 | 15 | (define ascii->char integer->char) 16 | 17 | (include/resolve ("srfi" "%3a27") "conftest.scm") 18 | 19 | (check-mrg32k3a) 20 | (display "passed (check-mrg32k3a)\n") 21 | -------------------------------------------------------------------------------- /vendor/srfi/tests/rec.sps: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (import (rnrs) (srfi :31 rec)) 6 | 7 | (display 8 | ((rec (F N) 9 | (if (zero? N) 1 10 | (* N (F (- N 1))))) 11 | 10)) 12 | (newline) 13 | -------------------------------------------------------------------------------- /vendor/srfi/tests/records.sps: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (import 6 | (rnrs base) ; no R6RS records 7 | (srfi :78 lightweight-testing) 8 | (srfi :9 records) 9 | #;(srfi :99 records)) 10 | 11 | (define unspec) 12 | 13 | (define-record-type T0 (make-T0) T0?) 14 | (check (T0? (make-T0)) => #T) 15 | 16 | (define-record-type T1 (make-T1) T1? (x T1-x)) 17 | (check (T1? (make-T1)) => #T) 18 | (check (T1-x (make-T1)) => unspec) 19 | 20 | (define-record-type T2 (make-T2 y x) T2? (x T2-x) (y T2-y)) 21 | (let ((o (make-T2 1 2))) 22 | (check (T2? o) => #T) 23 | (check (T2-x o) => 2) 24 | (check (T2-y o) => 1)) 25 | 26 | (define-record-type T3 (make-T3 z) T3? (x T3-x set-T3-x!) (y T3-y) (z T3-z)) 27 | (let ((o (make-T3 1))) 28 | (check (T3? o) => #T) 29 | (check (T3-x o) => unspec) 30 | (check (T3-y o) => unspec) 31 | (check (T3-z o) => 1) 32 | (set-T3-x! o 2) 33 | (check (T3-x o) => 2)) 34 | 35 | (check-report) 36 | -------------------------------------------------------------------------------- /vendor/srfi/tests/testing.sps: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (import 6 | (except (rnrs base) error) 7 | (rnrs lists) 8 | (srfi :23 error) 9 | (srfi private include) 10 | (srfi :64 testing)) 11 | 12 | (include/resolve ("srfi" "%3a64") "srfi-64-test.scm") 13 | -------------------------------------------------------------------------------- /vendor/srfi/tests/time.sps: -------------------------------------------------------------------------------- 1 | #!r6rs 2 | ;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named 3 | ;; LICENSE from the original collection this file is distributed with. 4 | 5 | (import 6 | (rnrs) 7 | (rnrs mutable-pairs) 8 | (srfi :48 intermediate-format-strings) 9 | (srfi private include) 10 | (srfi :19 time)) 11 | 12 | (include/resolve ("srfi" "%3a19") "srfi-19-test-suite.scm") 13 | 14 | (define (printf fmt-str . args) 15 | (display (apply format fmt-str args))) 16 | 17 | (define (date->string/all-formats) 18 | ;; NOTE: ~x and ~X aren't doing what the SRFI 19 document says they do. 19 | ;; I guess that's a bug in the reference implementation. 20 | (define fs 21 | '("~~" "~a" "~A" "~b" "~B" "~c" "~d" "~D" "~e" "~f" "~h" "~H" "~I" "~j" "~k" 22 | "~l" "~m" "~M" "~n" "~N" "~p" "~r" "~s" "~S" "~t" "~T" "~U" "~V" "~w" "~W" 23 | "~x" "~X" "~y" "~Y" "~z" "~Z" "~1" "~2" "~3" "~4" "~5")) 24 | (define cd (current-date)) 25 | (display "\n;;; Running date->string format exercise\n") 26 | (printf "(current-date)\n=>\n~s\n" cd) 27 | (for-each 28 | (lambda (f) 29 | (printf "\n--- Format: ~a ----------------------------------------\n" f) 30 | (display (date->string cd f)) (newline)) 31 | fs)) 32 | 33 | ;;TODO 34 | #;(define (string->date/all-formats) 35 | ) 36 | 37 | (date->string/all-formats) 38 | #;(string->date/all-formats) 39 | --------------------------------------------------------------------------------