change collection-file-path to check for compiled by default for ".rkt"

This commit is contained in:
Matthew Flatt 2014-06-02 20:12:00 +01:00
parent 8638a55b67
commit fc74fa36ef
2 changed files with 7 additions and 3 deletions

View File

@ -249,11 +249,13 @@ initialized @racket[current-library-collection-links], as follows:
@defproc*[([(collection-file-path [file path-string?] [collection path-string?] ...+
[#:check-compiled? check-compiled? any/c #f])
[#:check-compiled? check-compiled? any/c
(regexp-match? #rx"[.]rkt$" file)])
path?]
[(collection-file-path [file path-string?] [collection path-string?] ...+
[#:fail fail-proc (string? . -> . any)]
[#:check-compiled? check-compiled? any/c #f])
[#:check-compiled? check-compiled? any/c
(regexp-match? #rx"[.]rkt$" file)])
any])]{
Returns the path to the file indicated by @racket[file] in the

View File

@ -112,7 +112,9 @@
(define-values (new:collection-file-path)
(let ([collection-file-path (new-lambda (file-name
collection
#:check-compiled? [check-compiled? #f]
#:check-compiled? [check-compiled?
(and (path-string? file-name)
(regexp-match? #rx"[.]rkt$" file-name))]
#:fail [fail (lambda (s)
(raise
(exn:fail:filesystem