diff --git a/collects/setup/private/omitted-paths.ss b/collects/setup/private/omitted-paths.ss index 2ff28474a2..6862fff231 100644 --- a/collects/setup/private/omitted-paths.ss +++ b/collects/setup/private/omitted-paths.ss @@ -42,9 +42,10 @@ (let ([x (read)]) (if (eof-object? x) (reverse r) - (let* ([x (and (list? x) (= 7 (length x)) (list-ref x 4))] - [x (and (bytes? x) (simplify-path (bytes->path x)))]) - (loop (if x (cons x r) r))))))))))))) + (let ([x (and (list? x) (= 7 (length x)) (list-ref x 4))]) + (loop (if (bytes? x) + (cons (simplify-path (bytes->path x)) r) + r))))))))))))) ;; if `x' has `y' as a prefix, return the tail, ;; eg (relative-from '(1 2 3 4) '(1 2)) => '(3 4) @@ -55,7 +56,7 @@ [else #f])) (define-syntax-rule (with-memo t x expr) - (hash-ref t x (lambda () (let ([r expr]) (hash-set! t x r) r)))) + (hash-ref! t x (lambda () expr))) (define ((implicit-omit? omit-doc?) path) (let ([str (path-element->string path)]) @@ -109,7 +110,7 @@ [r (ormap (lambda (root+table) (let ([r (relative-from dir* (car root+table))]) (and r (cons (reverse r) root+table)))) - roots)] + roots)] [r (and r (apply accumulate-omitted r))]) (unless r (error 'omitted-paths