]> gitweb.factorcode.org Git - factor.git/commitdiff
vocabs.metadata: rename vocab-file-contents to vocab-file-lines.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 9 Feb 2018 18:19:33 +0000 (10:19 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 9 Feb 2018 18:19:33 +0000 (10:19 -0800)
basis/tools/deploy/config/editor/editor.factor
basis/vocabs/cache/cache.factor
basis/vocabs/metadata/metadata-docs.factor
basis/vocabs/metadata/metadata.factor

index e10d20e8b3828ee567f6e10a21d40b7a9a0f302d..f4ef9cc2df4e5fe950b3b49cbca3ad2f77e1e381 100644 (file)
@@ -10,12 +10,12 @@ IN: tools.deploy.config.editor
 
 : deploy-config ( vocab -- assoc )
     dup default-config swap
-    dup deploy-config-path vocab-file-contents
+    dup deploy-config-path vocab-file-lines
     parse-fresh [ first assoc-union ] unless-empty ;
 
 : set-deploy-config ( assoc vocab -- )
     [ [ unparse-use ] without-limits string-lines ] dip
-    dup deploy-config-path set-vocab-file-contents ;
+    dup deploy-config-path set-vocab-file-lines ;
 
 : set-deploy-flag ( value key vocab -- )
     [ deploy-config [ set-at ] keep ] keep set-deploy-config ;
index 3e13393058d5ec0d5223708abb2db24ce5cfb96e..e1ff37984be2ecc216f8f03fedde3b9f5e22de65 100644 (file)
@@ -9,7 +9,7 @@ IN: vocabs.cache
     vocab-name
     [ root-cache get delete-at ]
     [
-        \ vocab-file-contents "memoize" word-prop swap
+        \ vocab-file-lines "memoize" word-prop swap
         '[ drop first vocab-name _ = ] assoc-reject! drop
     ] bi
     \ all-disk-vocabs-recursive reset-memoized
index 0c9b90bfb0c18122f539aa1c47a7f84eb8dd2537..3fe93916b6dae077f898f63441b33f6f0bbb5df9 100644 (file)
@@ -32,18 +32,18 @@ ARTICLE: "vocabs.metadata" "Vocabulary metadata"
 }
 "Getting and setting arbitrary vocabulary metadata:"
 { $subsections
-    vocab-file-contents
-    set-vocab-file-contents
+    vocab-file-lines
+    set-vocab-file-lines
 } ;
 
 ABOUT: "vocabs.metadata"
 
-HELP: vocab-file-contents
-{ $values { "vocab" "a vocabulary specifier" } { "name" string } { "seq" { $maybe "a sequence of lines" } } }
-{ $description "Outputs the contents of the file named " { $snippet "name" } " from the vocabulary's directory, or " { $link f } " if the file does not exist." } ;
+HELP: vocab-file-lines
+{ $values { "vocab" "a vocabulary specifier" } { "name" string } { "lines" { $maybe { $sequence "lines" } } } }
+{ $description "Outputs the lines of the file named " { $snippet "name" } " from the vocabulary's directory, or " { $link f } " if the file does not exist." } ;
 
-HELP: set-vocab-file-contents
-{ $values { "seq" "a sequence of lines" } { "vocab" "a vocabulary specifier" } { "name" string } }
+HELP: set-vocab-file-lines
+{ $values { "lines" { $sequence "lines" } } { "vocab" "a vocabulary specifier" } { "name" string } }
 { $description "Stores a sequence of lines to the file named " { $snippet "name" } " from the vocabulary's directory." } ;
 
 HELP: vocab-summary
index c7bc010aec4de0bf08ee50c4762dcef58288b87c..b20e055f83f894bfcaf0fe73b1aae330e085fcf8 100644 (file)
@@ -10,7 +10,7 @@ IN: vocabs.metadata
 : check-vocab ( vocab -- vocab )
     dup find-vocab-root [ no-vocab ] unless ;
 
-MEMO: vocab-file-contents ( vocab name -- seq )
+MEMO: vocab-file-lines ( vocab name -- lines/f )
     vocab-append-path dup [
         dup exists? [
             utf8 file-lines harvest
@@ -19,23 +19,23 @@ MEMO: vocab-file-contents ( vocab name -- seq )
         ] if
     ] when ;
 
-: set-vocab-file-contents ( seq vocab name -- )
+: set-vocab-file-lines ( lines vocab name -- )
     dupd vocab-append-path [
         swap [ ?delete-file ] [ swap utf8 set-file-lines ] if-empty
-        \ vocab-file-contents reset-memoized
+        \ vocab-file-lines reset-memoized
     ] [ vocab-name no-vocab ] ?if ;
 
 : vocab-resources-path ( vocab -- string )
     vocab-dir "resources.txt" append-path ;
 
 : vocab-resources ( vocab -- patterns )
-    dup vocab-resources-path vocab-file-contents ;
+    dup vocab-resources-path vocab-file-lines ;
 
 : vocab-summary-path ( vocab -- string )
     vocab-dir "summary.txt" append-path ;
 
 : vocab-summary ( vocab -- summary )
-    dup dup vocab-summary-path vocab-file-contents
+    dup dup vocab-summary-path vocab-file-lines
     [
         vocab-name " vocabulary" append
     ] [
@@ -56,13 +56,13 @@ M: vocab-link summary vocab-summary ;
     vocab-dir "tags.txt" append-path ;
 
 : vocab-tags ( vocab -- tags )
-    dup vocab-tags-path vocab-file-contents ;
+    dup vocab-tags-path vocab-file-lines ;
 
 : vocab-authors-path ( vocab -- string )
     vocab-dir "authors.txt" append-path ;
 
 : vocab-authors ( vocab -- authors )
-    dup vocab-authors-path vocab-file-contents ;
+    dup vocab-authors-path vocab-file-lines ;
 
 : vocab-platforms-path ( vocab -- string )
     vocab-dir "platforms.txt" append-path ;
@@ -70,7 +70,7 @@ M: vocab-link summary vocab-summary ;
 ERROR: bad-platform name ;
 
 : vocab-platforms ( vocab -- platforms )
-    dup vocab-platforms-path vocab-file-contents
+    dup vocab-platforms-path vocab-file-lines
     [ dup "system" lookup-word [ ] [ bad-platform ] ?if ] map ;
 
 : supported-platform? ( platforms -- ? )