diff --git a/collects/typed-scheme/infer/infer-unit.ss b/collects/typed-scheme/infer/infer-unit.ss index 3b240d23..7981b69d 100644 --- a/collects/typed-scheme/infer/infer-unit.ss +++ b/collects/typed-scheme/infer/infer-unit.ss @@ -452,7 +452,6 @@ (define (infer X S T R must-vars [expected #f]) (with-handlers ([exn:infer? (lambda _ #f)]) (let ([cs (cgen/list null X S T)]) - (printf "finished step 1~n") (if (not expected) (subst-gen cs 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: (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)) - (printf "infer/vararg: ~a~n" (list X S T)) - (printf "new-T: ~a~n" new-T) (and ((length S) . >= . (length T)) - (printf "finished step 0~n") (infer X S new-T R must-vars expected))) ;; like infer, but dotted-var is the bound on the ... @@ -490,4 +486,4 @@ (define (i s t r) (infer/simple (list s) (list t) r)) -(trace cgen subst-gen) +;(trace cgen subst-gen) diff --git a/collects/typed-scheme/test2.ss b/collects/typed-scheme/test2.ss index e5b55e11..f590a5d7 100644 --- a/collects/typed-scheme/test2.ss +++ b/collects/typed-scheme/test2.ss @@ -1,5 +1,5 @@ #lang typed-scheme -#| + (: f (Number String -> Number)) (define (f x z) #;(f x z) 7) (lambda: ([x : Any] [y : Any]) (values (number? y) (number? x))) @@ -19,16 +19,16 @@ (+) (+ 1 2 3) (+ 1 2 3.5) -|# + (define-struct: (Z) X ([y : Z])) (define: my-x : (X Number) (make-X 1)) (X-y my-x) -#| ; FIXME - doesn't work yet +; FIXME - doesn't work yet (number? (X-y my-x)) (if (number? (X-y my-x)) (+ 1 (X-y my-x)) 7) -|# -#| + + (define: (f2) : (U) (error 'foo)) (lambda: ([x : Number]) #{((f2)) :: (U)}) @@ -49,4 +49,4 @@ ;(map + (list 1 2 3) (list 1 2 "foo")) ((lambda (a b . c) (+ a b (car c))) 1 2 3 4) -|# + diff --git a/collects/typed-scheme/typecheck/tc-structs.ss b/collects/typed-scheme/typecheck/tc-structs.ss index 4f1b3c00..47bcd92a 100644 --- a/collects/typed-scheme/typecheck/tc-structs.ss +++ b/collects/typed-scheme/typecheck/tc-structs.ss @@ -126,7 +126,7 @@ (define bindings (append (list (cons (or maker* maker) - (debug (wrapper (->* external-fld-types (if cret cret name))))) + (wrapper (->* external-fld-types (if cret cret name)))) (cons pred (make-pred-ty (pred-wrapper name)))) (for/list ([g (in-list getters)] [t (in-list external-fld-types/no-parent)] [i (in-naturals)])