diff --git a/drracket-test/tests/drracket/gui-debugger/harness.rkt b/drracket-test/tests/drracket/gui-debugger/harness.rkt index ab1c960ae..113e09ab4 100644 --- a/drracket-test/tests/drracket/gui-debugger/harness.rkt +++ b/drracket-test/tests/drracket/gui-debugger/harness.rkt @@ -20,24 +20,22 @@ (eval `(require ',(syntax->datum #'name)))] [_ (void)]))) -(define the-annotator - (lambda (stx) - (define source (syntax-source stx)) - (define-values (annotated break-posns) - (annotate-for-single-stepping - (expand-syntax stx) - ; always trigger breaks - (const (const #t)) - ; don't interpose on returned values - (const #f) - ; if we are not in tail position don't interpose on returned values - (lambda (_ __ . vals) (apply values vals)) - ; record-bound-identifier (do nothing at annotation time) - void - ; record-top-level-identifier (do nothing at runtime) - void - source)) - annotated)) +(define (the-annotator stx) + (define source (syntax-source stx)) + (define-values (annotated break-posns) + (annotate-for-single-stepping (expand-syntax stx) + ; always trigger breaks + (const (const #t)) + ; don't interpose on returned values + (const #f) + ; if we are not in tail position don't interpose on returned values + (lambda (_ __ . vals) (apply values vals)) + ; record-bound-identifier (do nothing at annotation time) + void + ; record-top-level-identifier (do nothing at runtime) + void + source)) + annotated) (define ((break/test id) [marks #f]) (define debug-marks diff --git a/drracket/gui-debugger/debug-tool.rkt b/drracket/gui-debugger/debug-tool.rkt index 00ee3edf2..397e6fe5c 100644 --- a/drracket/gui-debugger/debug-tool.rkt +++ b/drracket/gui-debugger/debug-tool.rkt @@ -77,9 +77,7 @@ (and (syntax? stx) (syntax-source stx))) (define (robust-vector-ref vec idx) - (if (< idx (vector-length vec)) - (vector-ref vec idx) - #f)) + (and (< idx (vector-length vec)) (vector-ref vec idx))) (define (safe-vector-set! vec idx val) (when (< idx (vector-length vec)) @@ -98,11 +96,10 @@ (define (index-of chr str) (let loop ([i 0]) - (if (< i (string-length str)) - (if (char=? chr (string-ref str i)) - i - (loop (add1 i))) - #f))) + (and (< i (string-length str)) + (if (char=? chr (string-ref str i)) + i + (loop (add1 i)))))) (define (safe-min . args) (apply min (filter identity args))) @@ -113,23 +110,17 @@ ;; really-long-identifier => really-lon... ;; (