* moved port?, input-port?, and output-port? to ikarus.predicates
This commit is contained in:
parent
8522098e96
commit
55f1a1282e
BIN
src/ikarus.boot
BIN
src/ikarus.boot
Binary file not shown.
|
@ -14,12 +14,6 @@
|
||||||
(primitive-set! 'eof-object
|
(primitive-set! 'eof-object
|
||||||
(lambda () (eof-object)))
|
(lambda () (eof-object)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(primitive-set! 'pointer-value
|
(primitive-set! 'pointer-value
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
(pointer-value x)))
|
(pointer-value x)))
|
||||||
|
|
|
@ -12,12 +12,14 @@
|
||||||
(except (ikarus) fixnum? flonum? bignum? number? complex? real?
|
(except (ikarus) fixnum? flonum? bignum? number? complex? real?
|
||||||
rational? integer? exact? eof-object? bwp-object? immediate?
|
rational? integer? exact? eof-object? bwp-object? immediate?
|
||||||
boolean? char? vector? string? procedure? null?
|
boolean? char? vector? string? procedure? null?
|
||||||
pair? weak-pair? symbol? not eq? eqv? equal?)
|
pair? weak-pair? symbol? not eq? eqv? equal?
|
||||||
|
port? input-port? output-port?)
|
||||||
(only (scheme) $fxadd1 $vector-ref $fx= $char= $string-ref
|
(only (scheme) $fxadd1 $vector-ref $fx= $char= $string-ref
|
||||||
$string-length $vector-length $car $cdr)
|
$string-length $vector-length $car $cdr)
|
||||||
(rename (only (ikarus) fixnum? flonum? bignum? eof-object?
|
(rename (only (ikarus) fixnum? flonum? bignum? eof-object?
|
||||||
bwp-object? immediate? boolean? char? vector? string?
|
bwp-object? immediate? boolean? char? vector? string?
|
||||||
procedure? null? pair? symbol? eq?)
|
procedure? null? pair? symbol? eq?
|
||||||
|
port? input-port? output-port?)
|
||||||
(fixnum? sys:fixnum?)
|
(fixnum? sys:fixnum?)
|
||||||
(flonum? sys:flonum?)
|
(flonum? sys:flonum?)
|
||||||
(bignum? sys:bignum?)
|
(bignum? sys:bignum?)
|
||||||
|
@ -32,7 +34,11 @@
|
||||||
(null? sys:null?)
|
(null? sys:null?)
|
||||||
(pair? sys:pair?)
|
(pair? sys:pair?)
|
||||||
(symbol? sys:symbol?)
|
(symbol? sys:symbol?)
|
||||||
(eq? sys:eq?)))
|
(eq? sys:eq?)
|
||||||
|
(port? sys:port?)
|
||||||
|
(input-port? sys:input-port?)
|
||||||
|
(output-port? sys:output-port?)
|
||||||
|
))
|
||||||
|
|
||||||
(define fixnum?
|
(define fixnum?
|
||||||
(lambda (x) (sys:fixnum? x)))
|
(lambda (x) (sys:fixnum? x)))
|
||||||
|
@ -142,4 +148,12 @@
|
||||||
[(number? x) (and (number? y) (= x y))]
|
[(number? x) (and (number? y) (= x y))]
|
||||||
[else #f]))))
|
[else #f]))))
|
||||||
|
|
||||||
|
(define port?
|
||||||
|
(lambda (x) (sys:port? x)))
|
||||||
|
(define input-port?
|
||||||
|
(lambda (x) (sys:input-port? x)))
|
||||||
|
(define output-port?
|
||||||
|
(lambda (x) (sys:output-port? x)))
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -55,15 +55,7 @@
|
||||||
;;; (set-port-output-index! port fixnum)
|
;;; (set-port-output-index! port fixnum)
|
||||||
;;; (set-port-output-size! port fixnum)
|
;;; (set-port-output-size! port fixnum)
|
||||||
;;;
|
;;;
|
||||||
(primitive-set! 'port?
|
;;;
|
||||||
(lambda (x) (port? x)))
|
|
||||||
;;;
|
|
||||||
(primitive-set! 'input-port?
|
|
||||||
(lambda (x) (input-port? x)))
|
|
||||||
;;;
|
|
||||||
(primitive-set! 'output-port?
|
|
||||||
(lambda (x) (output-port? x)))
|
|
||||||
;;;
|
|
||||||
(primitive-set! '$make-input-port
|
(primitive-set! '$make-input-port
|
||||||
(lambda (handler buffer)
|
(lambda (handler buffer)
|
||||||
($make-port/input handler buffer 0 ($string-length buffer) #f 0 0)))
|
($make-port/input handler buffer 0 ($string-length buffer) #f 0 0)))
|
||||||
|
|
Loading…
Reference in New Issue