From 69df0c4969b0f890edf3402697e60845dae8ebd1 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 2 Apr 2012 12:52:55 -0400 Subject: [PATCH] Display inlining analysis in a more user-friendly fashion. --- collects/typed-racket/optimizer/tool/mzc.rkt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/collects/typed-racket/optimizer/tool/mzc.rkt b/collects/typed-racket/optimizer/tool/mzc.rkt index 2c76511501..58c35efb14 100644 --- a/collects/typed-racket/optimizer/tool/mzc.rkt +++ b/collects/typed-racket/optimizer/tool/mzc.rkt @@ -228,13 +228,10 @@ ;; Integer String #:suffix String -> (U Null (List String)) ;; if n = 0, nothing, if n = 1 singular, o/w plural (define (pluralize n noun #:suffix [suffix "s"]) - (if (> n 0) - (list (format "~a ~a~a" n noun (if (> n 1) suffix ""))) - '())) - (format "(~a)" - (string-join - (append (pluralize n-successes "success" #:suffix "es") - (pluralize n-unrollings "unrolling") - (pluralize n-failures "failure") - (string-append n-out-of-fuels " out of fuel")) ; no plural - ", "))) + (format "~a ~a~a" n noun (if (> n 1) suffix ""))) + (format "(~a out of ~a~a)" + (pluralize n-successes "success" #:suffix "es") + (+ n-successes n-failures n-out-of-fuels) + (if (> n-unrollings 0) + (format " and ~a" (pluralize n-unrollings "unrolling")) + "")))