mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Many still import (chibi), and as (scheme base) is somewhat more expensive to load at present these are changed to cond-expand. Many libraries also rely on (srfi 33), and these have been changed to a cond-expand first trying (srfi 60) where available. Also fixing a few portability concerns (duplicate imports of the same binding), and adding a few libraries missing from lib-tests.scm.
23 lines
649 B
Scheme
23 lines
649 B
Scheme
|
|
(define-library (chibi char-set base)
|
|
(cond-expand
|
|
(chibi
|
|
(import (chibi))
|
|
(begin
|
|
(define-syntax immutable-char-set
|
|
(sc-macro-transformer
|
|
(lambda (expr use-env)
|
|
(eval (cadr expr) use-env))))))
|
|
(else
|
|
(import (scheme base))
|
|
(begin
|
|
(define-syntax immutable-char-set
|
|
(syntax-rules () ((immutable-char-set cs) cs))))))
|
|
(import (chibi iset base))
|
|
(export (rename Integer-Set Char-Set)
|
|
(rename iset? char-set?)
|
|
immutable-char-set
|
|
char-set-contains?)
|
|
(begin
|
|
(define (char-set-contains? cset ch)
|
|
(iset-contains? cset (char->integer ch)))))
|