modern.paths: remove a ton of words
parent
b535707035
commit
2de1c21781
|
@ -5,32 +5,7 @@ splitting vocabs.files vocabs.hierarchy vocabs.loader
|
||||||
vocabs.metadata sets ;
|
vocabs.metadata sets ;
|
||||||
IN: modern.paths
|
IN: modern.paths
|
||||||
|
|
||||||
: modern-if-available ( path -- path' )
|
|
||||||
dup ".factor" ?tail [
|
|
||||||
".modern" append
|
|
||||||
dup exists? [ nip ] [ drop ] if
|
|
||||||
] [
|
|
||||||
drop
|
|
||||||
] if ;
|
|
||||||
|
|
||||||
ERROR: not-a-source-path path ;
|
ERROR: not-a-source-path path ;
|
||||||
: force-modern-path ( path -- path' )
|
|
||||||
".factor" ?tail [ ".modern" append ] [ not-a-source-path ] if ;
|
|
||||||
: modern-docs-path ( path -- path' )
|
|
||||||
vocab-docs-path modern-if-available ;
|
|
||||||
: modern-tests-path ( path -- path' )
|
|
||||||
vocab-tests-path modern-if-available ;
|
|
||||||
: modern-source-path ( path -- path' )
|
|
||||||
vocab-source-path modern-if-available ;
|
|
||||||
: modern-syntax-path ( path -- path' )
|
|
||||||
vocab-source-path ".factor" ?tail drop "-syntax.modern" append ;
|
|
||||||
|
|
||||||
: force-modern-docs-path ( path -- path' )
|
|
||||||
vocab-docs-path force-modern-path ;
|
|
||||||
: force-modern-tests-path ( path -- path' )
|
|
||||||
vocab-tests-path force-modern-path ;
|
|
||||||
: force-modern-source-path ( path -- path' )
|
|
||||||
vocab-source-path force-modern-path ;
|
|
||||||
|
|
||||||
: vocabs-from ( root -- vocabs )
|
: vocabs-from ( root -- vocabs )
|
||||||
"" disk-vocabs-in-root/prefix
|
"" disk-vocabs-in-root/prefix
|
||||||
|
@ -96,12 +71,11 @@ ERROR: not-a-source-path path ;
|
||||||
[ ".modern" tail? ] reject ;
|
[ ".modern" tail? ] reject ;
|
||||||
|
|
||||||
: modern-source-paths ( names -- paths )
|
: modern-source-paths ( names -- paths )
|
||||||
[ modern-source-path ] map filter-exists reject-some-paths ;
|
[ vocab-source-path ] map filter-exists reject-some-paths ;
|
||||||
: modern-docs-paths ( names -- paths )
|
: modern-docs-paths ( names -- paths )
|
||||||
[ modern-docs-path ] map filter-exists reject-some-paths ;
|
[ vocab-docs-path ] map filter-exists reject-some-paths ;
|
||||||
: modern-tests-paths ( names -- paths )
|
: modern-tests-paths ( names -- paths )
|
||||||
[ vocab-tests ] map concat
|
[ vocab-tests ] map concat filter-exists reject-some-paths ;
|
||||||
[ modern-if-available ] map filter-exists reject-some-paths ;
|
|
||||||
|
|
||||||
: all-source-paths ( -- seq )
|
: all-source-paths ( -- seq )
|
||||||
all-vocabs modern-source-paths ;
|
all-vocabs modern-source-paths ;
|
||||||
|
@ -111,33 +85,18 @@ ERROR: not-a-source-path path ;
|
||||||
: extra-docs-paths ( -- seq ) extra-vocabs modern-docs-paths ;
|
: extra-docs-paths ( -- seq ) extra-vocabs modern-docs-paths ;
|
||||||
|
|
||||||
: core-test-paths ( -- seq ) core-vocabs modern-tests-paths ;
|
: core-test-paths ( -- seq ) core-vocabs modern-tests-paths ;
|
||||||
: basis-test-paths ( -- seq )
|
: basis-test-paths ( -- seq ) basis-vocabs modern-tests-paths ;
|
||||||
basis-vocabs
|
|
||||||
modern-tests-paths ;
|
|
||||||
: extra-test-paths ( -- seq ) extra-vocabs modern-tests-paths ;
|
: extra-test-paths ( -- seq ) extra-vocabs modern-tests-paths ;
|
||||||
|
|
||||||
|
|
||||||
: all-docs-paths ( -- seq )
|
: all-docs-paths ( -- seq ) all-vocabs modern-docs-paths ;
|
||||||
all-vocabs modern-docs-paths ;
|
: all-tests-paths ( -- seq ) all-vocabs modern-tests-paths ;
|
||||||
|
|
||||||
: all-tests-paths ( -- seq )
|
: all-paths ( -- seq )
|
||||||
all-vocabs modern-tests-paths ;
|
|
||||||
|
|
||||||
: all-syntax-paths ( -- seq )
|
|
||||||
all-vocabs [ modern-syntax-path ] map filter-exists reject-some-paths ;
|
|
||||||
|
|
||||||
: all-factor-paths ( -- seq )
|
|
||||||
[
|
[
|
||||||
all-syntax-paths all-source-paths all-docs-paths all-tests-paths
|
all-source-paths all-docs-paths all-tests-paths
|
||||||
] { } append-outputs-as ;
|
] { } append-outputs-as ;
|
||||||
|
|
||||||
: vocab-names>syntax ( strings -- seq )
|
|
||||||
[ modern-syntax-path ] map [ exists? ] filter ;
|
|
||||||
|
|
||||||
: core-syntax-paths ( -- seq ) core-vocabs vocab-names>syntax reject-some-paths ;
|
|
||||||
: basis-syntax-paths ( -- seq ) basis-vocabs vocab-names>syntax reject-some-paths ;
|
|
||||||
: extra-syntax-paths ( -- seq ) extra-vocabs vocab-names>syntax reject-some-paths ;
|
|
||||||
|
|
||||||
: core-source-paths ( -- seq )
|
: core-source-paths ( -- seq )
|
||||||
core-vocabs modern-source-paths reject-some-paths ;
|
core-vocabs modern-source-paths reject-some-paths ;
|
||||||
: basis-source-paths ( -- seq )
|
: basis-source-paths ( -- seq )
|
||||||
|
|
Loading…
Reference in New Issue