]> gitweb.factorcode.org Git - factor.git/commitdiff
core/basis: Rename words dealing with vocabs to loaded-vocabs or disk-vocabs because...
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 8 Jun 2015 19:02:25 +0000 (12:02 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 8 Jun 2015 19:47:35 +0000 (12:47 -0700)
40 files changed:
basis/bootstrap/compiler/compiler.factor
basis/bootstrap/stage2.factor
basis/editors/editors.factor
basis/help/html/html.factor
basis/help/lint/checks/checks.factor
basis/help/lint/lint.factor
basis/help/vocabs/vocabs.factor
basis/html/templates/chloe/chloe.factor
basis/opengl/annotations/annotations.factor
basis/present/present-tests.factor
basis/tools/completion/completion.factor
basis/tools/coverage/coverage.factor
basis/tools/crossref/crossref.factor
basis/tools/deploy/shaker/shaker.factor
basis/tools/scaffold/scaffold.factor
basis/tools/test/test.factor
basis/ui/pixel-formats/pixel-formats-docs.factor
basis/vocabs/cache/cache.factor
basis/vocabs/hierarchy/hierarchy-docs.factor
basis/vocabs/hierarchy/hierarchy.factor
basis/vocabs/refresh/monitor/monitor.factor
basis/vocabs/refresh/refresh.factor
core/bootstrap/primitives.factor
core/vocabs/loader/loader-tests.factor
core/vocabs/vocabs-docs.factor
core/vocabs/vocabs.factor
core/words/words-tests.factor
core/words/words.factor
extra/benchmark/benchmark.factor
extra/benchmark/dispatch1/dispatch1.factor
extra/benchmark/dispatch5/dispatch5.factor
extra/fuel/fuel.factor
extra/fuel/help/help.factor
extra/fuel/xref/xref.factor
extra/lint/lint.factor
extra/mongodb/tuple/persistent/persistent.factor
extra/readline-listener/readline-listener.factor
extra/reports/noise/noise.factor
extra/slots/syntax/syntax.factor
extra/smalltalk/compiler/compiler.factor

index d22f0d95c53402e5abe81d758cda6f04339f7f34..6ce7a3d44ef952d9d12fe1141eb0c835df9884e4 100644 (file)
@@ -124,7 +124,7 @@ gc
 
     "." write flush
 
-    vocabs [ words compile-unoptimized "." write flush ] each
+    loaded-vocab-names [ vocab-words compile-unoptimized "." write flush ] each
 
     " done" print flush
 
index 15872ce4997f30bf8b1651e953d7e197c1537a12..e7a79808bafe9669f2a6f501e6901a024ec82eac 100644 (file)
@@ -16,7 +16,7 @@ SYMBOL: bootstrap-time
             P" resource:core/io/encodings/utf16/utf16.factor" 
             P" resource:core/io/encodings/utf16n/utf16n.factor" [ forget ] bi@
             "io.encodings.utf16" 
-            "io.encodings.utf16n" [ child-vocabs [ forget-vocab ] each ] bi@
+            "io.encodings.utf16n" [ loaded-child-vocab-names [ forget-vocab ] each ] bi@
         ] with-compilation-unit
     ] when ;
 
index 665dd74933f634fa09430bec21ffb051a5f157ba..4239fb0e46a63195485283cecd673a12b79cd8c9 100644 (file)
@@ -12,7 +12,7 @@ IN: editors
 SYMBOL: editor-class
 
 : available-editors ( -- seq )
-    "editors" child-vocab-names ;
+    "editors" loaded-child-vocab-names ;
 
 : editor-restarts ( -- alist )
     available-editors
index 5b9a646ee5ee662cf2c11d4ccd8c065593d8e53b..73fe06d16ffd4d1361aea87d108e1d0e49ed17b4 100644 (file)
@@ -98,7 +98,7 @@ M: pathname url-of
     dup topic>filename utf8 [ help>html write-xml ] with-file-writer ;
 
 : all-vocabs-really ( -- seq )
-    all-vocabs-recursive no-roots remove-redundant-prefixes
+    all-disk-vocabs-recursive no-roots remove-redundant-prefixes
     [ vocab-name "scratchpad" = ] reject ;
 
 : all-topics ( -- topics )
index d5f5cce25940a536cafebfea52790403cf8628bd..ad25daf2b2366e4206167131c126a8d270e012f4 100644 (file)
@@ -17,7 +17,7 @@ M: simple-lint-error summary message>> ;
 M: simple-lint-error error. summary print ;
 
 SYMBOL: vocabs-quot
-SYMBOL: all-vocabs
+SYMBOL: all-vocabs-list
 SYMBOL: vocab-articles
 
 : check-example ( element -- )
@@ -110,7 +110,7 @@ SYMBOL: vocab-articles
     [ "$see-also are not unique" simple-lint-error ] unless ;
 
 : vocab-exists? ( name -- ? )
-    [ lookup-vocab ] [ all-vocabs get member? ] bi or ;
+    [ lookup-vocab ] [ all-vocabs-list get member? ] bi or ;
 
 : check-modules ( element -- )
     \ $vocab-link swap elements [
@@ -199,7 +199,7 @@ SYMBOL: vocab-articles
     } cleave ;
 
 : files>vocabs ( -- assoc )
-    vocabs
+    loaded-vocab-names
     [ [ [ vocab-docs-path ] keep ] H{ } map>assoc ]
     [ [ [ vocab-source-path ] keep ] H{ } map>assoc ]
     bi assoc-union ;
index 25115905b455af92f7d1850906a5833ca4dad262..5f506c9cfbc62d3afabd19168f7a3582f82e478e 100644 (file)
@@ -4,8 +4,6 @@ USING: assocs combinators continuations fry help
 help.lint.checks help.topics io kernel namespaces parser
 sequences source-files.errors vocabs.hierarchy vocabs words
 classes locals tools.errors listener ;
-FROM: help.lint.checks => all-vocabs ;
-FROM: vocabs => child-vocabs ;
 IN: help.lint
 
 SYMBOL: lint-failures
