to-refresh ( prefix -- modified-sources modified-docs unchanged )


Vocabulary
vocabs.refresh

Definition
USING: accessors kernel namespaces sequences sets vocabs
vocabs.loader ;

IN: vocabs.refresh

: to-refresh
( prefix -- modified-sources modified-docs unchanged )
[
V{ } clone modified-sources set
V{ } clone modified-docs set child-vocabs
[ ".private" tail? not ] filter [
[
[
[ modified-sources ]
[ lookup-vocab source-loaded?>> ]
[ vocab-source-path ] tri (to-refresh)
] [
[ modified-docs ]
[ lookup-vocab docs-loaded?>> ]
[ vocab-docs-path ] tri (to-refresh)
] bi
] each modified-sources get modified-docs get
] [ modified-docs get modified-sources get append diff ]
bi
] with-scope ;