vocabs.hierarchy: change sorting to sort visible-dirs.

master
John Benediktsson 2020-02-09 10:00:18 -08:00
parent 1a1ee4b4a8
commit 4e91f55f1e
1 changed files with 3 additions and 4 deletions

View File

@ -18,7 +18,7 @@ M: vocab-prefix vocab-name name>> ;
{ [ directory? ] [ name>> "." head? not ] } 1&& ;
: visible-dirs ( seq -- seq' )
[ visible-dir? ] filter ;
[ visible-dir? ] filter [ name>> ] sort-with ;
ERROR: vocab-root-required root ;
@ -33,7 +33,7 @@ ERROR: vocab-root-required root ;
over dup exists? [ directory-entries ] [ drop { } ] if ;
: (disk-vocabs) ( root prefix -- seq )
vocab-directory-entries visible-dirs [ name>> ] sort-with [
vocab-directory-entries visible-dirs [
name>>
[ dup ".factor" append append-path append-path ]
[ over empty? [ nip ] [ "." glue ] if ] bi-curry bi*
@ -56,8 +56,7 @@ DEFER: add-vocab%
: (disk-vocabs-recursive) ( root prefix -- seq )
vocab-directory-entries
[ add-vocab-children% ] { } make
[ name>> ] sort-with ;
[ add-vocab-children% ] { } make ;
: no-rooted ( seq -- seq' ) [ find-vocab-root ] reject ;