diff --git a/pollen/private/project.rkt b/pollen/private/project.rkt index 7a282d5..adf78fc 100644 --- a/pollen/private/project.rkt +++ b/pollen/private/project.rkt @@ -1,19 +1,20 @@ #lang racket/base (require racket/syntax + racket/match sugar/define sugar/coerce "../setup.rkt" "file-utils.rkt") (define+provide/contract (get-directory-require-files source-arg) - (pathish? . -> . (or/c #f (λ (xs) (and (list? xs) (andmap complete-path? xs))))) - (define source-path (->path source-arg)) - (define require-filenames (list default-directory-require)) - (define possible-requires (for*/list ([rf (in-list require-filenames)] - [p (in-value (find-upward-from source-path rf))] - #:when p) - p)) - (and (pair? possible-requires) possible-requires)) + (pathish? . -> . (or/c #false (λ (xs) (and (list? xs) (andmap complete-path? xs))))) + ;; only one file, but we'll leave it in plural form + (match (for*/list ([rf (in-list (list default-directory-require))] + [path (in-value (find-upward-from (->path source-arg) rf))] + #:when path) + path) + [(? pair? possible-requires) possible-requires] + [_ #false])) (define+provide/contract (require+provide-directory-require-files here-arg #:provide [provide? #t]) diff --git a/pollen/private/ts.rktd b/pollen/private/ts.rktd index 097394a..6f9dcf5 100644 --- a/pollen/private/ts.rktd +++ b/pollen/private/ts.rktd @@ -1 +1 @@ -1540858388 +1540858391