Rename reload-vocab to reload
parent
9231140a85
commit
6df84617d6
core/vocabs/loader
|
@ -19,7 +19,7 @@ $nl
|
|||
"While " { $link POSTPONE: USE: } " and " { $link POSTPONE: USING: } " load vocabularies which have not been loaded before adding them to the search path, it is also possible to load a vocabulary without adding it to the search path:"
|
||||
{ $subsection require }
|
||||
"Forcing a reload of a vocabulary, even if it has already been loaded:"
|
||||
{ $subsection reload-vocab }
|
||||
{ $subsection reload }
|
||||
"Application vocabularies can define a main entry point, giving the user a convenient way to run the application:"
|
||||
{ $subsection POSTPONE: MAIN: }
|
||||
{ $subsection run }
|
||||
|
@ -94,7 +94,7 @@ HELP: load-vocab-from-root
|
|||
{ $values { "root" "a pathname string" } { "name" "a vocabulary name" } }
|
||||
{ $description "Loads a vocabulary's source code and documentation." } ;
|
||||
|
||||
HELP: reload-vocab
|
||||
HELP: reload
|
||||
{ $values { "name" "a vocabulary name" } }
|
||||
{ $description "Loads it's source code and documentation." }
|
||||
{ $errors "Throws a " { $link no-vocab } " error if the vocabulary does not exist on disk." } ;
|
||||
|
@ -102,7 +102,7 @@ HELP: reload-vocab
|
|||
HELP: require
|
||||
{ $values { "vocab" "a vocabulary specifier" } }
|
||||
{ $description "Loads a vocabulary if it has not already been loaded." }
|
||||
{ $notes "To unconditionally reload a vocabulary, use " { $link reload-vocab } ". To reload changed source files, use " { $link refresh } " or " { $link refresh-all } "." } ;
|
||||
{ $notes "To unconditionally reload a vocabulary, use " { $link reload } ". To reload changed source files, use " { $link refresh } " or " { $link refresh-all } "." } ;
|
||||
|
||||
HELP: run
|
||||
{ $values { "vocab" "a vocabulary specifier" } }
|
||||
|
|
|
@ -96,12 +96,14 @@ SYMBOL: load-help?
|
|||
nip no-vocab
|
||||
] if ;
|
||||
|
||||
: reload-vocab ( name -- )
|
||||
dup find-vocab-root dup [
|
||||
swap load-vocab-from-root
|
||||
] [
|
||||
drop no-vocab
|
||||
] if ;
|
||||
: reload ( name -- )
|
||||
[
|
||||
dup find-vocab-root dup [
|
||||
swap load-vocab-from-root
|
||||
] [
|
||||
drop no-vocab
|
||||
] if
|
||||
] with-compiler-errors ;
|
||||
|
||||
: require ( vocab -- )
|
||||
load-vocab drop ;
|
||||
|
@ -166,7 +168,7 @@ M: vocab (load-vocab)
|
|||
[ swap vocab-name amend-vocab-from-root ] when* ;
|
||||
|
||||
M: string (load-vocab)
|
||||
[ ".private" ?tail drop reload-vocab ] keep vocab ;
|
||||
[ ".private" ?tail drop reload ] keep vocab ;
|
||||
|
||||
M: vocab-link (load-vocab)
|
||||
vocab-name (load-vocab) ;
|
||||
|
|
Loading…
Reference in New Issue