scheme types need not store their indices
This commit is contained in:
8
prim.ss
8
prim.ss
@@ -1,7 +1,7 @@
|
||||
; (define $IORes (lambda (nm-1 nm-2) (vector 0 #f nm-1 nm-2)))
|
||||
(define $IORes (lambda (nm-1 nm-2) (cons nm-1 nm-2)))
|
||||
(define ($Left x) (vector 0 #f #f x))
|
||||
(define ($Right x) (vector 1 #f #f x))
|
||||
(define ($Left x) (vector 0 x))
|
||||
(define ($Right x) (vector 1 x))
|
||||
(define $LT 0)
|
||||
(define $EQ 1)
|
||||
(define $GT 2)
|
||||
@@ -65,7 +65,9 @@
|
||||
;; Actually should return unit..
|
||||
(define (Data.IORef.primWriteIORef _ ref a) (lambda (w) ($IORes (set-box! ref a) w)))
|
||||
(define (Node.readLine w)
|
||||
($IORes ($Right (get-line (current-input-port))) w))
|
||||
(case (get-line (current-input-port))
|
||||
(#!eof ($IORes ($Left "EOF") w))
|
||||
(else ($IORes ($Right (get-line (current-input-port))) w))))
|
||||
(define (Prelude.subInt a b) (- a b))
|
||||
(define (Prelude.jsEq _ a b) (= a b))
|
||||
(define (Prelude.divInt a b) (fx/ a b))
|
||||
|
||||
Reference in New Issue
Block a user