From fb1c408062e44d78b63e6f50754df80d7ba9c361 Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Sat, 11 Aug 2012 22:02:03 -0700 Subject: [PATCH] Removed deprecated printf/log. original commit: fdd2966cf405c5b8e877f51aeff6606816b8d9c3 --- collects/typed-racket/private/type-annotation.rkt | 15 --------------- collects/typed-racket/typecheck/tc-let-unit.rkt | 1 - collects/typed-racket/utils/utils.rkt | 15 +-------------- 3 files changed, 1 insertion(+), 30 deletions(-) diff --git a/collects/typed-racket/private/type-annotation.rkt b/collects/typed-racket/private/type-annotation.rkt index 182e349d..b703aa7f 100644 --- a/collects/typed-racket/private/type-annotation.rkt +++ b/collects/typed-racket/private/type-annotation.rkt @@ -25,14 +25,6 @@ (define type-ascrip-symbol 'type-ascription) (define type-dotted-symbol 'type-dotted) -(define (print-size stx) - (syntax-case stx () - [(a . b) (begin - (printf/log "Annotation Sexp Pair \n") - (print-size #'a) - (print-size #'b))] - [_ (printf/log "Annotation Sexp \n")])) - ;; get the type annotation of this syntax ;; syntax -> Maybe[Type] ;; is let-binding really necessary? - remember to record the bugs! @@ -92,13 +84,6 @@ #f))] [else #f]))) -(define (log/ann stx ty) - (printf/log "Required Annotated Variable: ~a ~a\n" (syntax-e stx) ty)) -(define (log/extra stx ty ty2) - (printf/log "Extra Annotated Variable: ~a ~a ~a\n" (syntax-e stx) ty ty2)) -(define (log/noann stx ty) - (printf/log "Unannotated Variable: ~a ~a\n" (syntax-e stx) ty)) - ;; get the type annotation of this identifier, otherwise error ;; if #:default is provided, return that instead of error ;; identifier #:default Type -> Type diff --git a/collects/typed-racket/typecheck/tc-let-unit.rkt b/collects/typed-racket/typecheck/tc-let-unit.rkt index 1ce3b795..96426025 100644 --- a/collects/typed-racket/typecheck/tc-let-unit.rkt +++ b/collects/typed-racket/typecheck/tc-let-unit.rkt @@ -141,7 +141,6 @@ [(tc-results: ts) ts])) (loop (cdr names) (cdr exprs) (apply append (cdr names)) (cdr clauses)))] [else - ;(for-each (lambda (vs) (for-each (lambda (v) (printf/log "Letrec Var: ~a\n" (syntax-e v))) vs)) names) (do-check (lambda (stx e t) (tc-expr/check e t)) names ;; compute set of variables that can't be undefined. see below. diff --git a/collects/typed-racket/utils/utils.rkt b/collects/typed-racket/utils/utils.rkt index 70fb0d3b..bbbfde39 100644 --- a/collects/typed-racket/utils/utils.rkt +++ b/collects/typed-racket/utils/utils.rkt @@ -18,7 +18,7 @@ at least theoretically. ;; timing start-timing do-time ;; logging - printf/log show-input? + show-input? ;; provide macros rep utils typecheck infer env private types) @@ -93,19 +93,6 @@ at least theoretically. (define-requirer optimizer optimizer-out) (define-requirer base-env base-env-out) -;; conditionalized logging -;; there's some logging code in the source -;; which was used for gathering statistics about various programs -;; no longer used, probably bitrotted -(define-for-syntax logging? #f) - -(define-syntax (printf/log stx) - (if logging? - (syntax-case stx () - [(_ fmt . args) - #'(log-debug (format fmt . args))]) - #'(void))) - ;; turn contracts on and off - off by default for performance. (provide (for-syntax enable-contracts?) provide/cond-contract