Remove debugging printfs.

Comment tests back in.

svn: r14748
This commit is contained in:
Sam Tobin-Hochstadt 2009-05-08 19:10:12 +00:00
parent dbe5556b45
commit 3575ba8d5f
3 changed files with 8 additions and 12 deletions

View File

@ -452,7 +452,6 @@
(define (infer X S T R must-vars [expected #f]) (define (infer X S T R must-vars [expected #f])
(with-handlers ([exn:infer? (lambda _ #f)]) (with-handlers ([exn:infer? (lambda _ #f)])
(let ([cs (cgen/list null X S T)]) (let ([cs (cgen/list null X S T)])
(printf "finished step 1~n")
(if (not expected) (if (not expected)
(subst-gen cs R must-vars) (subst-gen cs R must-vars)
(subst-gen (cset-meet cs (cgen null X R expected)) R must-vars))))) (subst-gen (cset-meet cs (cgen null X R expected)) R must-vars)))))
@ -460,10 +459,7 @@
;; like infer, but T-var is the vararg type: ;; like infer, but T-var is the vararg type:
(define (infer/vararg X S T T-var R must-vars [expected #f]) (define (infer/vararg X S T T-var R must-vars [expected #f])
(define new-T (if T-var (extend S T T-var) T)) (define new-T (if T-var (extend S T T-var) T))
(printf "infer/vararg: ~a~n" (list X S T))
(printf "new-T: ~a~n" new-T)
(and ((length S) . >= . (length T)) (and ((length S) . >= . (length T))
(printf "finished step 0~n")
(infer X S new-T R must-vars expected))) (infer X S new-T R must-vars expected)))
;; like infer, but dotted-var is the bound on the ... ;; like infer, but dotted-var is the bound on the ...
@ -490,4 +486,4 @@
(define (i s t r) (define (i s t r)
(infer/simple (list s) (list t) r)) (infer/simple (list s) (list t) r))
(trace cgen subst-gen) ;(trace cgen subst-gen)

View File

@ -1,5 +1,5 @@
#lang typed-scheme #lang typed-scheme
#|
(: f (Number String -> Number)) (: f (Number String -> Number))
(define (f x z) #;(f x z) 7) (define (f x z) #;(f x z) 7)
(lambda: ([x : Any] [y : Any]) (values (number? y) (number? x))) (lambda: ([x : Any] [y : Any]) (values (number? y) (number? x)))
@ -19,16 +19,16 @@
(+) (+)
(+ 1 2 3) (+ 1 2 3)
(+ 1 2 3.5) (+ 1 2 3.5)
|#
(define-struct: (Z) X ([y : Z])) (define-struct: (Z) X ([y : Z]))
(define: my-x : (X Number) (make-X 1)) (define: my-x : (X Number) (make-X 1))
(X-y my-x) (X-y my-x)
#| ; FIXME - doesn't work yet ; FIXME - doesn't work yet
(number? (X-y my-x)) (number? (X-y my-x))
(if (number? (X-y my-x)) (+ 1 (X-y my-x)) 7) (if (number? (X-y my-x)) (+ 1 (X-y my-x)) 7)
|#
#|
(define: (f2) : (U) (error 'foo)) (define: (f2) : (U) (error 'foo))
(lambda: ([x : Number]) #{((f2)) :: (U)}) (lambda: ([x : Number]) #{((f2)) :: (U)})
@ -49,4 +49,4 @@
;(map + (list 1 2 3) (list 1 2 "foo")) ;(map + (list 1 2 3) (list 1 2 "foo"))
((lambda (a b . c) (+ a b (car c))) 1 2 3 4) ((lambda (a b . c) (+ a b (car c))) 1 2 3 4)
|#

View File

@ -126,7 +126,7 @@
(define bindings (define bindings
(append (append
(list (cons (or maker* maker) (list (cons (or maker* maker)
(debug (wrapper (->* external-fld-types (if cret cret name))))) (wrapper (->* external-fld-types (if cret cret name))))
(cons pred (cons pred
(make-pred-ty (pred-wrapper name)))) (make-pred-ty (pred-wrapper name))))
(for/list ([g (in-list getters)] [t (in-list external-fld-types/no-parent)] [i (in-naturals)]) (for/list ([g (in-list getters)] [t (in-list external-fld-types/no-parent)] [i (in-naturals)])