| 1 |
|
| 2 |
(library (srfi :166 base) |
| 3 |
(export |
| 4 |
;; basic |
| 5 |
show displayed written written-shared written-simply |
| 6 |
escaped maybe-escaped |
| 7 |
numeric numeric/comma numeric/si numeric/fitted |
| 8 |
nl fl space-to tab-to nothing each each-in-list |
| 9 |
joined joined/prefix joined/suffix joined/last joined/dot |
| 10 |
joined/range padded padded/right padded/both |
| 11 |
trimmed trimmed/right trimmed/both trimmed/lazy |
| 12 |
fitted fitted/right fitted/both output-default |
| 13 |
;; computations |
| 14 |
fn with with! forked call-with-output |
| 15 |
;; state variables |
| 16 |
make-state-variable |
| 17 |
port row col width output writer pad-char ellipsis |
| 18 |
string-width substring/width substring/preserve |
| 19 |
radix precision decimal-sep decimal-align sign-rule |
| 20 |
comma-sep comma-rule word-separator? ambiguous-is-wide? |
| 21 |
pretty-environment |
| 22 |
) |
| 23 |
(import (except (rnrs) |
| 24 |
error |
| 25 |
define-record-type |
| 26 |
string-hash string-ci-hash) |
| 27 |
(rnrs eval) |
| 28 |
(rnrs r5rs) |
| 29 |
(srfi :6) |
| 30 |
(srfi :23 error tricks) |
| 31 |
(srfi :69) |
| 32 |
(srfi :130) |
| 33 |
(only (srfi :152 strings) write-string) |
| 34 |
(rename (srfi :165) |
| 35 |
(computation-each sequence) |
| 36 |
(computation-with! with!) |
| 37 |
(computation-forked forked) |
| 38 |
(make-computation-environment-variable make-state-variable)) |
| 39 |
(srfi private include) |
| 40 |
(srfi :166 show-shared)) |
| 41 |
|
| 42 |
(define (interaction-environment) (environment '(rnrs))) |
| 43 |
(define-syntax let-optionals* |
| 44 |
(syntax-rules () |
| 45 |
((let-optionals* opt-ls () . body) |
| 46 |
(begin . body)) |
| 47 |
((let-optionals* (op . args) vars . body) |
| 48 |
(let ((tmp (op . args))) |
| 49 |
(let-optionals* tmp vars . body))) |
| 50 |
((let-optionals* tmp ((var default) . rest) . body) |
| 51 |
(let ((var (if (pair? tmp) (car tmp) default)) |
| 52 |
(tmp2 (if (pair? tmp) (cdr tmp) '()))) |
| 53 |
(let-optionals* tmp2 rest . body))) |
| 54 |
((let-optionals* tmp tail . body) |
| 55 |
(let ((tail tmp)) . body)))) |
| 56 |
|
| 57 |
(SRFI-23-error->R6RS |
| 58 |
"(library (srfi :166 base))" |
| 59 |
(include/resolve ("srfi" "%3a166") "base.scm") |
| 60 |
(include/resolve ("srfi" "%3a166") "write.scm") |
| 61 |
(include/resolve ("srfi" "%3a166") "show.scm"))) |