@@ -73,7 +71,7 @@ PRIVATE>
 : check-vocab ( vocab -- )
     "Checking " write dup write "..." print flush
     [ check-about ]
-    [ words [ check-word ] each ]
+    [ vocab-words [ check-word ] each ]
     [ vocab-articles get at [ check-article ] each ]
     tri ;
 
@@ -82,9 +80,9 @@ PRIVATE>
 : help-lint ( prefix -- )
     [
         auto-use? off
-        all-vocab-names all-vocabs set
+        all-disk-vocab-names all-vocabs-list set
         group-articles vocab-articles set
-        child-vocabs
+        loaded-child-vocab-names
         [ check-vocab ] each
     ] with-scope ;
 
@@ -93,7 +91,7 @@ PRIVATE>
 : :lint-failures ( -- ) lint-failures get values errors. ;
 
 : unlinked-words ( vocab -- seq )
-    words all-word-help [ article-parent ] reject ;
+    vocab-words all-word-help [ article-parent ] reject ;
 
 : linked-undocumented-words ( -- seq )
     all-words
index 3f7c2d01842a10093f206fe341d30bdcdcd1a63c..a2e7e86ae158971e3ad743a463edd13dded1862a 100644 (file)
@@ -8,7 +8,6 @@ help.topics io io.pathnames io.styles kernel macros make
 namespaces sequences sorting summary vocabs vocabs.files
 vocabs.hierarchy vocabs.loader vocabs.metadata words
 words.symbol ;
-FROM: vocabs.hierarchy => child-vocabs ;
 IN: help.vocabs
 
 : about ( vocab -- )
@@ -60,7 +59,7 @@ C: <vocab-author> vocab-author
     ] unless-empty ;
 
 : describe-children ( vocab -- )
-    vocab-name child-vocabs
+    vocab-name disk-vocabs-for-prefix
     $vocab-roots ;
 
 : files. ( seq -- )
@@ -226,14 +225,14 @@ C: <vocab-author> vocab-author
 
 : describe-words ( vocab -- )
     {
-        { [ dup lookup-vocab ] [ words $words ] }
+        { [ dup lookup-vocab ] [ vocab-words $words ] }
         { [ dup find-vocab-root ] [ vocab-is-not-loaded ] }
         [ drop ]
     } cond ;
 
 : words. ( vocab -- )
     last-element off
-    [ require ] [ words $words ] bi nl ;
+    [ require ] [ vocab-words $words ] bi nl ;
 
 : describe-metadata ( vocab -- )
     [
@@ -254,7 +253,7 @@ C: <vocab-author> vocab-author
     } cleave ;
 
 : keyed-vocabs ( str quot -- seq )
-    [ all-vocabs-recursive ] 2dip '[
+    [ all-disk-vocabs-recursive ] 2dip '[
         [ _ swap @ member? ] filter no-prefixes
         [ name>> ] sort-with
     ] assoc-map ; inline
index 092997a1106652f286f59666d92b5c50b0312d02..0cd639d80506dd344e3b4d2d97e8034610f9f1a9 100644 (file)
@@ -1,18 +1,10 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel sequences combinators fry
-namespaces make classes.tuple assocs splitting words arrays io
-io.files io.files.info io.encodings.utf8 io.streams.string
-unicode.case mirrors math urls present multiline quotations xml
-logging
-xml.writer xml.syntax strings
-html.forms
-html
-html.components
-html.templates
-html.templates.chloe.compiler
-html.templates.chloe.components
-html.templates.chloe.syntax ;
+USING: accessors assocs html.components html.forms
+html.templates html.templates.chloe.compiler
+html.templates.chloe.components html.templates.chloe.syntax
+io.encodings.utf8 io.files io.files.info kernel logging make
+math namespaces sequences splitting words xml xml.syntax ;
 IN: html.templates.chloe
 
 TUPLE: chloe path ;
index 54334c8aef0bd37bc06b3870395b25cad3c06e14..ef4e13c78417c41b483864fd428325ee87295209 100644 (file)
@@ -25,7 +25,7 @@ gl-error-log [ V{ } clone ] initialize
     name>> { [ "glGetError" = not ] [ "gl" head? ] [ third LETTER? ] } 1&& ;
 
 : gl-functions ( -- words )
