From 8655530b194de098fc5bfb0dcecc78abcd4aebb3 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Tue, 29 Dec 2020 19:52:26 -0600 Subject: [PATCH] Rename predicates in module/paths --- src/boot/boot.janet | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/boot/boot.janet b/src/boot/boot.janet index d7962168..d8a564ec 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -2618,9 +2618,9 @@ [image] (unmarshal image load-image-dict)) -(defn- check-. [x] (if (string/has-prefix? "." x) x)) -(defn- not-check-. [x] (unless (or (string/has-prefix? "/" x) (string/has-prefix? "." x)) x)) -(defn- check-/ [x] (if (string/has-prefix? "/" x) x)) +(defn- check-relative [x] (if (string/has-prefix? "." x) x)) +(defn- check-is-dep [x] (unless (or (string/has-prefix? "/" x) (string/has-prefix? "." x)) x)) +(defn- check-project-relative [x] (if (string/has-prefix? "/" x) x)) (def module/paths ``` @@ -2657,11 +2657,11 @@ [pre] (or (find-index |(and (string? ($ 0)) (string/has-prefix? pre ($ 0))) module/paths) 0)) (def all-index (find-prefix ".:all:")) - (array/insert module/paths all-index [(string ".:all:" ext) loader check-/]) + (array/insert module/paths all-index [(string ".:all:" ext) loader check-project-relative]) (def sys-index (find-prefix ":sys:")) - (array/insert module/paths sys-index [(string ":sys:/:all:" ext) loader not-check-.]) + (array/insert module/paths sys-index [(string ":sys:/:all:" ext) loader check-is-dep]) (def curall-index (find-prefix ":cur:/:all:")) - (array/insert module/paths curall-index [(string ":cur:/:all:" ext) loader check-.]) + (array/insert module/paths curall-index [(string ":cur:/:all:" ext) loader check-relative]) module/paths) (module/add-paths ":native:" :native) @@ -2720,9 +2720,9 @@ (undef fexists) (undef mod-filter) -(undef check-.) -(undef not-check-.) -(undef check-/) +(undef check-relative) +(undef check-project-relative) +(undef check-is-dep) (def module/loading `Table mapping currently loading modules to true. Used to prevent