From 3e85de4950d21cba14a250ae68e60b7dd4e27588 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 23 Nov 2025 00:46:08 +0000 Subject: [PATCH 1/9] Fix 1 occurrence of `cond-let-to-cond-define` Internal definitions are recommended instead of `let` expressions, to reduce nesting. --- drracket-test/tests/drracket/private/gui.rkt | 35 ++++++-------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/drracket-test/tests/drracket/private/gui.rkt b/drracket-test/tests/drracket/private/gui.rkt index b4709ac1b..583036354 100644 --- a/drracket-test/tests/drracket/private/gui.rkt +++ b/drracket-test/tests/drracket/private/gui.rkt @@ -17,30 +17,17 @@ (cond [(= i (string-length string1)) (only-whitespace? string2 j)] [(= j (string-length string2)) (only-whitespace? string1 i)] - [else (let ([c1 (string-ref string1 i)] - [c2 (string-ref string2 j)]) - (cond - [in-whitespace? - (cond - [(whitespace? c1) - (loop (+ i 1) - j - #t)] - [(whitespace? c2) - (loop i - (+ j 1) - #t)] - [else (loop i j #f)])] - [(and (whitespace? c1) - (whitespace? c2)) - (loop (+ i 1) - (+ j 1) - #t)] - [(char=? c1 c2) - (loop (+ i 1) - (+ j 1) - #f)] - [else #f]))]))) + [else (define c1 (string-ref string1 i)) + (define c2 (string-ref string2 j)) + (cond + [in-whitespace? + (cond + [(whitespace? c1) (loop (+ i 1) j #t)] + [(whitespace? c2) (loop i (+ j 1) #t)] + [else (loop i j #f)])] + [(and (whitespace? c1) (whitespace? c2)) (loop (+ i 1) (+ j 1) #t)] + [(char=? c1 c2) (loop (+ i 1) (+ j 1) #f)] + [else #f])]))) ;; whitespace? : char -> boolean ;; deteremines if `c' is whitespace From 726ce6c8360b5da4175178f2a18d7db0da3992d3 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 23 Nov 2025 00:46:08 +0000 Subject: [PATCH 2/9] Fix 2 occurrences of `and-let-to-cond` Using `cond` allows converting `let` to internal definitions, reducing nesting --- drracket-core-lib/drracket/private/get-defs.rkt | 13 +++++++------ drracket-test/tests/drracket/private/gui.rkt | 10 +++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/drracket-core-lib/drracket/private/get-defs.rkt b/drracket-core-lib/drracket/private/get-defs.rkt index 6cb476909..eb0877ad9 100644 --- a/drracket-core-lib/drracket/private/get-defs.rkt +++ b/drracket-core-lib/drracket/private/get-defs.rkt @@ -96,12 +96,13 @@ (and smallest-i (string-length (define-popup-info-prefix (list-ref the-define-popup-infos smallest-i)))) - (and smallest-i - (let ([proc (define-popup-info-get-name - (list-ref the-define-popup-infos smallest-i))]) - (if proc - (lambda (text pos) (proc text pos get-defn-name)) - get-defn-name))) + (cond + [smallest-i + (define proc (define-popup-info-get-name (list-ref the-define-popup-infos smallest-i))) + (if proc + (lambda (text pos) (proc text pos get-defn-name)) + get-defn-name)] + [else #f]) final-positions)) (define defs diff --git a/drracket-test/tests/drracket/private/gui.rkt b/drracket-test/tests/drracket/private/gui.rkt index 583036354..74cc3bad8 100644 --- a/drracket-test/tests/drracket/private/gui.rkt +++ b/drracket-test/tests/drracket/private/gui.rkt @@ -100,11 +100,11 @@ window label class)) (let loop ([window window]) (cond - [(and (or (not class) - (is-a? window class)) - (let ([win-label (and (is-a? window window<%>) - (send window get-label))]) - (equal? label win-label))) + [(cond + [(or (not class) (is-a? window class)) + (define win-label (and (is-a? window window<%>) (send window get-label))) + (equal? label win-label)] + [else #f]) (list window)] [(is-a? window area-container<%>) (apply append (map loop (send window get-children)))] [else '()]))) From d9752fb7aa49aa7499e73326119d9dfc96e91e0c Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 23 Nov 2025 00:46:08 +0000 Subject: [PATCH 3/9] Fix 4 occurrences of `let-to-define` Internal definitions are recommended instead of `let` expressions, to reduce nesting. --- .../drracket/private/get-defs.rkt | 24 ++-- .../drracket/private/no-fw-test-util.rkt | 116 +++++++++--------- 2 files changed, 69 insertions(+), 71 deletions(-) diff --git a/drracket-core-lib/drracket/private/get-defs.rkt b/drracket-core-lib/drracket/private/get-defs.rkt index eb0877ad9..ba562ed29 100644 --- a/drracket-core-lib/drracket/private/get-defs.rkt +++ b/drracket-core-lib/drracket/private/get-defs.rkt @@ -159,19 +159,17 @@ ;; get-defn-indent : text number -> number ;; returns the amount to indent a particular definition (define (get-defn-indent text pos) - (let* ([para (send text position-paragraph pos)] - [para-start (send text paragraph-start-position para #t)]) - (let loop ([c-pos para-start] - [offset 0]) - (cond - [(< c-pos pos) - (define char (send text get-character c-pos)) - (cond - [(char=? char #\tab) - (loop (+ c-pos 1) (+ offset (- 8 (modulo offset 8))))] - [else - (loop (+ c-pos 1) (+ offset 1))])] - [else offset])))) + (define para (send text position-paragraph pos)) + (define para-start (send text paragraph-start-position para #t)) + (let loop ([c-pos para-start] + [offset 0]) + (cond + [(< c-pos pos) + (define char (send text get-character c-pos)) + (cond + [(char=? char #\tab) (loop (+ c-pos 1) (+ offset (- 8 (modulo offset 8))))] + [else (loop (+ c-pos 1) (+ offset 1))])] + [else offset]))) ;; whitespace-or-paren? (define (whitespace-or-paren? char) diff --git a/drracket-test/tests/drracket/private/no-fw-test-util.rkt b/drracket-test/tests/drracket/private/no-fw-test-util.rkt index a47a10584..65eaa614d 100644 --- a/drracket-test/tests/drracket/private/no-fw-test-util.rkt +++ b/drracket-test/tests/drracket/private/no-fw-test-util.rkt @@ -57,80 +57,80 @@ (yield (make-semaphore 0))))))) (semaphore-wait s)) -(define (use-hash-for-prefs preferences:low-level-get-preference +(define (use-hash-for-prefs preferences:low-level-get-preference preferences:low-level-put-preferences preferences:restore-defaults preferences:set preferences:default-set? prefs) - ;; change the preferences system so that it doesn't write to + ;; change the preferences system so that it doesn't write to ;; a file; partly to avoid problems of concurrency in drdr ;; but also to make the test suite easier for everyone to run. - (let ([prefs-table (make-hash)]) - (preferences:low-level-put-preferences - (λ (names vals) - (for ([name (in-list names)] - [val (in-list vals)]) - (hash-set! prefs-table name val)))) - (preferences:low-level-get-preference - (λ (name [fail (lambda () #f)]) - (hash-ref prefs-table name fail))) - - ;; set all preferences to their defaults (some pref values may have - ;; been read by this point, but hopefully that won't affect the - ;; startup of drracket) - (preferences:restore-defaults) - - ;; initialize some preferences to simulate these - ;; being saved already in the user's prefs file - ;; call preferences:set too since the prefs file - ;; may have been "read" already at this point - (for ([pref (in-list prefs)]) - (define pref-key (list-ref pref 0)) - (define pref-val (list-ref pref 1)) - (define m (regexp-match #rx"^plt:framework-pref:(.*)$" (symbol->string pref-key))) - (cond - [m - (hash-set! prefs-table pref-key pref-val) - (define fw-pref-key (string->symbol (list-ref m 1))) - (when (preferences:default-set? fw-pref-key) - (preferences:set fw-pref-key pref-val))] - [else - ;; this currently doesn't happen, and it is easy to forget - ;; that prefix, so print a message here to remind - (printf "WARNING: setting a preference that isn't set via the framework: ~s\n" - pref-key)])))) + (define prefs-table (make-hash)) + (preferences:low-level-put-preferences (λ (names vals) + (for ([name (in-list names)] + [val (in-list vals)]) + (hash-set! prefs-table name val)))) + (preferences:low-level-get-preference (λ (name [fail (lambda () #f)]) + (hash-ref prefs-table name fail))) + + ;; set all preferences to their defaults (some pref values may have + ;; been read by this point, but hopefully that won't affect the + ;; startup of drracket) + (preferences:restore-defaults) + + ;; initialize some preferences to simulate these + ;; being saved already in the user's prefs file + ;; call preferences:set too since the prefs file + ;; may have been "read" already at this point + (for ([pref (in-list prefs)]) + (define pref-key (list-ref pref 0)) + (define pref-val (list-ref pref 1)) + (define m (regexp-match #rx"^plt:framework-pref:(.*)$" (symbol->string pref-key))) + (cond + [m + (hash-set! prefs-table pref-key pref-val) + (define fw-pref-key (string->symbol (list-ref m 1))) + (when (preferences:default-set? fw-pref-key) + (preferences:set fw-pref-key pref-val))] + [else + ;; this currently doesn't happen, and it is easy to forget + ;; that prefix, so print a message here to remind + (printf "WARNING: setting a preference that isn't set via the framework: ~s\n" pref-key)]))) (define (queue-callback/res thunk) (not-on-eventspace-handler-thread 'queue-callback/res #:more (λ () (format "\n thunk: ~e" thunk))) - (let ([c (make-channel)]) - (queue-callback (λ () (channel-put c (with-handlers ((exn:fail? values)) - (call-with-values thunk list)))) - #f) - (define res (channel-get c)) - (when (exn? res) (raise res)) - (apply values res))) + (define c (make-channel)) + (queue-callback (λ () + (channel-put c + (with-handlers ([exn:fail? values]) + (call-with-values thunk list)))) + #f) + (define res (channel-get c)) + (when (exn? res) + (raise res)) + (apply values res)) ;; poll-until : (-> alpha) number (-> alpha) -> alpha ;; waits until pred return a true value and returns that. ;; if that doesn't happen by `secs', calls fail and returns that. -(define (poll-until pred - [secs 10] - [fail (lambda () - (error 'poll-until - "timeout after ~e secs, ~e never returned a true value" - secs pred))]) - (let ([step 1/20]) - (let loop ([counter secs]) - (if (<= counter 0) - (fail) - (let ([result (pred)]) - (or result - (begin - (sleep step) - (loop (- counter step))))))))) +(define (poll-until + pred + [secs 10] + [fail + (lambda () + (error 'poll-until "timeout after ~e secs, ~e never returned a true value" secs pred))]) + (define step 1/20) + (let loop ([counter secs]) + (if (<= counter 0) + (fail) + (let ([result (pred)]) + (or result + (begin + (sleep step) + (loop (- counter step)))))))) (define (wait-for-events-in-frame-eventspace fr) (define sema (make-semaphore 0)) From 5fa79dd0b53f555674497dcdf44056692fbe3a2c Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 23 Nov 2025 00:46:08 +0000 Subject: [PATCH 4/9] Fix 3 occurrences of `list-element-definitions-to-match-define` These list element variable definitions can be expressed more succinctly with `match-define`. Note that the suggested replacement raises an error if the list contains more elements than expected. --- .../drracket/private/insulated-read-language.rkt | 3 +-- drracket-core-lib/drracket/private/tooltip.rkt | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drracket-core-lib/drracket/private/insulated-read-language.rkt b/drracket-core-lib/drracket/private/insulated-read-language.rkt index 935bce4a7..aa13b3f1a 100644 --- a/drracket-core-lib/drracket/private/insulated-read-language.rkt +++ b/drracket-core-lib/drracket/private/insulated-read-language.rkt @@ -266,8 +266,7 @@ Will not work with the definitions text surrogate interposition that (λ () (val text start-position limit-position direction)))))] [(drracket:keystrokes) (for/list ([pr (in-list val)]) - (define key (list-ref pr 0)) - (define proc (list-ref pr 1)) + (match-define (list key proc) pr) (list key (procedure-rename (λ (txt evt) (call-in-irl-context/abort diff --git a/drracket-core-lib/drracket/private/tooltip.rkt b/drracket-core-lib/drracket/private/tooltip.rkt index ab867d45c..b2440f28c 100644 --- a/drracket-core-lib/drracket/private/tooltip.rkt +++ b/drracket-core-lib/drracket/private/tooltip.rkt @@ -73,8 +73,7 @@ (define-values (w h) (for/fold ([w #;#;: Nonnegative-Real 0] [h #;#;: Nonnegative-Real 0]) ([space+label (in-list labels)]) - (define space (list-ref space+label 0)) - (define label (list-ref space+label 1)) + (match-define (list space label) space+label) (define-values (space-w _1 _2 _3) (send dc get-text-extent space)) (define-values (this-w this-h _4 _5) (send dc get-text-extent label)) (values (max (+ space-w this-w) w) @@ -103,8 +102,7 @@ (send dc draw-rectangle 0 0 w h) (for ([space+label (in-list labels)] [i (in-naturals)]) - (define space (list-ref space+label 0)) - (define label (list-ref space+label 1)) + (match-define (list space label) space+label) (define-values (space-w _1 _2 _3) (send dc get-text-extent space #f 'grapheme)) (send dc draw-text label (+ 2 space-w) (+ 2 (* i th)) 'grapheme))) (super-new [stretchable-width #f] [stretchable-height #f]))) From d42c0e5b588845e65b91eed45879b89b72de77e7 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 23 Nov 2025 00:46:08 +0000 Subject: [PATCH 5/9] Fix 1 occurrence of `delete-redundant-let` This `let` binding does nothing and can be removed. --- drracket-core-lib/drracket/private/tooltip.rkt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drracket-core-lib/drracket/private/tooltip.rkt b/drracket-core-lib/drracket/private/tooltip.rkt index b2440f28c..aa33b50a0 100644 --- a/drracket-core-lib/drracket/private/tooltip.rkt +++ b/drracket-core-lib/drracket/private/tooltip.rkt @@ -114,14 +114,13 @@ (init-field [frame-to-track #;#;: (Option (Instance Window<%>)) #f]) (: timer (Option (Instance Timer%))) (define timer - (let ([frame-to-track frame-to-track]) - (and frame-to-track - (new timer% - [notify-callback - (λ () - (unless (send frame-to-track is-shown?) - (show #f) - (send (assert timer) stop)))])))) + (and frame-to-track + (new timer% + [notify-callback + (λ () + (unless (send frame-to-track is-shown?) + (show #f) + (send (assert timer) stop)))]))) (define/override (on-subwindow-event r evt) From eaf8ea7d7989548ff10009d7934900f4ab7c20a4 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 23 Nov 2025 00:46:08 +0000 Subject: [PATCH 6/9] Fix 6 occurrences of `provide/contract-to-contract-out` The `provide/contract` form is a legacy form made obsolete by `contract-out`. --- .../drracket/private/colored-errors.rkt | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drracket-core-lib/drracket/private/colored-errors.rkt b/drracket-core-lib/drracket/private/colored-errors.rkt index 7f7778d2e..23c64ec6a 100644 --- a/drracket-core-lib/drracket/private/colored-errors.rkt +++ b/drracket-core-lib/drracket/private/colored-errors.rkt @@ -47,15 +47,16 @@ ;; of additional source locations. These additional location will also be highlighted in the code, ;; even though they do not correspond to any section of the text of the error message. (struct colored-error-message (fragments additional-highlights) #:transparent) -(provide/contract [struct colored-error-message - ([fragments (listof msg-fragment?)] - [additional-highlights additional-highlights/c])] - [struct msg-fragment:str ([str string?])] - [struct msg-fragment:v ([v any/c])] - [struct colored-msg-fragment ([locs srcloc-syntax/c] - [frags (listof (or/c msg-fragment:str? msg-fragment:v?))] - [important boolean?] - [color color/c])]) +(provide (contract-out (struct colored-error-message + ([fragments (listof msg-fragment?)] [additional-highlights + additional-highlights/c])) + (struct msg-fragment:str ([str string?])) + (struct msg-fragment:v ([v any/c])) + (struct colored-msg-fragment + ([locs srcloc-syntax/c] + [frags (listof (or/c msg-fragment:str? msg-fragment:v?))] + [important boolean?] + [color color/c])))) ;; prop:exn:colored-message : The property of exceptions that contain colored-message information. ;; The property's value is a function that when given an exception, returns the colored-error-message. @@ -72,7 +73,7 @@ ;; get-error-message/color : When given an exception, if that exception contains coloring information, ;; returns it, otherwise, returns a colored-error-message that capture the information provided by ;; by field message and the srclocs property (if any) of the exception. -(provide/contract [get-error-message/color (exn? . -> . colored-error-message?)]) +(provide (contract-out [get-error-message/color (exn? . -> . colored-error-message?)])) (define (get-error-message/color exn) (cond [(exn:colored-message? exn) ((exn:colored-message-accessor exn) exn)] [(exn:srclocs? exn) @@ -81,11 +82,13 @@ [else (colored-error-message (list (msg-fragment:str (exn-message exn))) empty)])) -(provide/contract [get-error-colored-srclocs (exn? . -> . (listof (list/c srcloc-syntax/c color/c)))]) +(provide (contract-out [get-error-colored-srclocs + (exn? . -> . (listof (list/c srcloc-syntax/c color/c)))])) (define (get-error-colored-srclocs exn) (get-message-colored-srclocs (get-error-message/color exn))) -(provide/contract [get-message-colored-srclocs (colored-error-message? . -> . (listof (list/c srcloc-syntax/c color/c)))]) +(provide (contract-out [get-message-colored-srclocs + (colored-error-message? . -> . (listof (list/c srcloc-syntax/c color/c)))])) (define (get-message-colored-srclocs msg) (define (promote srcloc) (if (list? srcloc) srcloc (list srcloc #f))) (map promote @@ -190,7 +193,7 @@ (define colored-format/c (([fmt string?]) (#:additional-highlights [additional-highlights additional-highlights/c]) #:rest [_ any/c] . ->i . [_ colored-error-message?])) -(provide/contract [colored-format colored-format/c]) +(provide (contract-out [colored-format colored-format/c])) ;; colored-format : Takes a format string and a number of arguments, and produces a string where each ;; format marker has been replaced by their corresponding argument. This function support @@ -279,7 +282,7 @@ ;; The message and srcloc fields of the exception are populated from the information ;; in the fmt. additional-highlights specifies srclocs that should be highlighted, in addition ;; to the highlights used to explicate the correspondance between the text and the piece of codes. -(provide/contract [raise-colored-syntax-error colored-format/c]) +(provide (contract-out [raise-colored-syntax-error colored-format/c])) (define (raise-colored-syntax-error fmt #:additional-highlights [additional-highlights empty] . args) (define formatted (apply colored-format fmt #:additional-highlights additional-highlights args)) (raise (exn:fail:colored:syntax (uncolor-message formatted) From f3dc68d2fa8f75e0d945d721095c574042e45789 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 23 Nov 2025 00:46:08 +0000 Subject: [PATCH 7/9] Fix 1 occurrence of `if-let-to-cond` `cond` with internal definitions is preferred over `if` with `let`, to reduce nesting --- .../drracket/private/colored-errors.rkt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drracket-core-lib/drracket/private/colored-errors.rkt b/drracket-core-lib/drracket/private/colored-errors.rkt index 23c64ec6a..01ef1642e 100644 --- a/drracket-core-lib/drracket/private/colored-errors.rkt +++ b/drracket-core-lib/drracket/private/colored-errors.rkt @@ -168,12 +168,12 @@ (check-arg "~|" args 1) (define-values (sub rest-args) (let loop ([fragments fragments] [args (rest args)]) - (if (empty? fragments) - (values empty args) - (let () - (define-values (f rest-args) (colored-format:str-or-v (first fragments) args)) - (define-values (rest-fs rest-rest-args) (loop (rest fragments) rest-args)) - (values (cons f rest-fs) rest-rest-args))))) + (cond + [(empty? fragments) (values empty args)] + [else + (define-values (f rest-args) (colored-format:str-or-v (first fragments) args)) + (define-values (rest-fs rest-rest-args) (loop (rest fragments) rest-args)) + (values (cons f rest-fs) rest-rest-args)]))) (define the-arg (first args)) (match the-arg [(list loc imp col other ..1) From b601a48b1018c4c9ff852de9071720362fae5419 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 23 Nov 2025 00:46:08 +0000 Subject: [PATCH 8/9] Fix 1 occurrence of `cond-void-to-when-or-unless` This conditional expression can be replaced with a simpler, equivalent expression. --- .../drracket/private/insulated-read-language.rkt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drracket-core-lib/drracket/private/insulated-read-language.rkt b/drracket-core-lib/drracket/private/insulated-read-language.rkt index aa13b3f1a..3a4292aa6 100644 --- a/drracket-core-lib/drracket/private/insulated-read-language.rkt +++ b/drracket-core-lib/drracket/private/insulated-read-language.rkt @@ -439,9 +439,8 @@ Will not work with the definitions text surrogate interposition that [(and (equal? p1 #\|) (equal? (peek-char-or-special port 1) #\#)) (get-it "|#") - (cond - [(= depth 0) (void)] - [else (loop (- depth 1))])] + (unless (= depth 0) + (loop (- depth 1)))] [(and (equal? p1 #\#) (equal? (peek-char-or-special port 1) #\|)) (get-it "#|") From 1bd0a80e92a6841dc0a1a89d27c27781190b1975 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 23 Nov 2025 00:46:08 +0000 Subject: [PATCH 9/9] Fix 1 occurrence of `quasiquote-to-list` This quasiquotation is equialent to a simple `list` call. --- .../drracket/find-module-path-completions.rkt | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drracket-tool-text-lib/drracket/find-module-path-completions.rkt b/drracket-tool-text-lib/drracket/find-module-path-completions.rkt index c715ac956..2c4741a0d 100644 --- a/drracket-tool-text-lib/drracket/find-module-path-completions.rkt +++ b/drracket-tool-text-lib/drracket/find-module-path-completions.rkt @@ -183,20 +183,20 @@ (and (regexp? (list-ref link-ent 2)) (regexp-match (list-ref link-ent 2) (version))) #t)) - `(,(list-ref link-ent 0) - ,(simplify-path - (let* ([encoded-path (list-ref link-ent 1)] - [path (cond - [(string? encoded-path) encoded-path] - [(bytes? encoded-path) (bytes->path encoded-path)] - [else (apply build-path - (for/list ([elem (in-list encoded-path)]) - (if (bytes? elem) - (bytes->path-element elem) - elem)))])]) - (if (relative-path? path) - (build-path base path) - path)))))] + (list (list-ref link-ent 0) + (simplify-path (let* ([encoded-path (list-ref link-ent 1)] + [path (cond + [(string? encoded-path) encoded-path] + [(bytes? encoded-path) (bytes->path encoded-path)] + [else + (apply build-path + (for/list ([elem (in-list encoded-path)]) + (if (bytes? elem) + (bytes->path-element elem) + elem)))])]) + (if (relative-path? path) + (build-path base path) + path)))))] [else '()])] [else (for/list ([clp (in-list library-collection-paths)])