-    "opengl.gl" lookup-vocab words [ gl-function? ] filter ;
+    "opengl.gl" lookup-vocab vocab-words [ gl-function? ] filter ;
 
 : annotate-gl-functions ( quot -- )
     [
index 4a68e7ac1f9fa4cb1f3d36ba6a416eecf6ed0453..8fc494918b4f32c17a52ed4468e29c55e81a2813 100644 (file)
@@ -6,7 +6,7 @@ vocabs.hierarchy ;
 { "Hi" } [ "Hi" present ] unit-test
 { "+" } [ \ + present ] unit-test
 { "kernel" } [ "kernel" lookup-vocab present ] unit-test
-{ } [ all-vocabs-recursive filter-vocabs [ present ] map drop ] unit-test
+{ } [ disk-vocabs-recursive filter-vocabs [ present ] map drop ] unit-test
 
 { "1+1j" } [ C{ 1 1 } present ] unit-test
 { "1-1j" } [ C{ 1 -1 } present ] unit-test
index f22b70048efaac8f3e36eceea21993f635715717..b3632c9f29fded28f3fdc74014f2d7c3c4a0c502 100644 (file)
@@ -99,7 +99,7 @@ PRIVATE>
     all-words name-completions ;
 
 : vocabs-matching ( str -- seq )
-    all-vocabs-recursive filter-vocabs name-completions ;
+    all-disk-vocabs-recursive filter-vocabs name-completions ;
 
 : chars-matching ( str -- seq )
     name-map keys dup zip completions ;
index d21f516355a0308f8400bc1c414fd47546eff3ca..ff37fa441d68216ca9e201c881cf0fd5cffd9c2c 100644 (file)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2011 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays assocs classes combinators
-combinators.short-circuit continuations fry io kernel math
-namespaces prettyprint quotations sequences sequences.deep
-splitting strings tools.annotations tools.test
-tools.test.private vocabs words words.symbol ;
+USING: accessors arrays assocs classes combinators.short-circuit
+continuations fry io kernel math namespaces prettyprint
+quotations sequences sequences.deep splitting strings
+tools.annotations tools.test.private vocabs vocabs.hierarchy
+words words.symbol ;
 IN: tools.coverage
 
 TUPLE: coverage-state < identity-tuple executed? ;
@@ -32,7 +32,7 @@ GENERIC: reset-coverage ( object -- )
     ".private" ?tail drop ".private" append ;
 
 : coverage-words ( string -- words )
-    words [ { [ primitive? not ] [ symbol? not ] [ predicate? not ] } 1&& ] filter ;
+    vocab-words [ { [ primitive? not ] [ symbol? not ] [ predicate? not ] } 1&& ] filter ;
 
 PRIVATE>
 
@@ -131,7 +131,7 @@ PRIVATE>
     { [ ".private" tail? ] [ ".tests" tail? ] } 1|| not ;
 
 : test-coverage-recursively ( prefix -- assoc )
-    child-vocabs [ coverage-vocab? ] filter
+    disk-vocabs-for-prefix [ coverage-vocab? ] filter
     [ dup test-coverage ] { } map>assoc ;
 
 : %coverage ( string -- x )
index 04aae88ae8776043f896e97aafa347da4be18146..12cca05af907cd1b3a3c027a616877ec00500648 100644 (file)
@@ -115,7 +115,7 @@ M: f smart-usage drop \ f smart-usage ;
     [ "No usages." print ] [ sorted-definitions. ] if-empty ;
 
 : vocab-xref ( vocab quot: ( defspec -- seq ) -- vocabs )
-    [ [ vocab-name ] [ words [ generic? ] reject ] bi ] dip map
+    [ [ vocab-name ] [ vocab-words [ generic? ] reject ] bi ] dip map
     [
         [ [ word? ] [ generic? not ] bi and ] filter [
             dup method?
index f4a56b8cf6c5268e58e776e4a0f0111190ba530b..e5831b54fe8b42ea27006fc7e18951d164fc70c2 100755 (executable)
@@ -245,7 +245,7 @@ IN: tools.deploy.shaker
 
 : compiler-classes ( -- seq )
     { "compiler" "stack-checker" }
-    [ child-vocabs [ words ] map concat [ class? ] filter ]
+    [ loaded-child-vocab-names [ vocab-words ] map concat [ class? ] filter ]
     map concat unique ;
 
 : prune-decision-tree ( tree classes -- )
@@ -304,7 +304,7 @@ IN: tools.deploy.shaker
     ] when ;
 
 : vocab-tree-globals ( except names -- words )
-    [ child-vocabs [ words ] map concat ] map concat
+    [ loaded-child-vocab-names [ vocab-words ] map concat ] map concat
     swap [ first2 lookup-word ] map sift diff ;
 
 : stripped-globals ( -- seq )
@@ -552,7 +552,7 @@ SYMBOL: deploy-vocab
 
 : write-vocab-manifest ( vocab-manifest-out -- )
     "Writing vocabulary manifest to " write dup print flush
-    vocabs "VOCABS:" prefix
+    loaded-vocab-names "VOCABS:" prefix
     deploy-libraries get [ lookup-library path>> ] map members
     "LIBRARIES:" prefix append
     swap utf8 set-file-lines ;
index 7cf5b1471715e77026ee4e6d52473fc30c7b3bb6..8a2841434ba4bbe26cd8df29b5c8b7167529eb03 100644 (file)
@@ -28,7 +28,7 @@ ERROR: vocab-name-contains-dot path ;
 : contains-separator? ( string -- ? ) [ path-separator? ] any? ;
 
 : ensure-vocab-exists ( string -- string )
-    dup vocabs member? [ no-vocab ] unless ;
+    dup loaded-vocab-names member? [ no-vocab ] unless ;
 
 : check-vocab-name ( string -- string )
     [ ]
@@ -215,7 +215,7 @@ M: object add-using ( object -- )
     [ docs-header. ] [ docs-body. ] bi ;
 
 : interesting-words ( vocab -- array )
-    words
+    vocab-words
     [ { [ "help" word-prop ] [ predicate? ] } 1|| ] reject
     natural-sort ;
 
index b559bf3977d81835ed7e4429571ad25cade73303..11ce24bfd253c42a0ba257986f1f63b1266d216a 100644 (file)
@@ -166,9 +166,9 @@ M: test-failure error. ( error -- )
 
 : :test-failures ( -- ) test-failures get errors. ;
 
-: test ( prefix -- ) child-vocabs test-vocabs ;
+: test ( prefix -- ) loaded-child-vocab-names test-vocabs ;
 
-: test-all ( -- ) vocabs filter-don't-test test-vocabs ;
+: test-all ( -- ) loaded-vocab-names filter-don't-test test-vocabs ;
 
 : test-main ( -- )
     command-line get [ [ load ] [ test ] bi ] each ;
index 9309085676b47bba338677f1c37f400278f5ded6..75921eec44ad411fd7ed909ecc58fd561ff9bcb7 100644 (file)
@@ -6,7 +6,7 @@ IN: ui.pixel-formats
 <<
     "ui.gadgets.worlds" create-vocab drop
     "world" "ui.gadgets.worlds" create drop
-    "ui.gadgets.worlds" vocab-words use-words
+    "ui.gadgets.worlds" vocab-words-assoc use-words
 >>
 
 ARTICLE: "ui.pixel-formats-attributes" "Pixel format attributes"
index 4a2fa11723fe9426a1729739cc8de2fff3e21532..9947b3b8337bcdc8e47875cfdb2282864652503e 100644 (file)
@@ -12,7 +12,7 @@ IN: vocabs.cache
         \ vocab-file-contents "memoize" word-prop swap
         '[ drop first vocab-name _ = ] assoc-reject! drop
     ] bi
-    \ all-vocabs-recursive reset-memoized
+    \ all-disk-vocabs-recursive reset-memoized
     \ all-authors reset-memoized
     \ all-tags reset-memoized ;
 
index 94072ed2dd65bd4a00e17fc6b0b120c42dad0daf..c6a15749cf686d55934e34ecdbe5030e2d07d474 100644 (file)
@@ -14,13 +14,13 @@ $nl
 }\r
 "Getting all vocabularies from disk:"\r
 { $subsections\r
-    all-vocabs\r
-    all-vocabs-recursive\r
+    all-disk-vocabs-by-root\r
+    all-disk-vocabs-recursive\r
 }\r
 "Getting all vocabularies from disk whose names which match a string prefix:"\r
 { $subsections\r
-    child-vocabs\r
-    child-vocabs-recursive\r
+    disk-vocabs-for-prefix\r
+    disk-vocabs-recursive-for-prefix\r
 }\r
 "Words for modifying output:"\r
 { $subsections\r
index 07c2097e35b1b868c0ba5f5aac18622be4f0c836..704f7ef63b53795a3d20bf0bfff487e1644eb695 100644 (file)
@@ -4,7 +4,6 @@ USING: accessors arrays assocs combinators.short-circuit fry
 io.directories io.files io.files.types io.pathnames kernel make\r
 memoize namespaces sequences sorting splitting vocabs sets\r
 vocabs.loader vocabs.metadata vocabs.errors ;\r
-RENAME: child-vocabs vocabs => vocabs:child-vocabs\r
 IN: vocabs.hierarchy\r
 \r
 TUPLE: vocab-prefix name ;\r
@@ -40,33 +39,33 @@ ERROR: vocab-root-required root ;
 : ensure-vocab-root/prefix ( root prefix -- root prefix )\r
     [ ensure-vocab-root ] [ check-vocab-name ] bi* ;\r
 \r
-: (child-vocabs) ( root prefix -- vocabs )\r
+: (disk-vocab-children) ( root prefix -- vocabs )\r
     check-vocab-name\r
     [ vocab-dir append-path dup exists? [ vocab-subdirs ] [ drop { } ] if ]\r
     [ nip [ "." append '[ _ prepend ] map! ] unless-empty ]\r
     [ drop '[ _ over vocab-dir? [ >vocab-link ] [ <vocab-prefix> ] if ] map! ]\r
     2tri ;\r
 \r
-: ((child-vocabs-recursive)) ( root prefix -- )\r
-    dupd vocab-name (child-vocabs) [ % ] keep\r
-    [ ((child-vocabs-recursive)) ] with each ;\r
+: ((disk-vocabs-recursive)) ( root prefix -- )\r
+    dupd vocab-name (disk-vocab-children) [ % ] keep\r
+    [ ((disk-vocabs-recursive)) ] with each ;\r
 \r
-: (child-vocabs-recursive) ( root prefix -- seq )\r
+: (disk-vocabs-recursive) ( root prefix -- seq )\r
     [ ensure-vocab-root ] dip\r
-    [ ((child-vocabs-recursive)) ] { } make ;\r
+    [ ((disk-vocabs-recursive)) ] { } make ;\r
 \r
 : no-rooted ( seq -- seq' ) [ find-vocab-root ] reject ;\r
 \r
 : one-level-only? ( name prefix -- ? )\r
     ?head [ "." split1 nip not ] [ drop f ] if ;\r
 \r
-: unrooted-child-vocabs ( prefix -- seq )\r
-    [ vocabs no-rooted ] dip\r
+: unrooted-disk-vocabs ( prefix -- seq )\r
+    [ loaded-vocab-names no-rooted ] dip\r
     dup empty? [ CHAR: . suffix ] unless\r
     '[ vocab-name _ one-level-only? ] filter ;\r
 \r
-: unrooted-child-vocabs-recursive ( prefix -- seq )\r
-    vocabs:child-vocabs no-rooted ;\r
+: unrooted-disk-vocabs-recursive ( prefix -- seq )\r
+    loaded-child-vocab-names no-rooted ;\r
 \r
 PRIVATE>\r
 \r
@@ -90,32 +89,32 @@ PRIVATE>
 : filter-vocabs ( assoc -- seq )\r
     no-roots no-prefixes members ;\r
 \r
-: child-vocabs ( prefix -- assoc )\r
-    [ [ vocab-roots get ] dip '[ dup _ (child-vocabs) ] { } map>assoc ]\r
-    [ unrooted-child-vocabs [ lookup-vocab ] map! f swap 2array ]\r
+: disk-vocabs-for-prefix ( prefix -- assoc )\r
+    [ [ vocab-roots get ] dip '[ dup _ (disk-vocab-children) ] { } map>assoc ]\r
+    [ unrooted-disk-vocabs [ lookup-vocab ] map! f swap 2array ]\r
     bi suffix ;\r
 \r
-: all-vocabs ( -- assoc )\r
-    "" child-vocabs ;\r
+: all-disk-vocabs-by-root ( -- assoc )\r
+    "" disk-vocabs-for-prefix ;\r
 \r
-: child-vocabs-recursive ( prefix -- assoc )\r
-    [ [ vocab-roots get ] dip '[ dup _ (child-vocabs-recursive) ] { } map>assoc ]\r
-    [ unrooted-child-vocabs-recursive [ lookup-vocab ] map! f swap 2array ]\r
+: disk-vocabs-recursive-for-prefix ( prefix -- assoc )\r
+    [ [ vocab-roots get ] dip '[ dup _ (disk-vocabs-recursive) ] { } map>assoc ]\r
+    [ unrooted-disk-vocabs-recursive [ lookup-vocab ] map! f swap 2array ]\r
     bi suffix ;\r
 \r
-MEMO: all-vocabs-recursive ( -- assoc )\r
-    "" child-vocabs-recursive ;\r
+MEMO: all-disk-vocabs-recursive ( -- assoc )\r
+    "" disk-vocabs-recursive-for-prefix ;\r
 \r
-: all-vocab-names ( -- seq )\r
-    all-vocabs-recursive filter-vocabs [ vocab-name ] map! ;\r
+: all-disk-vocab-names ( -- seq )\r
+    all-disk-vocabs-recursive filter-vocabs [ vocab-name ] map! ;\r
 \r
-: child-vocab-names ( prefix -- seq )\r
-    child-vocabs filter-vocabs [ vocab-name ] map! ;\r
+: disk-child-vocab-names ( prefix -- seq )\r
+    disk-vocabs-for-prefix filter-vocabs [ vocab-name ] map! ;\r
 \r
 <PRIVATE\r
 \r
 : collect-vocabs ( quot -- seq )\r
-    [ all-vocabs-recursive filter-vocabs ] dip\r
+    [ all-disk-vocabs-recursive filter-vocabs ] dip\r
     gather natural-sort ; inline\r
 \r
 : maybe-include-root/prefix ( root prefix -- vocab-link/f )\r
@@ -127,15 +126,15 @@ MEMO: all-vocabs-recursive ( -- assoc )
 \r
 PRIVATE>\r
 \r
-: vocabs-in-root/prefix ( root prefix -- seq )\r
-    [ (child-vocabs-recursive) ]\r
+: disk-vocabs-in-root/prefix ( root prefix -- seq )\r
+    [ (disk-vocabs-recursive) ]\r
     [ maybe-include-root/prefix [ prefix ] when* ] 2bi ;\r
 \r
-: vocabs-in-root ( root -- seq )\r
-    "" vocabs-in-root/prefix ;\r
+: disk-vocabs-in-root ( root -- seq )\r
+    "" disk-vocabs-in-root/prefix ;\r
 \r
 : (load-from-root) ( root prefix -- failures )\r
-    vocabs-in-root/prefix\r
+    disk-vocabs-in-root/prefix\r
     [ don't-load? ] reject no-prefixes\r
     require-all ;\r
 \r
index ccb87c88dcdc92ecdedf5101ba70f0e18ad2493c..2320fc4a045ea15f087a78d28dd412b4db5b6473 100644 (file)
@@ -49,7 +49,7 @@ TR: convert-separators "/\\" ".." ;
 
 : init-vocab-monitor ( -- )
     H{ } clone changed-vocabs set-global
-    vocabs [ changed-vocab ] each ;
+    loaded-vocab-names [ changed-vocab ] each ;
 
 [
     "-no-monitors" (command-line) member? [
index e9ecc92cc0643c3d5aea66c7096c9544af8aa9eb..3106bdc82b719cf9424f86aa39f7ad21cab44f23 100644 (file)
@@ -55,7 +55,7 @@ SYMBOL: changed-vocabs
     [ vocab-docs-path ] tri (to-refresh) ;
 
 : to-refresh ( prefix -- modified-sources modified-docs unchanged )
-    child-vocabs [ ".private" tail? ] reject
+    loaded-child-vocab-names [ ".private" tail? ] reject
     [
         [ [ vocab-source-modified? ] filter ]
         [ [ vocab-docs-modified? ] filter ] bi
index 1ef404a9b7549fcd344160d42f96ba97d7bc8eae..e6cc5209dfed9c96e7831234213eeaf2f17e346c 100755 (executable)
@@ -27,7 +27,7 @@ architecture get asm-file parse-file
 ! Now we have ( syntax-quot arch-quot layouts-quot ) on the stack
 
 ! Bring up a bare cross-compiling vocabulary.
-"syntax" lookup-vocab vocab-words bootstrap-syntax set
+"syntax" lookup-vocab vocab-words-assoc bootstrap-syntax set
 
 H{ } clone dictionary set
 H{ } clone root-cache set
@@ -149,7 +149,7 @@ call( -- ) ! syntax-quot
 "f" "syntax" lookup-word { } define-builtin
 
 "f" "syntax" create [ not ] "predicate" set-word-prop
-"f?" "syntax" vocab-words delete-at
+"f?" "syntax" vocab-words-assoc delete-at
 
 "t" "syntax" lookup-word define-singleton-class
 
@@ -180,7 +180,7 @@ define-predicate-class
 [ [ drop t ] "predicate" set-word-prop ]
 bi
 
-"object?" "kernel" vocab-words delete-at
+"object?" "kernel" vocab-words-assoc delete-at
 
 ! Empty class with no instances
 "null" "kernel" create
@@ -188,7 +188,7 @@ bi
 [ [ drop f ] "predicate" set-word-prop ]
 bi
 
-"null?" "kernel" vocab-words delete-at
+"null?" "kernel" vocab-words-assoc delete-at
 
 "fixnum" "math" create { } define-builtin
 "fixnum" "math" create "integer>fixnum-strict" "math" create 1quotation "coercer" set-word-prop
index f994da982d01915005007dbfa0b4e1458c9a215d..76e4e8b2b3be9bf0c02636cc9ce1bf4aedd760a1 100644 (file)
@@ -187,7 +187,7 @@ forget-junk
 
 [ f ] [ "vocabs.loader.test.p" lookup-vocab ] unit-test
 [ ] [ "vocabs.loader.test.p.private" require ] unit-test
-[ { "foo" } ] [ "vocabs.loader.test.p" words [ name>> ] map ] unit-test
+[ { "foo" } ] [ "vocabs.loader.test.p" vocab-words [ name>> ] map ] unit-test
 
 [
     "mnop" [ "vocabs.loader.test." swap suffix forget-vocab ] each
index fa3caecff83ee541ae17b21b2a8f70dc27242a6a..55894351aa2c408eb7487c895b5933fbad525dea 100644 (file)
@@ -1,5 +1,5 @@
 USING: help.markup help.syntax strings words compiler.units
-vocabs.loader ;
+vocabs.loader assocs ;
 IN: vocabs
 
 ARTICLE: "vocabularies" "Vocabularies"
@@ -28,13 +28,13 @@ $nl
 "Looking up existing vocabularies and creating new vocabularies:"
 { $subsections
     lookup-vocab
-    child-vocabs
+    loaded-child-vocab-names
     create-vocab
 }
 "Getting words from a vocabulary:"
 { $subsections
+    vocab-words-assoc
     vocab-words
-    words
     all-words
     words-named
 }
@@ -47,7 +47,7 @@ ABOUT: "vocabularies"
 HELP: dictionary
 { $var-description "Holds a hashtable mapping vocabulary names to vocabularies." } ;
 
-HELP: vocabs
+HELP: loaded-vocab-names
 { $values { "seq" "a sequence of strings" } }
 { $description "Outputs a sequence of all defined vocabulary names." } ;
 
@@ -62,12 +62,12 @@ HELP: vocab-name
 { $values { "vocab-spec" "a vocabulary specifier" } { "name" string } }
 { $description "Outputs the name of a vocabulary." } ;
 
-HELP: vocab-words
-{ $values { "vocab-spec" "a vocabulary specifier" } { "words" "an assoc mapping strings to words" } }
+HELP: vocab-words-assoc
+{ $values { "vocab-spec" "a vocabulary specifier" } { "assoc/f" { $maybe assoc } } }
 { $description "Outputs the words defined in a vocabulary." } ;
 
-HELP: words
-{ $values { "vocab" string } { "seq" "a sequence of words" } }
+HELP: vocab-words
+{ $values { "vocab-spec" vocab-spec } { "seq" "a sequence of words" } }
 { $description "Outputs a sequence of words defined in the vocabulary, or " { $link f } " if no vocabulary with this name exists." } ;
 
 HELP: all-words
@@ -95,12 +95,12 @@ HELP: create-vocab
 { $values { "name" string } { "vocab" vocab } }
 { $description "Creates a new vocabulary if one does not exist with the given name, otherwise outputs an existing vocabulary." } ;
 
-HELP: child-vocabs
-{ $values { "vocab" "a vocabulary specifier" } { "seq" "a sequence of strings" } }
+HELP: loaded-child-vocab-names
+{ $values { "vocab-spec" "a vocabulary specifier" } { "seq" "a sequence of strings" } }
 { $description "Outputs all vocabularies which are conceptually under " { $snippet "vocab" } " in the hierarchy." }
 { $examples
     { $unchecked-example
-        "\"io.streams\" child-vocabs ."
+        "\"io.streams\" loaded-child-vocab-names ."
         "{ \"io.streams.c\" \"io.streams.duplex\" \"io.streams.lines\" \"io.streams.nested\" \"io.streams.plain\" \"io.streams.string\" }"
     }
 } ;
index 157213b44de7ab608a9e83e13512d79f1e8964fa..a8dd27f2e9e3bac5ca2928171d879ee6bade194b 100644 (file)
@@ -44,7 +44,7 @@ M: object vocab-name check-vocab-name ;
 : vocab-name* ( vocab-spec -- name )
     vocab-name ".private" ?tail drop ;
 
-: private-vocab? ( vocab -- ? )
+: private-vocab? ( vocab-spec -- ? )
     vocab-name ".private" tail? ;
 
 GENERIC: lookup-vocab ( vocab-spec -- vocab )
@@ -53,13 +53,13 @@ M: vocab lookup-vocab ;
 
 M: object lookup-vocab ( name -- vocab ) vocab-name dictionary get at ;
 
-GENERIC: vocab-words ( vocab-spec -- words )
+GENERIC: vocab-words-assoc ( vocab-spec -- assoc/f )
 
-M: vocab vocab-words words>> ;
+M: vocab vocab-words-assoc words>> ;
 
-M: object vocab-words lookup-vocab vocab-words ;
+M: object vocab-words-assoc lookup-vocab vocab-words-assoc ;
 
-M: f vocab-words ;
+M: f vocab-words-assoc ;
 
 GENERIC: vocab-help ( vocab-spec -- help )
 
@@ -96,18 +96,18 @@ GENERIC: vocab-changed ( vocab obj -- )
 
 ERROR: no-vocab name ;
 
-: vocabs ( -- seq )
+: loaded-vocab-names ( -- seq )
     dictionary get keys natural-sort ;
 
-: words ( vocab -- seq )
-    vocab-words values ;
+: vocab-words ( vocab-spec -- seq )
+    vocab-words-assoc values ;
 
 : all-words ( -- seq )
-    dictionary get values [ words ] map concat ;
+    dictionary get values [ vocab-words ] map concat ;
 
 : words-named ( str -- seq )
     dictionary get values
-    [ vocab-words at ] with map
+    [ vocab-words-assoc at ] with map
     sift ;
 
 : child-vocab? ( prefix name -- ? )
@@ -119,8 +119,8 @@ ERROR: no-vocab name ;
         ] if
     ] if-empty ;
 
-: child-vocabs ( vocab -- seq )
-    vocab-name vocabs [ child-vocab? ] with filter ;
+: loaded-child-vocab-names ( vocab-spec -- seq )
+    vocab-name loaded-vocab-names [ child-vocab? ] with filter ;
 
 GENERIC: >vocab-link ( name -- vocab )
 
@@ -129,7 +129,7 @@ M: vocab-spec >vocab-link ;
 M: object >vocab-link dup lookup-vocab [ ] [ <vocab-link> ] ?if ;
 
 : forget-vocab ( vocab -- )
-    [ words forget-all ]
+    [ vocab-words forget-all ]
     [ vocab-name dictionary get delete-at ]
     [ notify-vocab-observers ] tri ;
 
index 605f8b8c4dfba5d245071cff433e19ee26a8cdbb..18914bcacba25cd80b8d082786a3d57f110110b0 100644 (file)
@@ -11,7 +11,7 @@ IN: words.tests
     "poo" "words.tests" lookup-word execute
 ] unit-test
 
-[ t ] [ t vocabs [ words [ word? and ] each ] each ] unit-test
+[ t ] [ t loaded-vocab-names [ vocab-words [ word? and ] each ] each ] unit-test
 
 DEFER: plist-test
 
@@ -41,8 +41,8 @@ DEFER: plist-test
     "test-scope" "scratchpad" lookup-word name>>
 ] unit-test
 
-[ t ] [ vocabs array? ] unit-test
-[ t ] [ vocabs [ words [ word? ] all? ] all? ] unit-test
+[ t ] [ loaded-vocab-names array? ] unit-test
+[ t ] [ loaded-vocab-names [ vocab-words [ word? ] all? ] all? ] unit-test
 
 [ f ] [ gensym gensym = ] unit-test
 
index 8be802cde133e66916b55e8a664a3fd7e3e70b49..7b0f922e9822fe41cf9834c9897e2fb92ebdac4a 100644 (file)
@@ -67,7 +67,7 @@ PREDICATE: primitive < word "primitive" word-prop ;
 M: primitive definer drop \ PRIMITIVE: f ;
 M: primitive definition drop f ;
 
-: lookup-word ( name vocab -- word ) vocab-words at ;
+: lookup-word ( name vocab -- word ) vocab-words-assoc at ;
 
 : target-word ( word -- target )
     [ name>> ] [ vocabulary>> ] bi lookup-word ;
@@ -200,7 +200,7 @@ M: word reset-word
     [ gensym dup ] 2dip define-declared ;
 
 : reveal ( word -- )
-    dup [ name>> ] [ vocabulary>> ] bi dup vocab-words
+    dup [ name>> ] [ vocabulary>> ] bi dup vocab-words-assoc
     [ ] [ no-vocab ] ?if
     set-at ;
 
@@ -242,7 +242,7 @@ M: word set-where swap "loc" set-word-prop ;
 M: word forget*
     dup "forgotten" word-prop [ drop ] [
         [ subwords forget-all ]
-        [ [ name>> ] [ vocabulary>> vocab-words ] bi delete-at ]
+        [ [ name>> ] [ vocabulary>> vocab-words-assoc ] bi delete-at ]
         [ t "forgotten" set-word-prop ]
         tri
     ] if ;
index b45d331df7f398ad7862b564fcd2de956f0913f9..966d5bcabe385eefe5a347a94331ea777bc5c0d4 100644 (file)
@@ -20,7 +20,7 @@ PRIVATE>
     compact-gc '[ _ run ] profile most-recent-profile-data ;
 
 : find-benchmark-vocabs ( -- seq )
-    "benchmark" child-vocab-names
+    "benchmark" loaded-child-vocab-names
     [ find-vocab-root ] filter ;
 
 <PRIVATE
index 618f28b38faff7c543639154d4695e0459931893..d87f04d14c2fa4252c7b133c58af293e60e5d342 100644 (file)
@@ -65,7 +65,7 @@ TUPLE: x30 ;
 M: x30 g ;
 
 : my-classes ( -- seq )
-    "benchmark.dispatch1" words [ tuple-class? ] filter ;
+    "benchmark.dispatch1" vocab-words [ tuple-class? ] filter ;
 
 : a-bunch-of-objects ( -- seq )
     my-classes [ new ] map ;
index 9bb7d32b7b1f9d7420c236774fe12810465ed38d..e5834970c7d31e90995952a314ca9d564f5ee2ac 100644 (file)
@@ -65,7 +65,7 @@ TUPLE: x30 ;
 INSTANCE: x30 g\r
 \r
 : my-classes ( -- seq )\r
-    "benchmark.dispatch5" words [ tuple-class? ] filter ;\r
+    "benchmark.dispatch5" vocab-words [ tuple-class? ] filter ;\r
 \r
 : a-bunch-of-objects ( -- seq )\r
     my-classes [ new ] map ;\r
index c0fdc8c15eed18b0d18bcf3aefe60d63286d3bb4..1ef7f1666b98d12db3151ef7323273f1095a25d4 100644 (file)
@@ -83,7 +83,7 @@ PRIVATE>
     article-location fuel-eval-set-result ;
 
 : fuel-get-vocabs ( -- )
-    all-vocab-names fuel-eval-set-result ;
+    all-disk-vocab-names fuel-eval-set-result ;
 
 : fuel-get-vocabs/prefix ( prefix -- )
     get-vocabs/prefix fuel-eval-set-result ;
index a1a6bb2344365e5b20a404001b702a07d0ae5606..f06f3ee1333ccd7beee70c3b605f22194fd12e45 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2009 Jose Antonio Ortega Ruiz.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays assocs combinators combinators.short-circuit fry
-fuel.eval help help.crossref help.markup help.markup.private help.topics io
-io.streams.string kernel make namespaces parser prettyprint sequences summary
-help.vocabs vocabs vocabs.loader vocabs.hierarchy vocabs.metadata
-vocabs.parser words see listener sets ;
-FROM: vocabs.hierarchy => child-vocabs ;
+USING: accessors arrays assocs combinators
+combinators.short-circuit fry help help.crossref help.markup
+help.markup.private help.topics help.vocabs io io.streams.string
+kernel listener make namespaces parser prettyprint see sequences
+summary vocabs vocabs.hierarchy vocabs.metadata vocabs.parser
+words ;
 IN: fuel.help
 
 <PRIVATE
@@ -76,7 +76,7 @@ SYMBOL: describe-words
     ] { } assoc>map sift ;
 
 : fuel-vocab-children-help ( name -- element )
-    child-vocabs fuel-vocab-list ; inline
+    disk-vocabs-for-prefix fuel-vocab-list ; inline
 
 : fuel-vocab-describe-words ( name -- element )
     [ words. ] with-string-writer \ describe-words swap 2array ; inline
index 3c1752257cf5e48b36ed404eef7d9cf06e4b90c9..f7f3a724fbb7d1ed94c1c7e1baa513e258240532 100644 (file)
@@ -34,7 +34,7 @@ IN: fuel.xref
     [ drop-prefix nip empty? ] curry filter members ;
 
 MEMO: (vocab-words) ( name -- seq )
-    >vocab-link words [ name>> ] map ;
+    >vocab-link vocab-words [ name>> ] map ;
 
 : current-words ( -- seq )
     manifest get
@@ -53,7 +53,7 @@ PRIVATE>
 : apropos-xref ( str -- seq ) words-matching keys format-xrefs group-xrefs ;
 
 : vocab-xref ( vocab -- seq )
-    dup ".private" append [ words ] bi@ append
+    dup ".private" append [ vocab-words ] bi@ append
     format-xrefs group-xrefs ;
 
 : word-location ( word -- loc ) where get-loc ;
@@ -68,7 +68,7 @@ PRIVATE>
 
 : article-location ( name -- loc ) lookup-article loc>> get-loc ;
 
-: get-vocabs/prefix ( prefix -- seq ) all-vocab-names swap filter-prefix ;
+: get-vocabs/prefix ( prefix -- seq ) all-disk-vocab-names swap filter-prefix ;
 
 : get-vocabs-words/prefix ( prefix names/f -- seq )
     [ vocabs-words ] [ current-words ] if* natural-sort swap filter-prefix ;
index 2d33c0352026d90307fbd1dbea9087c65ab846b4..dee21564c2c077a8ea79a73b458b8af7ca8c042e 100644 (file)
@@ -1,13 +1,10 @@
 ! Copyright (C) 2007, 2008, 2011 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-
-USING: accessors alien arrays assocs classes
-classes.tuple.private combinators.short-circuit continuations
-fry hashtables io kernel kernel.private locals.backend make math
-math.private namespaces prettyprint quotations sequences
-sequences.deep shuffle slots.private splitting stack-checker
-vectors vocabs words words.alias ;
-
+USING: accessors arrays assocs classes classes.tuple.private
+combinators.short-circuit continuations fry io kernel
+kernel.private locals.backend make math math.private namespaces
+prettyprint quotations sequences sequences.deep slots.private
+splitting stack-checker vocabs words words.alias ;
 IN: lint
 
 <PRIVATE
@@ -314,10 +311,10 @@ PRIVATE>
     all-words run-lint dup lint. ;
 
 : lint-vocab ( vocab -- seq )
-    words run-lint dup lint. ;
+    vocab-words run-lint dup lint. ;
 
 : lint-vocabs ( prefix -- seq )
-    [ vocabs ] dip [ head? ] curry filter [ lint-vocab ] map ;
+    [ loaded-vocab-names ] dip [ head? ] curry filter [ lint-vocab ] map ;
 
 : lint-word ( word -- seq )
     1array run-lint dup lint. ;
index f5aa1c95caa43395ac73c3e7154ae69351553b9f..e711066fe64f8742484efc2135da09b24eee011d 100644 (file)
@@ -1,8 +1,7 @@
-USING: accessors assocs bson.constants combinators.short-circuit
-constructors continuations fry kernel mirrors mongodb.tuple.collection
-mongodb.tuple.state namespaces sequences words bson.writer combinators
-hashtables linked-assocs ;
-
+USING: accessors assocs bson.constants bson.writer combinators
+combinators.short-circuit constructors continuations fry
+hashtables kernel linked-assocs mirrors mongodb.tuple.collection
+mongodb.tuple.state namespaces sequences words ;
 IN: mongodb.tuple.persistent
 
 SYMBOLS: object-map ;
index 3d5038232b97e5cf246301ee9276b168b5df8a58..e439a0e3d1ebd8bdb3ab1033a1e67a508036904a 100644 (file)
@@ -29,7 +29,7 @@ M: readline-reader prompt.
     all-words [ name>> ] map! prefixed ;
 
 : prefixed-vocabs ( prefix -- vocabs )
-    all-vocabs-recursive filter-vocabs [ name>> ] map! prefixed ;
+    disk-vocabs-recursive filter-vocabs [ name>> ] map! prefixed ;
 
 : prefixed-colors ( prefix -- colors )
     named-colors prefixed ;
index cc6c9ee33f174d94c75883efefaaf9d633dee566..63abdfe308b12f25bd076e847febd4743588ddac 100644 (file)
@@ -131,7 +131,7 @@ M: lambda-word word-noise-factor
     ] tabular-output ;\r
 \r
 : vocab-noise-factor ( vocab -- factor )\r
-    words flatten-generics\r
+    vocab-words flatten-generics\r
     [ word-noise-factor dup 20 < [ drop 0 ] when ] map\r
     [ 0 ] [\r
         [ [ sum ] [ length 5 max ] bi /i ]\r
index 144dfc1c067f0cc0b0ac26f283eb45e99f68d993..a570c4e4d43a74f6df26936bc85389d821a745ae 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2010 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: combinators combinators.smart fry kernel lexer
-quotations sequences sequences.generalizations slots words ;
+USING: combinators combinators.smart fry kernel lexer quotations
+sequences sequences.generalizations slots words ;
 IN: slots.syntax
 
 SYNTAX: slots[
index 8acf8d17b6e70a9992d5154cdaaf1f55bb79ab4e..31fd6c9a55be23f42e57733f3bdff3dec330b554 100644 (file)
@@ -1,12 +1,11 @@
 ! Copyright (C) 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays assocs combinators.short-circuit
-continuations fry kernel namespaces quotations sequences sets
-generalizations sequences.generalizations slots locals.types
-splitting math locals.rewrite.closures generic words combinators
-locals smalltalk.ast smalltalk.compiler.lexenv
-smalltalk.compiler.assignment smalltalk.compiler.return
-smalltalk.selectors smalltalk.classes ;
+USING: accessors arrays assocs combinators continuations fry
+generic kernel locals locals.types math quotations sequences
+sequences.generalizations sets smalltalk.ast smalltalk.classes
+smalltalk.compiler.assignment smalltalk.compiler.lexenv
+smalltalk.compiler.return smalltalk.selectors splitting vocabs
+words ;
 IN: smalltalk.compiler
 
 GENERIC: compile-ast ( lexenv ast -- quot )