]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge qualified, alias, symbols, constants into core
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 18 Dec 2008 00:10:01 +0000 (18:10 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 18 Dec 2008 00:10:01 +0000 (18:10 -0600)
154 files changed:
basis/alias/alias-docs.factor [deleted file]
basis/alias/alias.factor [deleted file]
basis/alias/authors.txt [deleted file]
basis/alias/summary.txt [deleted file]
basis/alien/syntax/syntax.factor
basis/bootstrap/stage2.factor
basis/checksums/md5/md5.factor
basis/checksums/sha1/sha1.factor
basis/checksums/sha2/sha2.factor
basis/compiler/cfg/intrinsics/intrinsics.factor
basis/compiler/tree/debugger/debugger.factor
basis/compiler/tree/propagation/propagation-tests.factor
basis/concurrency/distributed/distributed.factor
basis/constants/constants.factor [deleted file]
basis/cpu/x86/assembler/syntax/syntax.factor
basis/debugger/debugger.factor
basis/delegate/delegate.factor
basis/functors/functors.factor
basis/furnace/chloe-tags/chloe-tags.factor
basis/help/help.factor
basis/help/lint/lint.factor
basis/help/markup/markup.factor
basis/help/syntax/syntax.factor
basis/http/http.factor
basis/io/backend/unix/unix.factor
basis/io/backend/windows/nt/nt.factor
basis/io/files/windows/windows.factor
basis/io/pipes/unix/unix.factor
basis/io/sockets/secure/secure.factor
basis/io/sockets/sockets.factor
basis/io/sockets/unix/unix.factor
basis/lcs/diff2html/diff2html.factor
basis/listener/listener.factor
basis/locals/parser/parser.factor
basis/logging/insomniac/insomniac.factor
basis/logging/logging.factor
basis/opengl/gl/extensions/extensions.factor
basis/opengl/gl/gl.factor
basis/openssl/libssl/libssl.factor
basis/persistent/deques/deques.factor
basis/prettyprint/prettyprint.factor
basis/qualified/authors.txt [deleted file]
basis/qualified/qualified-docs.factor [deleted file]
basis/qualified/qualified-tests.factor [deleted file]
basis/qualified/qualified.factor [deleted file]
basis/qualified/summary.txt [deleted file]
basis/qualified/tags.txt [deleted file]
basis/regexp/classes/classes.factor
basis/regexp/parser/parser.factor
basis/symbols/authors.txt [deleted file]
basis/symbols/summary.txt [deleted file]
basis/symbols/symbols-docs.factor [deleted file]
basis/symbols/symbols-tests.factor [deleted file]
basis/symbols/symbols.factor [deleted file]
basis/symbols/tags.txt [deleted file]
basis/tools/deploy/macosx/macosx.factor
basis/tools/deploy/shaker/shaker.factor
basis/tools/disassembler/gdb/gdb.factor
basis/tools/files/files.factor
basis/tools/vocabs/browser/browser.factor
basis/ui/gadgets/theme/theme.factor
basis/ui/gestures/gestures.factor
basis/ui/tools/interactor/interactor.factor
basis/ui/tools/operations/operations.factor
basis/ui/windows/windows.factor
basis/ui/x11/x11.factor
basis/unix/bsd/bsd.factor
basis/unix/bsd/freebsd/freebsd.factor
basis/unix/bsd/macosx/macosx.factor
basis/unix/bsd/netbsd/netbsd.factor
basis/unix/bsd/openbsd/openbsd.factor
basis/unix/getfsstat/freebsd/freebsd.factor
basis/unix/getfsstat/macosx/macosx.factor
basis/unix/getfsstat/netbsd/netbsd.factor
basis/unix/getfsstat/openbsd/openbsd.factor
basis/unix/groups/groups.factor
basis/unix/kqueue/freebsd/freebsd.factor
basis/unix/kqueue/kqueue.factor
basis/unix/kqueue/macosx/macosx.factor
basis/unix/kqueue/netbsd/netbsd.factor
basis/unix/kqueue/openbsd/openbsd.factor
basis/unix/linux/epoll/epoll.factor
basis/unix/linux/inotify/inotify.factor
basis/unix/linux/linux.factor
basis/unix/process/process.factor
basis/unix/solaris/solaris.factor
basis/unix/stat/stat.factor
basis/unix/statfs/freebsd/freebsd.factor
basis/unix/statfs/macosx/macosx.factor
basis/unix/statfs/openbsd/openbsd.factor
basis/unix/statvfs/freebsd/freebsd.factor
basis/unix/statvfs/linux/linux.factor
basis/unix/statvfs/macosx/macosx.factor
basis/unix/statvfs/netbsd/netbsd.factor
basis/unix/statvfs/openbsd/openbsd.factor
basis/unix/unix.factor
basis/unix/utmpx/utmpx.factor
basis/windows/advapi32/advapi32.factor
basis/windows/dinput/constants/constants.factor
basis/windows/dinput/dinput.factor
basis/windows/errors/errors.factor
basis/windows/gdi32/gdi32.factor
basis/windows/kernel32/kernel32.factor
basis/windows/messages/messages.factor
basis/windows/shell32/shell32.factor
basis/windows/user32/user32.factor
basis/windows/winsock/winsock.factor
basis/x11/xlib/xlib.factor
basis/xmode/marker/state/state.factor
core/bootstrap/syntax.factor
core/classes/classes.factor
core/classes/singleton/singleton-docs.factor
core/compiler/errors/errors-docs.factor
core/effects/effects.factor
core/math/order/order-docs.factor
core/parser/parser-docs.factor
core/parser/parser-tests.factor
core/parser/parser.factor
core/syntax/syntax-docs.factor
core/syntax/syntax.factor
core/vocabs/parser/authors.txt [new file with mode: 0644]
core/vocabs/parser/parser-docs.factor [new file with mode: 0644]
core/vocabs/parser/parser.factor [new file with mode: 0644]
core/words/alias/alias-docs.factor [new file with mode: 0644]
core/words/alias/alias.factor [new file with mode: 0644]
core/words/alias/authors.txt [new file with mode: 0644]
core/words/alias/summary.txt [new file with mode: 0644]
core/words/constant/constant.factor [new file with mode: 0644]
core/words/symbol/symbol-docs.factor [new file with mode: 0644]
core/words/symbol/symbol.factor [new file with mode: 0644]
core/words/words-docs.factor
core/words/words.factor
extra/advice/advice.factor
extra/boolean-expr/boolean-expr.factor
extra/cfdg/cfdg.factor
extra/crypto/passwd-md5/passwd-md5.factor
extra/dns/dns.factor
extra/game-input/dinput/dinput.factor
extra/game-input/game-input.factor
extra/inverse/inverse.factor
extra/irc/client/client-tests.factor
extra/irc/client/client.factor
extra/irc/messages/messages-tests.factor
extra/irc/messages/messages.factor
extra/irc/ui/ui.factor
extra/koszul/koszul-tests.factor
extra/koszul/koszul.factor
extra/mason/release/tidy/tidy.factor
extra/math/blas/matrices/matrices.factor
extra/multi-methods/multi-methods.factor
extra/newfx/newfx.factor
extra/tar/tar.factor
extra/usa-cities/usa-cities.factor
extra/webkit-demo/deploy.factor

diff --git a/basis/alias/alias-docs.factor b/basis/alias/alias-docs.factor
deleted file mode 100644 (file)
index 3f2eee6..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel words help.markup help.syntax ;
-IN: alias
-
-HELP: ALIAS:
-{ $syntax "ALIAS: new-word existing-word" }
-{ $values { "new-word" word } { "existing-word" word } }
-{ $description "Creates a " { $snippet "new" } " inlined word that calls the " { $snippet "existing" } " word." }
-{ $examples
-    { $example "USING: alias prettyprint sequences ;"
-               "IN: alias.test"
-               "ALIAS: sequence-nth nth"
-               "0 { 10 20 30 } sequence-nth ."
-               "10"
-    }
-} ;
-
-ARTICLE: "alias" "Word aliasing"
-"The " { $vocab-link "alias" } " vocabulary implements a way to make many different names for the same word. Although creating new names for words is generally frowned upon, aliases are useful for the Win32 API and other cases where words need to be renamed for symmetry." $nl 
-"Make a new word that aliases another word:"
-{ $subsection define-alias }
-"Make an alias at parse-time:"
-{ $subsection POSTPONE: ALIAS: } ;
-
-ABOUT: "alias"
diff --git a/basis/alias/alias.factor b/basis/alias/alias.factor
deleted file mode 100644 (file)
index 7991452..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.\r
-! See http://factorcode.org/license.txt for BSD license.\r
-USING: accessors words quotations kernel effects sequences\r
-parser definitions ;\r
-IN: alias\r
-\r
-PREDICATE: alias < word "alias" word-prop ;\r
-\r
-: define-alias ( new old -- )\r
-    [ [ 1quotation ] [ stack-effect ] bi define-inline ]\r
-    [ drop t "alias" set-word-prop ] 2bi ;\r
-\r
-: ALIAS: CREATE-WORD scan-word define-alias ; parsing\r
-\r
-M: alias reset-word\r
-    [ call-next-method ] [ f "alias" set-word-prop ] bi ;\r
-\r
-M: alias stack-effect\r
-    def>> first stack-effect ;\r
diff --git a/basis/alias/authors.txt b/basis/alias/authors.txt
deleted file mode 100644 (file)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/alias/summary.txt b/basis/alias/summary.txt
deleted file mode 100644 (file)
index 15690a7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Defining multiple words with the same name
index 15d82884f9c82e6fa18bd4e3511a94471efe1f35..a02d2f3cb46e66de39a27d216d4da805e8800c26 100644 (file)
@@ -4,7 +4,7 @@ USING: accessors arrays alien alien.c-types alien.structs
 alien.arrays alien.strings kernel math namespaces parser
 sequences words quotations math.parser splitting grouping
 effects assocs combinators lexer strings.parser alien.parser 
-fry ;
+fry vocabs.parser ;
 IN: alien.syntax
 
 : DLL" lexer get skip-blank parse-string dlopen parsed ; parsing
index d2b522581d8f9eef05ca3d8191b60cc27163f204..f0622726f537ebd64d49f6d79aa329f6eb19921e 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors init namespaces words io kernel.private math
-memory continuations kernel io.files io.pathnames io.backend
-system parser vocabs sequences vocabs.loader combinators
-splitting source-files strings definitions assocs
-compiler.errors compiler.units math.parser generic sets
-command-line ;
+USING: accessors init namespaces words words.symbol io
+kernel.private math memory continuations kernel io.files
+io.pathnames io.backend system parser vocabs sequences
+vocabs.loader combinators splitting source-files strings
+definitions assocs compiler.errors compiler.units math.parser
+generic sets command-line ;
 IN: bootstrap.stage2
 
 SYMBOL: core-bootstrap-time
index d919b0e31305b366b1b05cb6691429d9cfc74856..7931828217f941f20b4b3724bd9619c563578a81 100644 (file)
@@ -3,7 +3,7 @@
 USING: kernel io io.binary io.files io.streams.byte-array math
 math.functions math.parser namespaces splitting grouping strings
 sequences byte-arrays locals sequences.private
-io.encodings.binary symbols math.bitwise checksums
+io.encodings.binary math.bitwise checksums
 checksums.common checksums.stream ;
 IN: checksums.md5
 
index 6cdc9270aa7262b8057db66b94007975e359f2f7..ede8a8f6532cba1585fb0b4bfd5d327518fb93c6 100644 (file)
@@ -3,7 +3,7 @@
 USING: arrays combinators kernel io io.encodings.binary io.files
 io.streams.byte-array math.vectors strings sequences namespaces
 make math parser sequences assocs grouping vectors io.binary
-hashtables symbols math.bitwise checksums checksums.common
+hashtables math.bitwise checksums checksums.common
 checksums.stream ;
 IN: checksums.sha1
 
index beb657bd3e1ab5b0b332ca64805e0f85959ebd7e..898a695b34d5ce3308ec1fa19ba47db105ea9fd2 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel splitting grouping math sequences namespaces make
-io.binary symbols math.bitwise checksums checksums.common
+io.binary math.bitwise checksums checksums.common
 sbufs strings ;
 IN: checksums.sha2
 
index 5f753308655f96a8aa1e108057b89fe8a90b695b..3d0a7bec9c39a50667b4d4695bb884c3d652646b 100644 (file)
@@ -1,7 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: qualified words sequences kernel combinators
-cpu.architecture
+USING: words sequences kernel combinators cpu.architecture
 compiler.cfg.hats
 compiler.cfg.instructions
 compiler.cfg.intrinsics.alien
index e75e7f60469af5bf79589e34d418917a04ee4b71..213a8357e646266035c811f9881d47699e06884c 100644 (file)
@@ -4,7 +4,7 @@ USING: kernel assocs match fry accessors namespaces make effects
 sequences sequences.private quotations generic macros arrays
 prettyprint prettyprint.backend prettyprint.custom
 prettyprint.sections math words combinators
-combinators.short-circuit io sorting hints qualified
+combinators.short-circuit io sorting hints
 compiler.tree
 compiler.tree.recursive
 compiler.tree.normalization
index b324dc0fc2ee93fcba0dfb32d611f980bb98fbc9..87152a8e2bcbe7dda771537670ff23ef61fab6c2 100644 (file)
@@ -641,7 +641,7 @@ MIXIN: empty-mixin
 ] unit-test
 
 [ V{ POSTPONE: f } ] [
-    [ { word object } declare eq? ] final-classes
+    [ { word object } declare equal? ] final-classes
 ] unit-test
 
 ! [ V{ string } ] [
index 99ad239011ad1e9545c6bfefcb450b11495ede6d..ca1c5762f68378cdebb924d72bf2a6862eb21945 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: serialize sequences concurrency.messaging threads io
 io.servers.connection io.encodings.binary
-qualified arrays namespaces kernel accessors ;
+arrays namespaces kernel accessors ;
 FROM: io.sockets => host-name <inet> with-client ;
 IN: concurrency.distributed
 
diff --git a/basis/constants/constants.factor b/basis/constants/constants.factor
deleted file mode 100644 (file)
index bd2b3f1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: parser kernel words ;
-IN: constants
-
-: CONSTANT:
-    CREATE scan-object [ ] curry (( -- value ))
-    define-inline ; parsing
index 6ddec4af07e87ff914a9339b47c8ed68f2677058..343850f9e639dc47ffb8bb59947cb1e868721de9 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel words sequences lexer parser fry ;
+USING: kernel words words.symbol sequences lexer parser fry ;
 IN: cpu.x86.assembler.syntax
 
 : define-register ( name num size -- )
index 885e2e303c39a8312f5645795f653c73f8f55606..1440e7ca5da422754efae1ffc6d2e517d385cf3d 100644 (file)
@@ -9,7 +9,7 @@ combinators generic.math classes.builtin classes compiler.units
 generic.standard vocabs init kernel.private io.encodings
 accessors math.order destructors source-files parser
 classes.tuple.parser effects.parser lexer compiler.errors
-generic.parser strings.parser ;
+generic.parser strings.parser vocabs.parser ;
 IN: debugger
 
 GENERIC: error. ( error -- )
index 57f9b35c96373bff90e534fd3023fbab35b06dbf..4da22441143e5a3a0766b83a0b420b74f8bf6285 100644 (file)
@@ -2,7 +2,8 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors parser generic kernel classes classes.tuple
 words slots assocs sequences arrays vectors definitions
-math hashtables sets generalizations namespaces make ;
+math hashtables sets generalizations namespaces make
+words.symbol ;
 IN: delegate
 
 : protocol-words ( protocol -- words )
index 2029c0cf2526e6672cb5dab84a26443834a07f07..28bedc836020b27a9fa80b963ab9cd7979764afe 100644 (file)
@@ -3,7 +3,8 @@
 USING: kernel quotations classes.tuple make combinators generic
 words interpolate namespaces sequences io.streams.string fry
 classes.mixin effects lexer parser classes.tuple.parser
-effects.parser locals.types locals.parser locals.rewrite.closures ;
+effects.parser locals.types locals.parser
+locals.rewrite.closures vocabs.parser ;
 IN: functors
 
 : scan-param ( -- obj )
index 8ab70ded7b1c7d1ae4016d151bbed48e5635cdd2..f500acd7ab60ee5ef07cbfec9ed1c40851b9b7bf 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays kernel combinators assocs
 namespaces sequences splitting words
-fry urls multiline present qualified
+fry urls multiline present
 xml
 xml.data
 xml.entities
index 5d12438e0d4b1bdf459c0e94b1e4c29355ea295c..cd80a73dad59a3309a94a74ff5879bd231c5523d 100644 (file)
@@ -1,10 +1,11 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays io io.styles kernel namespaces make
-parser prettyprint sequences words assocs definitions generic
-quotations effects slots continuations classes.tuple debugger
-combinators vocabs help.stylesheet help.topics help.crossref
-help.markup sorting classes vocabs.loader ;
+parser prettyprint sequences words words.symbol assocs
+definitions generic quotations effects slots continuations
+classes.tuple debugger combinators vocabs help.stylesheet
+help.topics help.crossref help.markup sorting classes
+vocabs.loader ;
 IN: help
 
 GENERIC: word-help* ( word -- content )
index d5729f218be20b7235c47ad4b48ec1d7df888eaf..9d4de09a8715c1cc9f7552cf470fc0cb9cef956d 100644 (file)
@@ -5,7 +5,8 @@ help.topics words strings classes tools.vocabs namespaces make
 io io.streams.string prettyprint definitions arrays vectors
 combinators combinators.short-circuit splitting debugger
 hashtables sorting effects vocabs vocabs.loader assocs editors
-continuations classes.predicate macros math sets eval ;
+continuations classes.predicate macros math sets eval
+vocabs.parser words.symbol ;
 IN: help.lint
 
 : check-example ( element -- )
index a7501dc242615256f9d926c04a7930e7d4ecfc08..bf933cd9f12008335ab84d6972b77812cd7f71ea 100644 (file)
@@ -3,8 +3,7 @@
 USING: accessors arrays definitions generic io kernel assocs
 hashtables namespaces make parser prettyprint sequences strings
 io.styles vectors words math sorting splitting classes slots
-vocabs help.stylesheet help.topics vocabs.loader alias
-quotations ;
+vocabs help.stylesheet help.topics vocabs.loader quotations ;
 IN: help.markup
 
 ! Simple markup language.
index 9a372174ba581d4f371111a56dfcfd3f79319f82..9f98ba6d8d607949dcef701a3a758ef9d74a5fbd 100644 (file)
@@ -1,7 +1,8 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays kernel parser sequences words help
-help.topics namespaces vocabs definitions compiler.units ;
+help.topics namespaces vocabs definitions compiler.units
+vocabs.parser ;
 IN: help.syntax
 
 : HELP:
index bbb0335ae43a7126617a4b947899e4d733329d92..0aeb771c11ad2bbb1c8740054ea3ce2c5989920c 100644 (file)
@@ -8,7 +8,7 @@ calendar.format present urls
 io io.encodings io.encodings.iana io.encodings.binary
 io.encodings.8-bit
 
-unicode.case unicode.categories qualified
+unicode.case unicode.categories
 
 http.parsers ;
 
index e8ace90d73fd6c8f759fb29de2a7438da4e40a18..e25550590f265b58903b4203598cbf6c015b990b 100644 (file)
@@ -3,7 +3,7 @@
 USING: alien alien.c-types alien.syntax generic assocs kernel
 kernel.private math io.ports sequences strings sbufs threads
 unix vectors io.buffers io.backend io.encodings math.parser
-continuations system libc qualified namespaces make io.timeouts
+continuations system libc namespaces make io.timeouts
 io.encodings.utf8 destructors accessors summary combinators
 locals unix.time fry io.backend.unix.multiplexers ;
 QUALIFIED: io
index b8887debed98a6d8ef8ccd776aa32909ff3b154a..493a735f7f27d081c4141d871d2dc150bf18449d 100755 (executable)
@@ -3,7 +3,7 @@ continuations destructors io io.backend io.ports io.timeouts
 io.backend.windows io.files.windows io.files.windows.nt io.files
 io.pathnames io.buffers io.streams.c libc kernel math namespaces
 sequences threads windows windows.errors windows.kernel32
-strings splitting qualified ascii system accessors locals ;
+strings splitting ascii system accessors locals ;
 QUALIFIED: windows.winsock
 IN: io.backend.windows.nt
 
index 1a1ffe0dc7858f592a68c83122397418d666cf85..842f1ec84cf5b1d34f6eeea990f40f324541b529 100755 (executable)
@@ -4,7 +4,7 @@ USING: alien.c-types io.binary io.backend io.files
 io.files.types io.buffers io.encodings.utf16n io.ports
 io.backend.windows kernel math splitting fry alien.strings
 windows windows.kernel32 windows.time calendar combinators
-math.functions sequences namespaces make words symbols system
+math.functions sequences namespaces make words system
 destructors accessors math.bitwise continuations windows.errors
 arrays byte-arrays generalizations ;
 IN: io.files.windows
index acf8b787edd4c2fbfcf132344e39a5cff24ef02e..6a0015084b63851e1e985412b75914dd82b11f0b 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: system kernel unix math sequences qualified
+USING: system kernel unix math sequences
 io.backend.unix io.ports specialized-arrays.int accessors ;
 IN: io.pipes.unix
 QUALIFIED: io.pipes
index c0d70fc0479e7eb1d71a3092ffbdccef0245fa30..c4a1475f4871b5c76cada33ddfafc1b18cb078ff 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel symbols namespaces continuations
+USING: accessors kernel namespaces continuations
 destructors io debugger io.sockets sequences summary calendar
 delegate system vocabs.loader combinators present ;
 IN: io.sockets.secure
index 8268030ace534bc4531d95a3ee49208e98ac6192..0ef485b74cca7840e2ec79ecab79f49f62718c88 100644 (file)
@@ -6,7 +6,7 @@ sequences arrays io.encodings io.ports io.streams.duplex
 io.encodings.ascii alien.strings io.binary accessors destructors
 classes byte-arrays system combinators parser
 alien.c-types math.parser splitting grouping math assocs summary
-system vocabs.loader combinators present fry ;
+system vocabs.loader combinators present fry vocabs.parser ;
 IN: io.sockets
 
 << {
index 1dc92d7d08af040dee214ab21f5d5bd6740b87b5..f209df58620654fcfb325fedaa9f8725b918e510 100644 (file)
@@ -5,7 +5,7 @@ namespaces threads sequences byte-arrays io.ports
 io.binary io.backend.unix io.streams.duplex
 io.backend io.ports io.pathnames io.files.private
 io.encodings.utf8 math.parser continuations libc combinators
-system accessors qualified destructors unix locals init ;
+system accessors destructors unix locals init ;
 
 EXCLUDE: io => read write close ;
 EXCLUDE: io.sockets => accept ;
index b92eeb12502ac8f6c0962581418ad0e750145488..ebbb0f3786ca496fe012076a1e0d389af417c468 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
-USING: lcs html.elements kernel qualified ;
+USING: lcs html.elements kernel ;
 FROM: accessors => item>> ;
 FROM: io => write ;
 FROM: sequences => each if-empty ;
index f60403055e563cbad7ee910f30e0a447b972c963..88a90b72e21f92bd3c45456a8adca6e886ee347b 100644 (file)
@@ -4,7 +4,7 @@ USING: arrays hashtables io kernel math math.parser memory
 namespaces parser lexer sequences strings io.styles
 vectors words generic system combinators continuations debugger
 definitions compiler.units accessors colors prettyprint fry
-sets ;
+sets vocabs.parser ;
 IN: listener
 
 GENERIC: stream-read-quot ( stream -- quot/f )
index e6ab6c003c700d8a572561cfe5dbd99e95e026e0..c5b34556bcf9bce20faa3005729667fefb8fe4ca 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors arrays combinators effects.parser
 generic.parser kernel lexer locals.errors
 locals.rewrite.closures locals.types make namespaces parser
-quotations sequences splitting words ;
+quotations sequences splitting words vocabs.parser ;
 IN: locals.parser
 
 : make-local ( name -- word )
index 7c1db5b7c0ca85cbddc3db4b7c830e47466e5c50..91baae631f507dfdeea5f92fac3c954e3d1762cd 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.\r
 USING: logging.analysis logging.server logging smtp kernel\r
 io.files io.streams.string namespaces make alarms assocs\r
-io.encodings.utf8 accessors calendar sequences qualified ;\r
+io.encodings.utf8 accessors calendar sequences ;\r
 QUALIFIED: io.sockets\r
 IN: logging.insomniac\r
 \r
index 47de8805598411d4423597c7b38089b5ad5f6c65..fb6b32899078dfc67d8736bf516a1c3859241390 100644 (file)
@@ -4,7 +4,7 @@ USING: logging.server sequences namespaces concurrency.messaging
 words kernel arrays shuffle tools.annotations\r
 prettyprint.config prettyprint debugger io.streams.string\r
 splitting continuations effects generalizations parser strings\r
-quotations fry symbols accessors ;\r
+quotations fry accessors ;\r
 IN: logging\r
 \r
 SYMBOLS: DEBUG NOTICE WARNING ERROR CRITICAL ;\r
index ea37829d0ee13537cbf78a8993b602a4cfe2546e..fb2ddfaf3e411498e22f449a7fb13d98d5e9c74b 100644 (file)
@@ -1,6 +1,6 @@
 USING: alien alien.syntax alien.parser combinators
 kernel parser sequences system words namespaces hashtables init
-math arrays assocs continuations lexer fry locals ;
+math arrays assocs continuations lexer fry locals vocabs.parser ;
 IN: opengl.gl.extensions
 
 ERROR: unknown-gl-platform ;
index a7337da353fb9c8eb6ef372083737be812394bd6..c32f62bf33d1815e1fd5ec4420906bdaf74a3f9c 100644 (file)
@@ -4,7 +4,7 @@
 ! This file is based on the gl.h that comes with xorg-x11 6.8.2
 
 USING: alien alien.syntax combinators kernel parser sequences
-system words opengl.gl.extensions alias constants ;
+system words opengl.gl.extensions ;
 
 IN: opengl.gl
 
index b8f897463ab32c3e1b7731f2171bcd02bc976ef5..e512e3134c66e644de062a9e8826fc1c02c2ab48 100644 (file)
@@ -2,8 +2,7 @@
 ! Portions copyright (C) 2008 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.syntax combinators kernel system namespaces
-assocs parser lexer sequences words quotations math.bitwise
-alias constants ;
+assocs parser lexer sequences words quotations math.bitwise ;
 
 IN: openssl.libssl
 
index 83c4a196d90c8e779d5e6c528e7c7aa1027d7188..657f7ce56ad42f128addd1c34df39aa5aa751c00 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyback (C) 2008 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel accessors math qualified ;
+USING: kernel accessors math ;
 QUALIFIED: sequences
 IN: persistent.deques
 
index 6b49c4a35a570bc59acaf8886f8dc10e1bb39e88..b3800babe8fdb3a4ca76038b87931d4db07710af 100644 (file)
@@ -2,13 +2,13 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays generic generic.standard assocs io kernel math
 namespaces make sequences strings io.styles io.streams.string
-vectors words prettyprint.backend prettyprint.custom
+vectors words words.symbol prettyprint.backend prettyprint.custom
 prettyprint.sections prettyprint.config sorting splitting
 grouping math.parser vocabs definitions effects classes.builtin
 classes.tuple io.pathnames classes continuations hashtables
 classes.mixin classes.union classes.intersection
 classes.predicate classes.singleton combinators quotations sets
-accessors colors parser summary ;
+accessors colors parser summary vocabs.parser ;
 IN: prettyprint
 
 : make-pprint ( obj quot -- block in use )
@@ -357,12 +357,12 @@ M: builtin-class see-class*
     ] when drop ;
 
 M: word see
-    dup see-class
-    dup class? over symbol? not and [
-        nl
-    ] when
-    dup [ class? ] [ symbol? ] bi and
-    [ drop ] [ call-next-method ] if ;
+    [ see-class ]
+    [ [ class? ] [ symbol? not ] bi and [ nl ] when ]
+    [
+        dup [ class? ] [ symbol? ] bi and
+        [ drop ] [ call-next-method ] if
+    ] tri ;
 
 : see-all ( seq -- )
     natural-sort [ nl ] [ see ] interleave ;
diff --git a/basis/qualified/authors.txt b/basis/qualified/authors.txt
deleted file mode 100644 (file)
index f990dd0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Daniel Ehrenberg
diff --git a/basis/qualified/qualified-docs.factor b/basis/qualified/qualified-docs.factor
deleted file mode 100644 (file)
index 828d811..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-USING: help.markup help.syntax ;
-IN: qualified
-
-HELP: QUALIFIED:
-{ $syntax "QUALIFIED: vocab" }
-{ $description "Similar to " { $link POSTPONE: USE: } " but loads vocabulary with prefix." }
-{ $examples { $example
-    "USING: prettyprint qualified ;"
-    "QUALIFIED: math"
-    "1 2 math:+ ." "3"
-} } ;
-
-HELP: QUALIFIED-WITH:
-{ $syntax "QUALIFIED-WITH: vocab word-prefix" }
-{ $description "Works like " { $link POSTPONE: QUALIFIED: } " but uses " { $snippet "word-prefix" } " as prefix." }
-{ $examples { $code
-    "USING: prettyprint qualified ;"
-    "QUALIFIED-WITH: math m"
-    "1 2 m:+ ."
-    "3"
-} } ;
-
-HELP: FROM:
-{ $syntax "FROM: vocab => words ... ;" }
-{ $description "Imports " { $snippet "words" } " from " { $snippet "vocab" } "." }
-{ $examples { $code
-    "FROM: math.parser => bin> hex> ; ! imports only bin> and hex>" } } ;
-
-HELP: EXCLUDE:
-{ $syntax "EXCLUDE: vocab => words ... ;" }
-{ $description "Imports everything from " { $snippet "vocab" } " excluding " { $snippet "words" } "." }
-{ $examples { $code
-    "EXCLUDE: math.parser => bin> hex> ; ! imports everything but bin> and hex>" } } ;
-
-HELP: RENAME:
-{ $syntax "RENAME: word vocab => newname " }
-{ $description "Imports " { $snippet "word" } " from " { $snippet "vocab" } ", but renamed to " { $snippet "newname" } "." }
-{ $examples { $example
-    "USING: prettyprint qualified ;"
-    "RENAME: + math => -"
-    "2 3 - ."
-    "5"
-} } ;
-
-ARTICLE: "qualified" "Qualified word lookup"
-"The " { $vocab-link "qualified" } " vocabulary provides a handful of parsing words which give more control over word lookup than is offered by " { $link POSTPONE: USE: } " and " { $link POSTPONE: USING: } "."
-$nl
-"These words are useful when there is no way to avoid using two vocabularies with identical word names in the same source file."
-{ $subsection POSTPONE: QUALIFIED: }
-{ $subsection POSTPONE: QUALIFIED-WITH: }
-{ $subsection POSTPONE: FROM: }
-{ $subsection POSTPONE: EXCLUDE: }
-{ $subsection POSTPONE: RENAME: } ;
-
-ABOUT: "qualified"
diff --git a/basis/qualified/qualified-tests.factor b/basis/qualified/qualified-tests.factor
deleted file mode 100644 (file)
index 78efec4..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-USING: tools.test qualified eval accessors parser ;
-IN: qualified.tests.foo
-: x 1 ;
-: y 5 ;
-IN: qualified.tests.bar
-: x 2 ;
-: y 4 ;
-IN: qualified.tests.baz
-: x 3 ;
-
-QUALIFIED: qualified.tests.foo
-QUALIFIED: qualified.tests.bar
-[ 1 2 3 ] [ qualified.tests.foo:x qualified.tests.bar:x x ] unit-test
-
-QUALIFIED-WITH: qualified.tests.bar p
-[ 2 ] [ p:x ] unit-test
-
-RENAME: x qualified.tests.baz => y
-[ 3 ] [ y ] unit-test
-
-FROM: qualified.tests.baz => x ;
-[ 3 ] [ x ] unit-test
-[ 3 ] [ y ] unit-test
-
-EXCLUDE: qualified.tests.bar => x ;
-[ 3 ] [ x ] unit-test
-[ 4 ] [ y ] unit-test
-
-[ "USE: qualified IN: qualified.tests FROM: qualified.tests => doesnotexist ;" eval ]
-[ error>> no-word-error? ] must-fail-with
-
-[ "USE: qualified IN: qualified.tests RENAME: doesnotexist qualified.tests => blah" eval ]
-[ error>> no-word-error? ] must-fail-with
diff --git a/basis/qualified/qualified.factor b/basis/qualified/qualified.factor
deleted file mode 100644 (file)
index 2cd64e9..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-! Copyright (C) 2007, 2008 Daniel Ehrenberg.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences assocs hashtables parser lexer
-vocabs words namespaces vocabs.loader sets fry ;
-IN: qualified
-
-: define-qualified ( vocab-name prefix-name -- )
-    [ load-vocab vocab-words ] [ CHAR: : suffix ] bi*
-    '[ [ [ _ ] dip append ] dip ] assoc-map
-    use get push ;
-
-: QUALIFIED:
-    #! Syntax: QUALIFIED: vocab
-    scan dup define-qualified ; parsing
-
-: QUALIFIED-WITH:
-    #! Syntax: QUALIFIED-WITH: vocab prefix
-    scan scan define-qualified ; parsing
-
-: partial-vocab ( words vocab -- assoc )
-    '[ dup _ lookup [ no-word-error ] unless* ]
-    { } map>assoc ;
-
-: FROM:
-    #! Syntax: FROM: vocab => words... ;
-    scan dup load-vocab drop "=>" expect
-    ";" parse-tokens swap partial-vocab use get push ; parsing
-
-: partial-vocab-excluding ( words vocab -- assoc )
-    [ load-vocab vocab-words keys swap diff ] keep partial-vocab ;
-
-: EXCLUDE:
-    #! Syntax: EXCLUDE: vocab => words ... ;
-    scan "=>" expect
-    ";" parse-tokens swap partial-vocab-excluding use get push ; parsing
-
-: RENAME:
-    #! Syntax: RENAME: word vocab => newname
-    scan scan dup load-vocab drop
-    dupd lookup [ ] [ no-word-error ] ?if
-    "=>" expect
-    scan associate use get push ; parsing
-
diff --git a/basis/qualified/summary.txt b/basis/qualified/summary.txt
deleted file mode 100644 (file)
index 94b44c6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Qualified naming for vocabularies
diff --git a/basis/qualified/tags.txt b/basis/qualified/tags.txt
deleted file mode 100644 (file)
index f427429..0000000
+++ /dev/null
@@ -1 +0,0 @@
-extensions
index eec0d309b15e93ac526c7d3a90ba9f1cffbca5ad..4a807fa51bbc0f815282c086e77d136517707b69 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel math math.order symbols 
-words regexp.utils unicode.categories combinators.short-circuit ;
+USING: accessors kernel math math.order words regexp.utils
+unicode.categories combinators.short-circuit ;
 IN: regexp.classes
 
 SINGLETONS: any-char any-char-no-nl
index 4d8f3ddfbc7e29c96a7e20880a9b7d63b88a566d..25509ec798b655c6b5ad311dba3664c81cbaa571 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays assocs combinators io io.streams.string
-kernel math math.parser namespaces qualified sets
-quotations sequences splitting symbols vectors math.order
+kernel math math.parser namespaces sets
+quotations sequences splitting vectors math.order
 unicode.categories strings regexp.backend regexp.utils
 unicode.case words locals regexp.classes ;
 IN: regexp.parser
diff --git a/basis/symbols/authors.txt b/basis/symbols/authors.txt
deleted file mode 100644 (file)
index f372b57..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Slava Pestov
-Doug Coleman
diff --git a/basis/symbols/summary.txt b/basis/symbols/summary.txt
deleted file mode 100644 (file)
index 3093468..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Utility for defining multiple symbols at a time
diff --git a/basis/symbols/symbols-docs.factor b/basis/symbols/symbols-docs.factor
deleted file mode 100644 (file)
index 9f79b71..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-USING: help.markup help.syntax ;
-IN: symbols
-
-HELP: SYMBOLS:
-{ $syntax "SYMBOLS: words... ;" }
-{ $values { "words" "a sequence of new words to define" } }
-{ $description "Creates a new word for every token until the ';'." }
-{ $examples { $example "USING: prettyprint symbols ;" "IN: scratchpad" "SYMBOLS: foo bar baz ;\nfoo . bar . baz ." "foo\nbar\nbaz" } }
-{ $see-also POSTPONE: SYMBOL: } ;
diff --git a/basis/symbols/symbols-tests.factor b/basis/symbols/symbols-tests.factor
deleted file mode 100644 (file)
index 274c4de..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-USING: kernel symbols tools.test parser generic words accessors
-eval ;
-IN: symbols.tests
-
-[ ] [ SYMBOLS: a b c ; ] unit-test
-[ a ] [ a ] unit-test
-[ b ] [ b ] unit-test
-[ c ] [ c ] unit-test
-
-DEFER: blah
-
-[ ] [ "IN: symbols.tests GENERIC: blah" eval ] unit-test
-[ ] [ "IN: symbols.tests USE: symbols SYMBOLS: blah ;" eval ] unit-test
-
-[ f ] [ \ blah generic? ] unit-test
-[ t ] [ \ blah symbol? ] unit-test
-
-[ "IN: symbols.tests USE: symbols SINGLETONS: blah blah blah ;" eval ]
-[ error>> error>> def>> \ blah eq? ]
-must-fail-with
-
diff --git a/basis/symbols/symbols.factor b/basis/symbols/symbols.factor
deleted file mode 100644 (file)
index 6cf8eac..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: parser lexer sequences words kernel classes.singleton
-classes.parser ;
-IN: symbols
-
-: SYMBOLS:
-    ";" parse-tokens
-    [ create-in dup reset-generic define-symbol ] each ;
-    parsing
-
-: SINGLETONS:
-    ";" parse-tokens
-    [ create-class-in define-singleton-class ] each ;
-    parsing
diff --git a/basis/symbols/tags.txt b/basis/symbols/tags.txt
deleted file mode 100644 (file)
index f427429..0000000
+++ /dev/null
@@ -1 +0,0 @@
-extensions
index 10e156629086246fbe5eddaa3c7a9267482baef8..1dcc6fe4c18b45a6177397cb9ed01e0ebedf22ca 100644 (file)
@@ -5,7 +5,7 @@ io.directories io.directories.hierarchy kernel namespaces make
 sequences system tools.deploy.backend tools.deploy.config
 tools.deploy.config.editor assocs hashtables prettyprint
 io.backend.unix cocoa io.encodings.utf8 io.backend
-cocoa.application cocoa.classes cocoa.plists qualified
+cocoa.application cocoa.classes cocoa.plists
 combinators ;
 IN: tools.deploy.macosx
 
index 135679444ba8fff6fac93a793d1b8378f4219bd5..c894a8931b6462628113305de8a1a137f3de6e32 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors qualified io.backend io.streams.c init fry
+USING: accessors io.backend io.streams.c init fry
 namespaces make assocs kernel parser lexer strings.parser vocabs
 sequences words words.private memory kernel.private
 continuations io vocabs.loader system strings sets
index e97cc203a2b8372ebfc6991048eeb59a2b2707d8..9076b67606399d0e6a4939268d364ff128f36f81 100755 (executable)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: io.files io.files.temp io words alien kernel math.parser
 alien.syntax io.launcher system assocs arrays sequences
-namespaces make qualified system math io.encodings.ascii
+namespaces make system math io.encodings.ascii
 accessors tools.disassembler ;
 IN: tools.disassembler.gdb
 
index 54882800b0e0086398f868722209933e967f545b..3670891e41abfc6da56d85821a5dbb8a26c77bd6 100755 (executable)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays combinators io io.files io.files.info
 io.directories kernel math.parser sequences system vocabs.loader
-calendar math symbols fry prettyprint ;
+calendar math fry prettyprint ;
 IN: tools.files
 
 <PRIVATE
index e4db72a2fe784d4863c5c02bcfdb1d058ddfde70..36f23a8298aa2f6244406db3fbc7a15d8db501e9 100644 (file)
@@ -6,7 +6,7 @@ classes.singleton classes.tuple classes.union combinators
 definitions effects fry generic help help.markup help.stylesheet
 help.topics io io.files io.pathnames io.styles kernel macros
 make namespaces prettyprint sequences sets sorting summary
-tools.vocabs vocabs vocabs.loader words ;
+tools.vocabs vocabs vocabs.loader words words.symbol ;
 IN: tools.vocabs.browser
 
 : vocab-status-string ( vocab -- string )
index fa36e61d90d69b3c112992885fede4e8e2ba1971..6ca3868d87d9ce2245943dae52466c3af61f11d7 100644 (file)
@@ -2,7 +2,7 @@
 ! Copyright (C) 2006, 2007 Alex Chapman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays kernel sequences io.styles ui.gadgets ui.render
-colors colors.gray qualified accessors ;
+colors colors.gray accessors ;
 QUALIFIED: colors
 IN: ui.gadgets.theme
 
index 123a7620d1f4b500b75d8217e8ed8209ca2922f7..b74a36bc0b34f507a0860e521ebc4d804cd9d038 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors arrays assocs kernel math math.order models
 namespaces make sequences words strings system hashtables
 math.parser math.vectors classes.tuple classes boxes calendar
-alarms symbols combinators sets columns fry deques ui.gadgets ;
+alarms combinators sets columns fry deques ui.gadgets ;
 IN: ui.gestures
 
 GENERIC: handle-gesture ( gesture gadget -- ? )
index 51425b124d0afffb64ddc73cc9dfad41c15206f2..40da6ebafc7bb185fdd3404d828e8f116e9e042d 100644 (file)
@@ -7,7 +7,7 @@ quotations sequences strings threads listener classes.tuple
 ui.commands ui.gadgets ui.gadgets.editors ui.gadgets.status-bar
 ui.gadgets.presentations ui.gadgets.worlds ui.gestures
 definitions calendar concurrency.flags concurrency.mailboxes
-ui.tools.workspace accessors sets destructors fry ;
+ui.tools.workspace accessors sets destructors fry vocabs.parser ;
 IN: ui.tools.interactor
 
 ! If waiting is t, we're waiting for user input, and invoking
index 2297382a96b3cf767ff10ec16e0b167610dec760..a9405424dc283d72cd1f4f49cce790fb9e5d29b2 100644 (file)
@@ -8,7 +8,8 @@ io.styles kernel namespaces parser prettyprint quotations
 tools.annotations editors tools.profiler tools.test tools.time
 tools.walker ui.commands ui.gadgets.editors ui.gestures
 ui.operations ui.tools.deploy vocabs vocabs.loader words
-sequences tools.vocabs classes compiler.units accessors ;
+sequences tools.vocabs classes compiler.units accessors
+vocabs.parser ;
 IN: ui.tools.operations
 
 V{ } clone operations set-global
index d6bab73017b7fc246babe117b05125fcda2a20ac..c22fcb6cbefce746854294b19a1c36c465b0251e 100755 (executable)
@@ -8,7 +8,7 @@ make sequences strings vectors words windows.kernel32
 windows.gdi32 windows.user32 windows.opengl32 windows.messages
 windows.types windows.nt windows threads libc combinators fry
 combinators.short-circuit continuations command-line shuffle
-opengl ui.render ascii math.bitwise locals symbols accessors
+opengl ui.render ascii math.bitwise locals accessors
 math.geometry.rect math.order ascii calendar io.encodings.utf16n
 ;
 IN: ui.windows
index 96633198c028a0498ea1c07d975bf1f3d17c8b92..666ebf2f18b2f8eeb3a634810707f1b2a4550a3c 100755 (executable)
@@ -5,7 +5,7 @@ ui.gestures ui.backend ui.clipboards ui.gadgets.worlds ui.render
 ui.event-loop assocs kernel math namespaces opengl sequences
 strings x11.xlib x11.events x11.xim x11.glx x11.clipboard
 x11.constants x11.windows io.encodings.string io.encodings.ascii
-io.encodings.utf8 combinators command-line qualified
+io.encodings.utf8 combinators command-line
 math.vectors classes.tuple opengl.gl threads math.geometry.rect
 environment ascii ;
 IN: ui.x11
index 42f2a07e62c1cceddc13bcc9de5bb0edbedf7162..bb0f9b520163324302a7761fa79a813c47028117 100644 (file)
@@ -1,7 +1,6 @@
 ! Copyright (C) 2005, 2006 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax combinators system vocabs.loader alias
-constants ;
+USING: alien.syntax combinators system vocabs.loader ;
 IN: unix
 
 CONSTANT: MAXPATHLEN 1024
index d58cfbb90d21767d46aad975ac25abc92c2bed24..4536c532bf649e377faaa0c4ed303f5f1fcbeb19 100644 (file)
@@ -1,4 +1,4 @@
-USING: alien.syntax alias constants ;
+USING: alien.syntax ;
 IN: unix
 
 : FD_SETSIZE 1024 ;
index f38707b456e116ed31998160717136a3062e0b29..32dd4d80d8c3dc2f2036f90f1046055938c6652d 100644 (file)
@@ -1,4 +1,4 @@
-USING: alien.syntax unix.time alias constants ;
+USING: alien.syntax unix.time ;
 IN: unix
 
 CONSTANT: FD_SETSIZE 1024
index 8ca78c72a64ad2a0fc1095ed459be53b7f376afe..f124e7f998fa54dcf56a61482e28e6ac7e40ffb3 100644 (file)
@@ -1,4 +1,4 @@
-USING: alien.syntax alien.c-types math vocabs.loader constants alias ;
+USING: alien.syntax alien.c-types math vocabs.loader ;
 IN: unix
 
 CONSTANT: FD_SETSIZE 256
index 4d40e9e5022b644f6c367676b29b32f98e18dceb..e915b6ffcd35b4deab61a9e71af31de26ce60c91 100644 (file)
@@ -1,4 +1,4 @@
-USING: alien.syntax constants alias ;
+USING: alien.syntax ;
 IN: unix
 
 CONSTANT: FD_SETSIZE 1024
index 0cc63229c4ebd792528f3914c4b068f6ef74f134..44d85680a715fd4e35412013f48d2cbbb41877d2 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.getfsstat.freebsd
 
 CONSTANT: MNT_WAIT        1       ! synchronously wait for I/O to complete
index 23d9a14b9b5a737f33b9bbe338970f428322033e..0db1bb86ad4b0070a80e8d9db5f51c7c75eadc82 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.getfsstat.macosx
 
 CONSTANT: MNT_WAIT    1   ! synchronously wait for I/O to complete
index 18064822ebe39cc772ff7ec796278b8ce83bc030..1eca6d7dc391081e412fba43db800e520168ab6f 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.getfsstat.netbsd
 
 CONSTANT: MNT_WAIT   1 ! synchronously wait for I/O to complete
index 41adfeaacde83e615e13643b5aa0d5c5233c1522..19465d8040163738e65cb82835e4809d79901f9b 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.getfsstat.openbsd
 
 CONSTANT: MNT_WAIT   1 ! synchronously wait for I/O to complete
index f6aa7fa3e969871c5eec2bae18678bcc3c49ef01..60785a5b172aea539842f060e8b413075e5ffb05 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.strings io.encodings.utf8
 io.backend.unix kernel math sequences splitting unix strings
-combinators.short-circuit byte-arrays combinators qualified
+combinators.short-circuit byte-arrays combinators
 accessors math.parser fry assocs namespaces continuations
 unix.users unix.utilities ;
 IN: unix.groups
index 4c90ef739eef2ee7bfdad7348b924622a874a64b..1153b997c2edd91de78c0307a632b9a31f8c697d 100644 (file)
@@ -1,4 +1,4 @@
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.kqueue
 
 C-STRUCT: kevent
index 0f75354589ea350ae5baf4d9ff6cc3fe829fd66f..6c3b9ef2cb07bfb05a66fe22dfbb488829eea193 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien.syntax system sequences vocabs.loader words
-accessors alias constants ;
+accessors ;
 IN: unix.kqueue
 
 << "unix.kqueue." os name>> append require >>
index 0bc6ce57857cf2077c76cb03860b8dd5e4cf22c4..843a0afad921741408457b6c0ccc5cf716ada8c3 100644 (file)
@@ -1,4 +1,4 @@
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.kqueue
 
 C-STRUCT: kevent
index 5e23626e1d4089ee6efeaf2da542d86e74131bd9..7ba942d712e4c74f33a848a07c896e861fd1de4a 100644 (file)
@@ -1,4 +1,4 @@
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.kqueue
 
 C-STRUCT: kevent
index fc2e7d20cacd61ed0418d98b331820a366ef47b8..c62ba05a4c599ff2f7433d31357594868e955439 100644 (file)
@@ -1,4 +1,4 @@
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.kqueue
 
 C-STRUCT: kevent
index ebc3ab8bd1f7074ea63cb4b3727ff3ba7a4908b9..7c68dfa45a8124b4e6a22220e90a8a1e928fdc9d 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 IN: unix.linux.epoll
-USING: alien.syntax math constants ;
+USING: alien.syntax math ;
 
 FUNCTION: int epoll_create ( int size ) ;
 
index 9084b41c502e220f2568c00fbc20a792fba42ed3..e3d40b5b2837acd1dd162c789ab5b6ad7f39ca1b 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
-USING: alien.syntax math math.bitwise constants ;\r
+USING: alien.syntax math math.bitwise ;\r
 IN: unix.linux.inotify\r
 \r
 C-STRUCT: inotify-event\r
index 61ced5c97ba072507b7e1ceb98e08a5cb005cdb0..0cf33be1bf3514cfa99c832c47913a65cd688d57 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax alias constants ;
+USING: alien.syntax ;
 IN: unix
 
 ! Linux.
index ec782f5164ef74befd3f66dce0fc61f15e69e4af..6e83ea9a4226d78f7d188c9ebb78be5d9eeee6e5 100644 (file)
@@ -1,6 +1,6 @@
 USING: kernel alien.c-types alien.strings sequences math alien.syntax unix
 vectors kernel namespaces continuations threads assocs vectors
-io.backend.unix io.encodings.utf8 unix.utilities constants ;
+io.backend.unix io.encodings.utf8 unix.utilities ;
 IN: unix.process
 
 ! Low-level Unix process launching utilities. These are used
index fc7e152931043663243aa4b74ce6d4a307af2389..d91fbdfddc1f5c1a1f92da9b1320ca6e24c8ab4a 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2006 Patrick Mauritz.
 ! See http://factorcode.org/license.txt for BSD license.
 IN: unix
-USING: alien.syntax system kernel layouts constants ;
+USING: alien.syntax system kernel layouts ;
 
 ! Solaris.
 
index 2164d89ac61c17e09f46a6febbfd94a3972efa74..156be961906773f4a231932a1f5b860070983891 100644 (file)
@@ -1,5 +1,5 @@
 USING: kernel system combinators alien.syntax alien.c-types
-math io.backend.unix vocabs.loader unix constants ;
+math io.backend.unix vocabs.loader unix ;
 IN: unix.stat
 
 ! File Types
index 17b58aede60d5944efdf3d4d600016cc8a56dc56..e6a033e09d505f484da2fa0f82ded795312ef563 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.statfs.freebsd
 
 CONSTANT: MFSNAMELEN      16            ! length of type name including null */
index 829a49c81f913f4ca536d6dca62daebf98626c9a..f80eb29ccd785386dbcd4305350aa5523b2cae18 100644 (file)
@@ -2,8 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien.c-types io.encodings.utf8 io.encodings.string
 kernel sequences unix.stat accessors unix combinators math
-grouping system alien.strings math.bitwise alien.syntax
-alias constants ;
+grouping system alien.strings math.bitwise alien.syntax ;
 IN: unix.statfs.macosx
 
 CONSTANT: MNT_RDONLY  HEX: 00000001
index d9e6b867b690267ca801b51ed51ed7d1d0a0218c..f495f2af4e75001e18ed40bdb9ebe65246527293 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.statfs.openbsd
 
 CONSTANT: MFSNAMELEN 16
index a2a316846464926b51ea39cbf34823396e6ec1d8..3140b8500476d78556d961745f9364381ddbab88 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.statvfs.freebsd
 
 C-STRUCT: statvfs
index 5c04468ad39e81ed9a261596ed4ec88ef0c9b898..c92fef6aaaeb551d7e202dde934e1ba6984add26 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.statvfs.linux
 
 C-STRUCT: statvfs64
index fc85b9d9dc013e38c8d5ffb21c3c050be052e139..0aafad69fa6966a630bc60dd27117fdc09bae2a5 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.statvfs.macosx
 
 C-STRUCT: statvfs
index e3e54fb4e2dbd8f2876cea9fdf8cc3f1730f9405..1adc1a3da8435cbd9a9327bb3d040b46de53db47 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.statvfs.netbsd
 
 CONSTANT: _VFS_NAMELEN    32
index 76c2af912779b54fb8474a08d45cc548c8c1f5a5..4ca8d0749daa8b7377264bf0424c6a8ac2dc7378 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax constants ;
+USING: alien.syntax ;
 IN: unix.statvfs.openbsd
 
 C-STRUCT: statvfs
index c0e496a0413d9045fb8eb56a4facc954bf877899..52e7473800a572834f35f541a34d91c6c206da22 100644 (file)
@@ -2,9 +2,9 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.syntax kernel libc
 sequences continuations byte-arrays strings math namespaces
-system combinators vocabs.loader qualified accessors
+system combinators vocabs.loader accessors
 stack-checker macros locals generalizations unix.types
-io vocabs vocabs.loader constants ;
+io vocabs vocabs.loader ;
 IN: unix
 
 CONSTANT: PROT_NONE   0
index 30dac2de1ff6d157128aa1a2c73ee5a62e4be3a6..6b70ceee2e1d5318a8f1ab72581d9e5f5f8900b1 100644 (file)
@@ -3,7 +3,7 @@
 USING: alien.c-types alien.syntax combinators continuations
 io.encodings.string io.encodings.utf8 kernel sequences strings
 unix calendar system accessors unix.time calendar.unix
-vocabs.loader constants ;
+vocabs.loader ;
 IN: unix.utmpx
 
 CONSTANT: EMPTY 0
index 0d95c06a87bf77f98da2403a45e6761ae2791448..f76e389dce76d50e1c07a0c18022cccdd9d8cea7 100644 (file)
@@ -1,5 +1,4 @@
-USING: alias alien.syntax kernel math windows.types math.bitwise
-constants ;
+USING: alien.syntax kernel math windows.types math.bitwise ;
 IN: windows.advapi32
 LIBRARY: advapi32
 
index e3bec6d7ac17e5d9b5b2da8cd862f19ab6d8834a..0e9a03f0759d46ebc96b709d39ef63d60c7fd720 100755 (executable)
@@ -1,6 +1,6 @@
 USING: windows.dinput windows.kernel32 windows.ole32 windows.com
 windows.com.syntax alien alien.c-types alien.syntax kernel system namespaces
-combinators sequences symbols fry math accessors macros words quotations
+combinators sequences fry math accessors macros words quotations
 libc continuations generalizations splitting locals assocs init
 struct-arrays ;
 IN: windows.dinput.constants
index 76cba4ff36a20d517631e5efa729308e9ad4f340..1cd22beb75d5da6a84ebc27ad2df94bbfecc8d28 100755 (executable)
@@ -1,6 +1,5 @@
 USING: windows.kernel32 windows.ole32 windows.com windows.com.syntax
-alien alien.c-types alien.syntax kernel system namespaces math constants
-alias ;
+alien alien.c-types alien.syntax kernel system namespaces math ;
 IN: windows.dinput
 
 <<
index 7c19cbde53d0ed80266c431f78a4ce62d2a9ab28..56bba768de9e39c8d65f223e7a0722e0148c2f48 100644 (file)
@@ -1,4 +1,3 @@
-USING: kernel constants ;
 IN: windows.errors 
 
 CONSTANT: ERROR_SUCCESS 0
index 9c16664de80c8ef74f4c16c85e88faab2255175c..077adf1961bc75eb4731cf5d78c0777b4737925f 100755 (executable)
@@ -1,7 +1,7 @@
 ! FUNCTION: AbortDoc
 ! Copyright (C) 2005, 2006 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.syntax kernel windows.types alias constants ;
+USING: alien alien.syntax kernel windows.types ;
 IN: windows.gdi32
 
 ! Stock Logical Objects
index cdfb31cbf7727b04311144b9e94c55cf00cc8206..7fd90acbe87b5b32df1e6c94be81f163cda1e255 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2005, 2006 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.syntax kernel windows.types alias constants ;
+USING: alien alien.syntax kernel windows.types ;
 IN: windows.kernel32
 
 CONSTANT: MAX_PATH 260
index bb30968217c788cb1681a50d049c9ddcc15bd8b9..10e6cd43c5217193f1e3c3187895fb21f2c0a3cb 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2005, 2006 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors assocs hashtables kernel math namespaces words
-windows.types vocabs sequences constants alias ;
+windows.types vocabs sequences ;
 IN: windows.messages
 
 SYMBOL: windows-messages
index 1282d3b9a5311d804dafdb302a5a1d2f39da4d26..b8e6d2c2b0ea0593753fbe6e9206ba52b0ce07ea 100644 (file)
@@ -3,7 +3,7 @@
 USING: alien alien.c-types alien.strings alien.syntax
 combinators io.encodings.utf16n io.files io.pathnames kernel
 windows windows.com windows.com.syntax windows.ole32
-windows.user32 constants alias ;
+windows.user32 ;
 IN: windows.shell32
 
 CONSTANT: CSIDL_DESKTOP HEX: 00
index 88c6d54f0a9e0e1e16f09c9cc4111369443678e3..e2e2c7e1502c65e5556950aed6d188d437bcf83f 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2005, 2006 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.syntax parser namespaces kernel math
-windows.types generalizations math.bitwise alias constants ;
+windows.types generalizations math.bitwise ;
 IN: windows.user32
 
 ! HKL for ActivateKeyboardLayout
index 5c70e82ea9b6ec45b28aab85669ced62b99547e3..27069ed743080d7a3875ef010c67a3f11d3c2f8d 100644 (file)
@@ -2,8 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.strings alien.syntax arrays
 byte-arrays kernel math sequences windows.types windows.kernel32
-windows.errors windows math.bitwise alias io.encodings.utf16n
-alias constants ;
+windows.errors windows math.bitwise io.encodings.utf16n ;
 IN: windows.winsock
 
 USE: libc
index 07872fe576d363282e87fa53500a5b4c1125b291..f86c24b845eca6f06008f708da1197253e53c48f 100644 (file)
@@ -13,7 +13,7 @@
 
 USING: kernel arrays alien alien.c-types alien.strings
 alien.syntax math math.bitwise words sequences namespaces
-continuations io io.encodings.ascii alias ;
+continuations io io.encodings.ascii ;
 IN: x11.xlib
 
 LIBRARY: xlib
index 096230ff4e3577bc604c6f14e6f4950cfdfd9e0c..7b28bcfcdf0109034bd13138ccfc8e9dde497daa 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: xmode.marker.context xmode.rules symbols accessors
+USING: xmode.marker.context xmode.rules accessors
 xmode.tokens namespaces make kernel sequences assocs math ;
 IN: xmode.marker.state
 
index badc1f5218165ab1686ad9b8f7883e07f06c043f..9b2db4099f4550e5d903c9ea666e216b6181115e 100644 (file)
@@ -40,7 +40,10 @@ IN: bootstrap.syntax
     "PRIVATE>"
     "SBUF\""
     "SINGLETON:"
+    "SINGLETONS:"
     "SYMBOL:"
+    "SYMBOLS:"
+    "CONSTANT:"
     "TUPLE:"
     "SLOT:"
     "T{"
@@ -48,6 +51,12 @@ IN: bootstrap.syntax
     "INTERSECTION:"
     "USE:"
     "USING:"
+    "QUALIFIED:"
+    "QUALIFIED-WITH:"
+    "FROM:"
+    "EXCLUDE:"
+    "RENAME:"
+    "ALIAS:"
     "V{"
     "W{"
     "["
index 2ce4b934c87f991165baf498c4c267e51d06c3d1..acff3d57e5f818870906270cefcea8bd48bc9ae7 100644 (file)
@@ -1,8 +1,9 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays definitions assocs kernel kernel.private
-slots.private namespaces make sequences strings words vectors
-math quotations combinators sorting effects graphs vocabs sets ;
+slots.private namespaces make sequences strings words words.symbol
+vectors math quotations combinators sorting effects graphs
+vocabs sets ;
 IN: classes
 
 SYMBOL: class<=-cache
index f647b006d97524cceb3549ba4575731dcf7b8fac..d6911576dd97fc16378868dff90556d69565c352 100644 (file)
@@ -4,6 +4,7 @@ IN: classes.singleton
 ARTICLE: "singletons" "Singleton classes"
 "A singleton is a class with only one instance and with no state."
 { $subsection POSTPONE: SINGLETON: }
+{ $subsection POSTPONE: SINGLETONS: }
 { $subsection define-singleton-class }
 "The set of all singleton classes is itself a class:"
 { $subsection singleton-class? }
index cb896dbf53f0356adc3c2f3abfce3f4ba834a2e4..aa4f8e329d4f1eb01f87d0b50bd3257d7a9df499 100644 (file)
@@ -1,6 +1,6 @@
 IN: compiler.errors
 USING: help.markup help.syntax vocabs.loader words io
-quotations ;
+quotations words.symbol ;
 
 ARTICLE: "compiler-errors" "Compiler warnings and errors"
 "The compiler saves various notifications in a global variable:"
index db6b2461b53653ab228ba98051e27b5ccb4bc338..8a06653eb8af49430dfece15ecb7b67b4a17a63e 100644 (file)
@@ -44,8 +44,6 @@ M: effect effect>string ( effect -- string )
 
 GENERIC: stack-effect ( word -- effect/f )
 
-M: symbol stack-effect drop (( -- symbol )) ;
-
 M: word stack-effect
     { "declared-effect" "inferred-effect" }
     swap props>> [ at ] curry map [ ] find nip ;
index c8d3095ce651abba62209671e83fe8346b4364f2..ef006bbc21f742f7184fcbdf1cf5adae3052bc45 100644 (file)
@@ -1,5 +1,5 @@
 USING: help.markup help.syntax kernel math quotations
-math.private words ;
+math.private words words.symbol ;
 IN: math.order
 
 HELP: <=>
index 92e5922802bbab824b4691a228d27f1792282303..625c1e9c4318e7ccd7c6fbc5de779ffe64523198 100644 (file)
@@ -1,78 +1,10 @@
 USING: help.markup help.syntax kernel sequences words
 math strings vectors quotations generic effects classes
 vocabs.loader definitions io vocabs source-files
-quotations namespaces compiler.units assocs lexer ;
+quotations namespaces compiler.units assocs lexer
+words.symbol words.alias words.constant vocabs.parser ;
 IN: parser
 
-ARTICLE: "vocabulary-search-shadow" "Shadowing word names"
-"If adding a vocabulary to the search path results in a word in another vocabulary becoming inaccessible due to the new vocabulary defining a word with the same name, we say that the old word has been " { $emphasis "shadowed" } "."
-$nl
-"Here is an example where shadowing occurs:"
-{ $code
-    "IN: foe"
-    "USING: sequences io ;"
-    ""
-    ": append"
-    "    \"foe::append calls sequences:append\" print  append ;"
-    ""
-    "IN: fee"
-    ""
-    ": append"
-    "    \"fee::append calls fee:append\" print  append ;"
-    ""
-    "IN: fox"
-    "USE: foe"
-    ""
-    ": append"
-    "    \"fox::append calls foe:append\" print  append ;"
-    ""
-    "\"1234\" \"5678\" append print"
-    ""
-    "USE: fox"
-    "\"1234\" \"5678\" append print"
-}
-"When placed in a source file and run, the above code produces the following output:"
-{ $code
-    "foe:append calls sequences:append"
-    "12345678"
-    "fee:append calls foe:append"
-    "foe:append calls sequences:append"
-    "12345678"
-}
-"The " { $vocab-link "qualified" } " vocabulary contains some tools for helping with shadowing." ;
-
-ARTICLE: "vocabulary-search-errors"  "Word lookup errors"
-"If the parser cannot not find a word in the current vocabulary search path, it attempts to look for the word in all loaded vocabularies."
-$nl
-"If " { $link auto-use? } " mode is off, a restartable error is thrown with a restart for each vocabulary in question, together with a restart which defers the word in the current vocabulary, as if " { $link POSTPONE: DEFER: } " was used."
-$nl
-"If " { $link auto-use? } " mode is on and only one vocabulary has a word with this name, the vocabulary is added to the search path and parsing continues."
-$nl
-"If any restarts were invoked, or if " { $link auto-use? } " is on, the parser will print the correct " { $link POSTPONE: USING: } " after parsing completes. This form can be copy and pasted back into the source file."
-{ $subsection auto-use? } ;
-
-ARTICLE: "vocabulary-search" "Vocabulary search path"
-"When the parser reads a token, it attempts to look up a word named by that token. The lookup is performed by searching each vocabulary in the search path, in order."
-$nl
-"For a source file the vocabulary search path starts off with one vocabulary:"
-{ $code "syntax" }
-"The " { $vocab-link "syntax" } " vocabulary consists of a set of parsing words for reading Factor data and defining new words."
-$nl
-"In the listener, the " { $vocab-link "scratchpad" } " is the default vocabulary for new word definitions. However, when loading source files, there is no default vocabulary. Defining words before declaring a vocabulary with " { $link POSTPONE: IN: } " results in an error."
-$nl
-"At the interactive listener, the default search path contains many more vocabularies. Details on the default search path and parser invocation are found in " { $link "parser" } "."
-$nl
-"Three parsing words deal with the vocabulary search path:"
-{ $subsection POSTPONE: USE: }
-{ $subsection POSTPONE: USING: }
-{ $subsection POSTPONE: IN: }
-"Private words can be defined; note that this is just a convention and they can be called from other vocabularies anyway:"
-{ $subsection POSTPONE: <PRIVATE }
-{ $subsection POSTPONE: PRIVATE> }
-{ $subsection "vocabulary-search-errors" }
-{ $subsection "vocabulary-search-shadow" }
-{ $see-also "words" "qualified" } ;
-
 ARTICLE: "reading-ahead" "Reading ahead"
 "Parsing words can consume input:"
 { $subsection scan }
index 6ddf299f7f334722dbb2a350ae86820b4e46eaf1..bdbd6b37a8a4f52a69df2d4041da243013868a93 100644 (file)
@@ -502,3 +502,54 @@ DEFER: blah
 [ ] [ f lexer set f file set "Hello world" note. ] unit-test
 
 [ "CHAR: \\u9999999999999" eval ] must-fail
+
+SYMBOLS: a b c ;
+
+[ a ] [ a ] unit-test
+[ b ] [ b ] unit-test
+[ c ] [ c ] unit-test
+
+DEFER: blah
+
+[ ] [ "IN: symbols.tests GENERIC: blah" eval ] unit-test
+[ ] [ "IN: symbols.tests USE: symbols SYMBOLS: blah ;" eval ] unit-test
+
+[ f ] [ \ blah generic? ] unit-test
+[ t ] [ \ blah symbol? ] unit-test
+
+[ "IN: symbols.tests USE: symbols SINGLETONS: blah blah blah ;" eval ]
+[ error>> error>> def>> \ blah eq? ]
+must-fail-with
+
+IN: qualified.tests.foo
+: x 1 ;
+: y 5 ;
+IN: qualified.tests.bar
+: x 2 ;
+: y 4 ;
+IN: qualified.tests.baz
+: x 3 ;
+
+QUALIFIED: qualified.tests.foo
+QUALIFIED: qualified.tests.bar
+[ 1 2 3 ] [ qualified.tests.foo:x qualified.tests.bar:x x ] unit-test
+
+QUALIFIED-WITH: qualified.tests.bar p
+[ 2 ] [ p:x ] unit-test
+
+RENAME: x qualified.tests.baz => y
+[ 3 ] [ y ] unit-test
+
+FROM: qualified.tests.baz => x ;
+[ 3 ] [ x ] unit-test
+[ 3 ] [ y ] unit-test
+
+EXCLUDE: qualified.tests.bar => x ;
+[ 3 ] [ x ] unit-test
+[ 4 ] [ y ] unit-test
+
+[ "USE: qualified IN: qualified.tests FROM: qualified.tests => doesnotexist ;" eval ]
+[ error>> no-word-error? ] must-fail-with
+
+[ "USE: qualified IN: qualified.tests RENAME: doesnotexist qualified.tests => blah" eval ]
+[ error>> no-word-error? ] must-fail-with
index 4586cfe34ec4614f055547815c2f6ca05c6ee073..81ed91290c1236035943716d6d047d6874701b1d 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays definitions generic assocs kernel math namespaces
-sequences strings vectors words quotations io
+sequences strings vectors words words.symbol quotations io
 combinators sorting splitting math.parser effects continuations
 io.files io.streams.string vocabs io.encodings.utf8 source-files
 classes hashtables compiler.errors compiler.units accessors sets
-lexer ;
+lexer vocabs.parser ;
 IN: parser
 
 : location ( -- loc )
@@ -29,27 +29,6 @@ t parser-notes set-global
         "Note: " write dup print
     ] when drop ;
 
-SYMBOL: use
-SYMBOL: in
-
-: (use+) ( vocab -- )
-    vocab-words use get push ;
-
-: use+ ( vocab -- )
-    load-vocab (use+) ;
-
-: add-use ( seq -- ) [ use+ ] each ;
-
-: set-use ( seq -- )
-    [ vocab-words ] V{ } map-as sift use set ;
-
-: check-vocab-string ( name -- name )
-    dup string?
-    [ "Vocabulary name must be a string" throw ] unless ;
-
-: set-in ( name -- )
-    check-vocab-string dup in set create-vocab (use+) ;
-
 M: parsing-word stack-effect drop (( parsed -- parsed )) ;
 
 TUPLE: no-current-vocab ;
@@ -69,17 +48,6 @@ TUPLE: no-current-vocab ;
 
 : CREATE-WORD ( -- word ) CREATE dup reset-generic ;
 
-: word-restarts ( name possibilities -- restarts )
-    natural-sort
-    [ [ vocabulary>> "Use the " " vocabulary" surround ] keep ] { } map>assoc
-    swap "Defer word in current vocabulary" swap 2array
-    suffix ;
-
-ERROR: no-word-error name ;
-
-: <no-word-error> ( name possibilities -- error restarts )
-    [ drop \ no-word-error boa ] [ word-restarts ] 2bi ;
-
 SYMBOL: amended-use
 
 SYMBOL: auto-use?
index 7a1cb5fd923743796cf6bdf8d15d548b030c7542..54b8b1b40152c9ab7edc3b915b018e4ea9a3cf50 100644 (file)
@@ -1,7 +1,7 @@
 USING: generic help.syntax help.markup kernel math parser words
 effects classes generic.standard classes.tuple generic.math
 generic.standard arrays io.pathnames vocabs.loader io sequences
-assocs ;
+assocs words.symbol words.alias words.constant ;
 IN: syntax
 
 ARTICLE: "parser-algorithm" "Parser algorithm"
@@ -344,7 +344,41 @@ HELP: SYMBOL:
 { $description "Defines a new symbol word in the current vocabulary. Symbols push themselves on the stack when executed, and are used to identify variables (see " { $link "namespaces" } ") as well as for storing crufties in word properties (see " { $link "word-props" } ")." }
 { $examples { $example "USE: prettyprint" "IN: scratchpad" "SYMBOL: foo\nfoo ." "foo" } } ;
 
-{ define-symbol POSTPONE: SYMBOL: } related-words
+{ define-symbol POSTPONE: SYMBOL: POSTPONE: SYMBOLS: } related-words
+
+HELP: SYMBOLS:
+{ $syntax "SYMBOLS: words... ;" }
+{ $values { "words" "a sequence of new words to define" } }
+{ $description "Creates a new symbol for every token until the " { $snippet ";" } "." }
+{ $examples { $example "USING: prettyprint ;" "IN: scratchpad" "SYMBOLS: foo bar baz ;\nfoo . bar . baz ." "foo\nbar\nbaz" } } ;
+
+HELP: SINGLETONS:
+{ $syntax "SINGLETONS: words... ;" }
+{ $values { "words" "a sequence of new words to define" } }
+{ $description "Creates a new singleton for every token until the " { $snippet ";" } "." } ;
+
+HELP: ALIAS:
+{ $syntax "ALIAS: new-word existing-word" }
+{ $values { "new-word" word } { "existing-word" word } }
+{ $description "Creates a new inlined word that calls the existing word." }
+{ $examples
+    { $example "USING: prettyprint sequences ;"
+               "IN: alias.test"
+               "ALIAS: sequence-nth nth"
+               "0 { 10 20 30 } sequence-nth ."
+               "10"
+    }
+} ;
+
+{ define-alias POSTPONE: ALIAS: } related-words
+
+HELP: CONSTANT:
+{ $syntax "CONSTANT: word value" }
+{ $values { "word" word } { "value" object } }
+{ $description "Creates a word which pushes a value on the stack." }
+{ $examples { $code "CONSTANT: magic 1" "CONSTANT: science HEX: ff0f" } } ;
+
+{ define-constant POSTPONE: CONSTANT: } related-words
 
 HELP: \
 { $syntax "\\ word" }
@@ -376,6 +410,47 @@ HELP: USING:
 { $description "Adds a list of vocabularies to the front of the search path, with later vocabularies taking precedence." }
 { $errors "Throws an error if one of the vocabularies does not exist." } ;
 
+HELP: QUALIFIED:
+{ $syntax "QUALIFIED: vocab" }
+{ $description "Similar to " { $link POSTPONE: USE: } " but loads vocabulary with prefix." }
+{ $examples { $example
+    "USING: prettyprint qualified ;"
+    "QUALIFIED: math"
+    "1 2 math:+ ." "3"
+} } ;
+
+HELP: QUALIFIED-WITH:
+{ $syntax "QUALIFIED-WITH: vocab word-prefix" }
+{ $description "Works like " { $link POSTPONE: QUALIFIED: } " but uses " { $snippet "word-prefix" } " as prefix." }
+{ $examples { $code
+    "USING: prettyprint qualified ;"
+    "QUALIFIED-WITH: math m"
+    "1 2 m:+ ."
+    "3"
+} } ;
+
+HELP: FROM:
+{ $syntax "FROM: vocab => words ... ;" }
+{ $description "Imports " { $snippet "words" } " from " { $snippet "vocab" } "." }
+{ $examples { $code
+    "FROM: math.parser => bin> hex> ; ! imports only bin> and hex>" } } ;
+
+HELP: EXCLUDE:
+{ $syntax "EXCLUDE: vocab => words ... ;" }
+{ $description "Imports everything from " { $snippet "vocab" } " excluding " { $snippet "words" } "." }
+{ $examples { $code
+    "EXCLUDE: math.parser => bin> hex> ; ! imports everything but bin> and hex>" } } ;
+
+HELP: RENAME:
+{ $syntax "RENAME: word vocab => newname" }
+{ $description "Imports " { $snippet "word" } " from " { $snippet "vocab" } ", but renamed to " { $snippet "newname" } "." }
+{ $examples { $example
+    "USING: prettyprint qualified ;"
+    "RENAME: + math => -"
+    "2 3 - ."
+    "5"
+} } ;
+
 HELP: IN:
 { $syntax "IN: vocabulary" }
 { $values { "vocabulary" "a new vocabulary name" } }
index 9640aa9275f524604910cce58a2321568e14f5d0..c81fc9201e64794e573a2309c099de384cb52845 100644 (file)
@@ -2,12 +2,13 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors alien arrays byte-arrays definitions generic
 hashtables kernel math namespaces parser lexer sequences strings
-strings.parser sbufs vectors words quotations io assocs
-splitting classes.tuple generic.standard generic.math
-generic.parser classes io.pathnames vocabs classes.parser
-classes.union classes.intersection classes.mixin
-classes.predicate classes.singleton classes.tuple.parser
-compiler.units combinators effects.parser slots ;
+strings.parser sbufs vectors words words.symbol words.constant
+words.alias quotations io assocs splitting classes.tuple
+generic.standard generic.math generic.parser classes
+io.pathnames vocabs vocabs.parser classes.parser classes.union
+classes.intersection classes.mixin classes.predicate
+classes.singleton classes.tuple.parser compiler.units
+combinators effects.parser slots ;
 IN: bootstrap.syntax
 
 ! These words are defined as a top-level form, instead of with
@@ -22,7 +23,8 @@ IN: bootstrap.syntax
     "syntax" lookup t "delimiter" set-word-prop ;
 
 : define-syntax ( name quot -- )
-    [ "syntax" lookup dup ] dip define make-parsing ;
+    [ dup "syntax" lookup [ dup ] [ no-word-error ] ?if ] dip
+    define make-parsing ;
 
 [
     { "]" "}" ";" ">>" } [ define-delimiter ] each
@@ -51,6 +53,22 @@ IN: bootstrap.syntax
 
     "USING:" [ ";" parse-tokens add-use ] define-syntax
 
+    "QUALIFIED:" [ scan dup add-qualified ] define-syntax
+
+    "QUALIFIED-WITH:" [ scan scan add-qualified ] define-syntax
+
+    "FROM:" [
+        scan "=>" expect ";" parse-tokens swap add-words-from
+    ] define-syntax
+
+    "EXCLUDE:" [
+        scan "=>" expect ";" parse-tokens swap add-words-excluding
+    ] define-syntax
+
+    "RENAME:" [
+        scan scan "=>" expect scan add-renamed-word
+    ] define-syntax
+
     "HEX:" [ 16 parse-base ] define-syntax
     "OCT:" [ 8 parse-base ] define-syntax
     "BIN:" [ 2 parse-base ] define-syntax
@@ -97,6 +115,24 @@ IN: bootstrap.syntax
         CREATE-WORD define-symbol
     ] define-syntax
 
+    "SYMBOLS:" [
+        ";" parse-tokens
+        [ create-in dup reset-generic define-symbol ] each
+    ] define-syntax
+
+    "SINGLETONS:" [
+        ";" parse-tokens
+        [ create-class-in define-singleton-class ] each
+    ] define-syntax
+    
+    "ALIAS:" [
+        CREATE-WORD scan-word define-alias
+    ] define-syntax
+
+    "CONSTANT:" [
+        CREATE scan-object define-constant
+    ] define-syntax
+
     "DEFER:" [
         scan current-vocab create
         dup old-definitions get [ delete-at ] with each
diff --git a/core/vocabs/parser/authors.txt b/core/vocabs/parser/authors.txt
new file mode 100644 (file)
index 0000000..3095b9b
--- /dev/null
@@ -0,0 +1,3 @@
+Daniel Ehrenberg
+Bruno Deferrari
+Slava Pestov
diff --git a/core/vocabs/parser/parser-docs.factor b/core/vocabs/parser/parser-docs.factor
new file mode 100644 (file)
index 0000000..b2e9649
--- /dev/null
@@ -0,0 +1,81 @@
+USING: help.markup help.syntax parser ;
+IN: vocabs.parser
+
+ARTICLE: "vocabulary-search-shadow" "Shadowing word names"
+"If adding a vocabulary to the search path results in a word in another vocabulary becoming inaccessible due to the new vocabulary defining a word with the same name, we say that the old word has been " { $emphasis "shadowed" } "."
+$nl
+"Here is an example where shadowing occurs:"
+{ $code
+    "IN: foe"
+    "USING: sequences io ;"
+    ""
+    ": append"
+    "    \"foe::append calls sequences:append\" print  append ;"
+    ""
+    "IN: fee"
+    ""
+    ": append"
+    "    \"fee::append calls fee:append\" print  append ;"
+    ""
+    "IN: fox"
+    "USE: foe"
+    ""
+    ": append"
+    "    \"fox::append calls foe:append\" print  append ;"
+    ""
+    "\"1234\" \"5678\" append print"
+    ""
+    "USE: fox"
+    "\"1234\" \"5678\" append print"
+}
+"When placed in a source file and run, the above code produces the following output:"
+{ $code
+    "foe:append calls sequences:append"
+    "12345678"
+    "fee:append calls foe:append"
+    "foe:append calls sequences:append"
+    "12345678"
+}
+"The " { $vocab-link "qualified" } " vocabulary contains some tools for helping with shadowing." ;
+
+ARTICLE: "vocabulary-search-errors"  "Word lookup errors"
+"If the parser cannot not find a word in the current vocabulary search path, it attempts to look for the word in all loaded vocabularies."
+$nl
+"If " { $link auto-use? } " mode is off, a restartable error is thrown with a restart for each vocabulary in question, together with a restart which defers the word in the current vocabulary, as if " { $link POSTPONE: DEFER: } " was used."
+$nl
+"If " { $link auto-use? } " mode is on and only one vocabulary has a word with this name, the vocabulary is added to the search path and parsing continues."
+$nl
+"If any restarts were invoked, or if " { $link auto-use? } " is on, the parser will print the correct " { $link POSTPONE: USING: } " after parsing completes. This form can be copy and pasted back into the source file."
+{ $subsection auto-use? } ;
+
+ARTICLE: "vocabulary-search" "Vocabulary search path"
+"When the parser reads a token, it attempts to look up a word named by that token. The lookup is performed by searching each vocabulary in the search path, in order."
+$nl
+"For a source file the vocabulary search path starts off with one vocabulary:"
+{ $code "syntax" }
+"The " { $vocab-link "syntax" } " vocabulary consists of a set of parsing words for reading Factor data and defining new words."
+$nl
+"In the listener, the " { $vocab-link "scratchpad" } " is the default vocabulary for new word definitions. However, when loading source files, there is no default vocabulary. Defining words before declaring a vocabulary with " { $link POSTPONE: IN: } " results in an error."
+$nl
+"At the interactive listener, the default search path contains many more vocabularies. Details on the default search path and parser invocation are found in " { $link "parser" } "."
+$nl
+"Three parsing words deal with the vocabulary search path:"
+{ $subsection POSTPONE: IN: }
+{ $subsection POSTPONE: USE: }
+{ $subsection POSTPONE: USING: }
+"There are some additional parsing words give more control over word lookup than is offered by " { $link POSTPONE: USE: } " and " { $link POSTPONE: USING: } ":"
+{ $subsection POSTPONE: QUALIFIED: }
+{ $subsection POSTPONE: QUALIFIED-WITH: }
+{ $subsection POSTPONE: FROM: }
+{ $subsection POSTPONE: EXCLUDE: }
+{ $subsection POSTPONE: RENAME: }
+"These words are useful when there is no way to avoid using two vocabularies with identical word names in the same source file."
+$nl
+"Private words can be defined; note that this is just a convention and they can be called from other vocabularies anyway:"
+{ $subsection POSTPONE: <PRIVATE }
+{ $subsection POSTPONE: PRIVATE> }
+{ $subsection "vocabulary-search-errors" }
+{ $subsection "vocabulary-search-shadow" }
+{ $see-also "words" } ;
+
+ABOUT: "vocabulary-search"
diff --git a/core/vocabs/parser/parser.factor b/core/vocabs/parser/parser.factor
new file mode 100644 (file)
index 0000000..35feae3
--- /dev/null
@@ -0,0 +1,59 @@
+! Copyright (C) 2007, 2008 Daniel Ehrenberg, Bruno Deferrari,
+! Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: assocs hashtables kernel namespaces sequences
+sets strings vocabs sorting accessors arrays ;
+IN: vocabs.parser
+
+ERROR: no-word-error name ;
+
+: word-restarts ( name possibilities -- restarts )
+    natural-sort
+    [ [ vocabulary>> "Use the " " vocabulary" surround ] keep ] { } map>assoc
+    swap "Defer word in current vocabulary" swap 2array
+    suffix ;
+
+: <no-word-error> ( name possibilities -- error restarts )
+    [ drop \ no-word-error boa ] [ word-restarts ] 2bi ;
+
+SYMBOL: use
+SYMBOL: in
+
+: (use+) ( vocab -- )
+    vocab-words use get push ;
+
+: use+ ( vocab -- )
+    load-vocab (use+) ;
+
+: add-use ( seq -- ) [ use+ ] each ;
+
+: set-use ( seq -- )
+    [ vocab-words ] V{ } map-as sift use set ;
+
+: add-qualified ( vocab prefix -- )
+    [ load-vocab vocab-words ] [ CHAR: : suffix ] bi*
+    [ swap [ prepend ] dip ] curry assoc-map
+    use get push ;
+
+: partial-vocab ( words vocab -- assoc )
+    load-vocab vocab-words
+    [ dupd at [ no-word-error ] unless* ] curry { } map>assoc ;
+
+: add-words-from ( words vocab -- )
+    partial-vocab use get push ;
+
+: partial-vocab-excluding ( words vocab -- assoc )
+    load-vocab [ vocab-words keys swap diff ] keep partial-vocab ;
+
+: add-words-excluding ( words vocab -- )
+    partial-vocab-excluding use get push ;
+
+: add-renamed-word ( word vocab new-name -- )
+    [ load-vocab vocab-words dupd at [ ] [ no-word-error ] ?if ] dip
+    associate use get push ;
+
+: check-vocab-string ( name -- name )
+    dup string? [ "Vocabulary name must be a string" throw ] unless ;
+
+: set-in ( name -- )
+    check-vocab-string dup in set create-vocab (use+) ;
diff --git a/core/words/alias/alias-docs.factor b/core/words/alias/alias-docs.factor
new file mode 100644 (file)
index 0000000..d569647
--- /dev/null
@@ -0,0 +1,12 @@
+USING: help.markup help.syntax words.alias ;
+IN: words.alias
+
+ARTICLE: "words.alias" "Word aliasing"
+"There is a syntax for defining new names for existing words. This useful for C library bindings, for example in the Win32 API, where words need to be renamed for symmetry."
+$nl
+"Define a new word that aliases another word:"
+{ $subsection POSTPONE: ALIAS: }
+"Define an alias at run-time:"
+{ $subsection define-alias } ;
+
+ABOUT: "words.alias"
diff --git a/core/words/alias/alias.factor b/core/words/alias/alias.factor
new file mode 100644 (file)
index 0000000..0615e83
--- /dev/null
@@ -0,0 +1,16 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: quotations effects accessors sequences words kernel ;
+IN: words.alias
+
+PREDICATE: alias < word "alias" word-prop ;
+
+: define-alias ( new old -- )
+    [ [ 1quotation ] [ stack-effect ] bi define-inline ]
+    [ drop t "alias" set-word-prop ] 2bi ;
+
+M: alias reset-word
+    [ call-next-method ] [ f "alias" set-word-prop ] bi ;
+
+M: alias stack-effect
+    def>> first stack-effect ;
diff --git a/core/words/alias/authors.txt b/core/words/alias/authors.txt
new file mode 100644 (file)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/core/words/alias/summary.txt b/core/words/alias/summary.txt
new file mode 100644 (file)
index 0000000..15690a7
--- /dev/null
@@ -0,0 +1 @@
+Defining multiple words with the same name
diff --git a/core/words/constant/constant.factor b/core/words/constant/constant.factor
new file mode 100644 (file)
index 0000000..43b7f37
--- /dev/null
@@ -0,0 +1,10 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors kernel sequences words ;
+IN: words.constant
+
+PREDICATE: constant < word ( obj -- ? )
+    def>> dup length 1 = [ first word? not ] [ drop f ] if ;
+
+: define-constant ( word value -- )
+    [ ] curry (( -- value )) define-inline ;
diff --git a/core/words/symbol/symbol-docs.factor b/core/words/symbol/symbol-docs.factor
new file mode 100644 (file)
index 0000000..1fcba9a
--- /dev/null
@@ -0,0 +1,28 @@
+USING: help.syntax help.markup words.symbol words compiler.units ;
+IN: words.symbol
+
+HELP: symbol
+{ $description "The class of symbols created by " { $link POSTPONE: SYMBOL: } "." } ;
+
+HELP: define-symbol
+{ $values { "word" word } }
+{ $description "Defines the word to push itself on the stack when executed. This is the run time equivalent of " { $link POSTPONE: SYMBOL: } "." }
+{ $notes "This word must be called from inside " { $link with-compilation-unit } "." }
+{ $side-effects "word" } ;
+
+ARTICLE: "words.symbol" "Symbols"
+"A symbol pushes itself on the stack when executed. By convention, symbols are used as variable names (" { $link "namespaces" } ")."
+{ $subsection symbol }
+{ $subsection symbol? }
+"Defining symbols at parse time:"
+{ $subsection POSTPONE: SYMBOL: }
+{ $subsection POSTPONE: SYMBOLS: }
+"Defining symbols at run time:"
+{ $subsection define-symbol }
+"Symbols are just compound definitions in disguise. The following two lines are equivalent:"
+{ $code
+    "SYMBOL: foo"
+    ": foo ( -- value ) \\ foo ;"
+} ;
+
+ABOUT: "words.symbol"
diff --git a/core/words/symbol/symbol.factor b/core/words/symbol/symbol.factor
new file mode 100644 (file)
index 0000000..a107808
--- /dev/null
@@ -0,0 +1,15 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel sequences accessors definitions
+words words.constant ;
+IN: words.symbol
+
+PREDICATE: symbol < constant ( obj -- ? )
+    [ def>> ] [ [ ] curry ] bi sequence= ;
+
+M: symbol definer drop \ SYMBOL: f ;
+
+M: symbol definition drop f ;
+
+: define-symbol ( word -- )
+    dup define-constant ;
index 91b10936c0ad8208309c3e361853160ebafe3b13..02fb5cf54efca6f811c2c329794369158eacf7eb 100644 (file)
@@ -35,20 +35,6 @@ $nl
 $nl
 "All other types of word definitions, such as " { $link "symbols" } " and " { $link "generic" } ", are just special cases of the above." ;
 
-ARTICLE: "symbols" "Symbols"
-"A symbol pushes itself on the stack when executed. By convention, symbols are used as variable names (" { $link "namespaces" } ")."
-{ $subsection symbol }
-{ $subsection symbol? }
-"Defining symbols at parse time:"
-{ $subsection POSTPONE: SYMBOL: }
-"Defining symbols at run time:"
-{ $subsection define-symbol }
-"Symbols are just compound definitions in disguise. The following two lines are equivalent:"
-{ $code
-    "SYMBOL: foo"
-    ": foo ( -- value ) \\ foo ;"
-} ;
-
 ARTICLE: "primitives" "Primitives"
 "Primitives are words defined in the Factor VM. They provide the essential low-level services to the rest of the system."
 { $subsection primitive }
@@ -91,7 +77,8 @@ ARTICLE: "word-definition" "Defining words"
 }
 "The latter is a more dynamic feature that can be used to implement code generation and such, and in fact parse time defining words are implemented in terms of run time defining words."
 { $subsection "colon-definition" }
-{ $subsection "symbols" }
+{ $subsection "words.symbol" }
+{ $subsection "words.alias" }
 { $subsection "primitives" }
 { $subsection "deferred" }
 { $subsection "declarations" }
@@ -193,9 +180,6 @@ HELP: deferred
 HELP: primitive
 { $description "The class of primitive words." } ;
 
-HELP: symbol
-{ $description "The class of symbols created by " { $link POSTPONE: SYMBOL: } "." } ;
-
 HELP: word-prop
 { $values { "word" word } { "name" "a property name" } { "value" "a property value" } }
 { $description "Retrieves a word property. Word property names are conventionally strings." } ;
@@ -214,12 +198,6 @@ HELP: word-xt ( word -- start end )
 { $values { "word" word } { "start" "the word's start address" } { "end" "the word's end address" } }
 { $description "Outputs the machine code address of the word's definition." } ;
 
-HELP: define-symbol
-{ $values { "word" word } }
-{ $description "Defines the word to push itself on the stack when executed. This is the run time equivalent of " { $link POSTPONE: SYMBOL: } "." }
-{ $notes "This word must be called from inside " { $link with-compilation-unit } "." }
-{ $side-effects "word" } ;
-
 HELP: define
 { $values { "word" word } { "def" quotation } }
 { $description "Defines the word to call a quotation when executed. This is the run time equivalent of " { $link POSTPONE: : } "." }
index f0beab180919b13017886c251ee96ac61d520be2..c75711ea39c4e6217ac55776cc16547fa9803b91 100644 (file)
@@ -28,11 +28,6 @@ PREDICATE: deferred < word ( obj -- ? )
 M: deferred definer drop \ DEFER: f ;
 M: deferred definition drop f ;
 
-PREDICATE: symbol < word ( obj -- ? )
-    [ def>> ] [ [ ] curry ] bi sequence= ;
-M: symbol definer drop \ SYMBOL: f ;
-M: symbol definition drop f ;
-
 PREDICATE: primitive < word ( obj -- ? )
     [ def>> [ do-primitive ] tail? ]
     [ sub-primitive>> >boolean ]
@@ -195,9 +190,6 @@ SYMBOL: visited
 : define-inline ( word def effect -- )
     [ define-declared ] [ 2drop make-inline ] 3bi ;
 
-: define-symbol ( word -- )
-    dup [ ] curry (( -- word )) define-inline ;
-
 GENERIC: reset-word ( word -- )
 
 M: word reset-word
index 383812e602721e12807e57e9615d5d1aabca881a..fbdfa9c66bb41397f312da904873c51c41efbf1b 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 James Cash
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences symbols fry words assocs linked-assocs tools.annotations
+USING: kernel sequences fry words assocs linked-assocs tools.annotations
 coroutines lexer parser quotations arrays namespaces continuations ;
 IN: advice
 
index 5bf4bf3ad3594ae0a6f87882aac6e131c40015b6..8cb5acf74bda955558c97b140c18cba07272c078 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays classes kernel sequences sets
-io prettyprint multi-methods symbols ;
+io prettyprint multi-methods ;
 IN: boolean-expr
 
 ! Demonstrates the use of Unicode symbols in source files, and
index e1c89374fd2cae73de6f188dd9ea41d6e3084ca9..e2acd6e5d50da0dbd58e885741199c44b811bacc 100644 (file)
@@ -6,7 +6,7 @@ USING: kernel alien.c-types combinators namespaces make arrays
        vars colors self self.slots
        random-weighted colors.hsv cfdg.gl accessors
        ui.gadgets.handler ui.gestures assocs ui.gadgets macros
-       qualified specialized-arrays.double ;
+       specialized-arrays.double ;
 
 QUALIFIED: syntax
 
index 32a913ef233ff69031874c5bc924568a5420162b..e292981876dcd60a9ad6d882183da8398432e436 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel base64 checksums.md5 symbols sequences checksums
+USING: kernel base64 checksums.md5 sequences checksums
 locals prettyprint math math.bitwise grouping io combinators
 fry make combinators.short-circuit math.functions splitting ;
 IN: crypto.passwd-md5
index be3ba40ac008da4261d74951333af733e414683e..980af0fd81e946618be5a4de90d2acb666ef5f15 100644 (file)
@@ -7,7 +7,6 @@ USING: kernel byte-arrays combinators strings arrays sequences splitting
        accessors
        combinators.cleave
        newfx
-       symbols
        ;
 
 IN: dns
index cb7b34d8a409aa4b5e87320fd9c4f83e07bfad86..328e4ff01388f89915372f8b1abd37439673fd77 100755 (executable)
@@ -1,4 +1,4 @@
-USING: windows.dinput windows.dinput.constants parser symbols
+USING: windows.dinput windows.dinput.constants parser
 alien.c-types windows.ole32 namespaces assocs kernel arrays
 vectors windows.kernel32 windows.com windows.dinput shuffle
 windows.user32 windows.messages sequences combinators locals
index 7699b8bd1eed9f96508330098b1b7c30f31678b3..fa70cef757c74bf535e56b2b485f709b65570916 100755 (executable)
@@ -1,4 +1,4 @@
-USING: arrays accessors continuations kernel symbols system
+USING: arrays accessors continuations kernel system
 combinators.lib sequences namespaces init vocabs vocabs.loader
 combinators ;
 IN: game-input
index 0e3d48fe5bace99e55fa3e192e3a477f0fff4c2e..c34fcf5f57a632d2f3451809f299311752a8bba7 100755 (executable)
@@ -5,7 +5,7 @@ sequences assocs math arrays stack-checker effects generalizations
 continuations debugger classes.tuple namespaces make vectors
 bit-arrays byte-arrays strings sbufs math.functions macros
 sequences.private combinators mirrors
-combinators.short-circuit fry qualified ;
+combinators.short-circuit fry ;
 RENAME: _ fry => __
 IN: inverse
 
index 622b5eaa2ce3a20e149920bd8791b2f542d33d21..c1cbdcf8b8e022dd57a001a4cc3a0cfcd9d83334 100644 (file)
@@ -1,4 +1,4 @@
-USING: kernel tools.test accessors arrays sequences qualified
+USING: kernel tools.test accessors arrays sequences
        io io.streams.duplex namespaces threads destructors
        calendar irc.client.private irc.client irc.messages.private
        concurrency.mailboxes classes assocs combinators ;
index 8199347feb0c0a2b6529a8374b97044a9c3e99ca..0eba6f6af572148cdd0a520691a354c778a53de7 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Bruno Deferrari, Doug Coleman, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: concurrency.mailboxes kernel io.sockets io.encodings.8-bit calendar
-       accessors destructors namespaces io assocs arrays qualified fry
+       accessors destructors namespaces io assocs arrays fry
        continuations threads strings classes combinators splitting hashtables
        ascii irc.messages ;
 RENAME: join sequences => sjoin
index 41272a43f20109e9dbe9822c7d5bcf02b996bd50..ac1d003b1b7f475b6316657a46d2dc3cfc6ec88a 100644 (file)
@@ -1,4 +1,4 @@
-USING: kernel tools.test accessors arrays qualified
+USING: kernel tools.test accessors arrays
        irc.messages irc.messages.private ;
 EXCLUDE: sequences => join ;
 IN: irc.messages.tests
index 8054dc8075665a4b72e873d087a13bb6e2f6a6b6..c88bbc072ac3aa9c4c8b329ac1fa0614caa006f4 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Bruno Deferrari
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel fry splitting ascii calendar accessors combinators qualified
+USING: kernel fry splitting ascii calendar accessors combinators
        arrays classes.tuple math.order ;
 RENAME: join sequences => sjoin
 EXCLUDE: sequences => join ;
index fd64e9a07e7355b6839fc91a440d3f532e626ef9..59e4cf6cb4727e9d59881efb9e5ded70e502f9a8 100755 (executable)
@@ -3,7 +3,7 @@
 \r
 USING: accessors kernel threads combinators concurrency.mailboxes\r
        sequences strings hashtables splitting fry assocs hashtables colors\r
-       sorting qualified unicode.collation math.order\r
+       sorting unicode.collation math.order\r
        ui ui.gadgets ui.gadgets.panes ui.gadgets.editors\r
        ui.gadgets.scrollers ui.commands ui.gadgets.frames ui.gestures\r
        ui.gadgets.tabs ui.gadgets.grids ui.gadgets.packs ui.gadgets.labels\r
index 01fba499956bcfdef8672f1691bc695f1cf060b2..13dc34135092ea4d14bbec6a381d0082484fe82c 100755 (executable)
@@ -1,5 +1,4 @@
-USING: koszul tools.test kernel sequences assocs namespaces
-symbols ;
+USING: koszul tools.test kernel sequences assocs namespaces ;
 IN: koszul.tests
 
 [
index 5bd679d92a737e29ae153b36669c120504db6ee5..3b675e5258e0f909cb2f74f8193cac4f71c52783 100755 (executable)
@@ -3,7 +3,7 @@
 USING: accessors arrays assocs hashtables assocs io kernel math
 math.vectors math.matrices math.matrices.elimination namespaces
 parser prettyprint sequences words combinators math.parser
-splitting sorting shuffle symbols sets math.order ;
+splitting sorting shuffle sets math.order ;
 IN: koszul
 
 ! Utilities
index 58046ce64c9050a2fc559c997fbde54408f556d3..7327209a06d83146add465e0bdac920961b9fdc4 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: bootstrap.image continuations debugger fry
 io.directories io.directories.hierarchy io.files io.launcher
-kernel mason.common namespaces qualified sequences ;
+kernel mason.common namespaces sequences ;
 FROM: mason.config => target-os ;
 IN: mason.release.tidy
 
index c8a4ee6292654144f1ee7193055a1c770de3ba5a..75ab07709a448900eda60a5f11f76785e6712efe 100755 (executable)
@@ -2,7 +2,7 @@ USING: accessors alien alien.c-types arrays byte-arrays combinators
 combinators.short-circuit fry kernel locals macros
 math math.blas.cblas math.blas.vectors math.blas.vectors.private
 math.complex math.functions math.order functors words
-sequences sequences.merged sequences.private shuffle symbols
+sequences sequences.merged sequences.private shuffle
 specialized-arrays.direct.float specialized-arrays.direct.double
 specialized-arrays.float specialized-arrays.double ;
 IN: math.blas.matrices
index cfdc28bb3d607160194a9b6ec0342a3c944ff9bc..49532665f18ce3f91b55b40cb422e62014b954c8 100755 (executable)
@@ -245,7 +245,6 @@ M: no-method error.
     define ; parsing
 
 ! Definition protocol. We qualify core generics here
-USE: qualified
 QUALIFIED: syntax
 
 syntax:M: generic definer drop \ GENERIC: f ;
index 0da7a9c9fbd0171cb0de22f23e6aec84866a2187..8dd82df0d6e7fe7d3c1ef127cc6db056b8f3d3d2 100644 (file)
@@ -1,5 +1,5 @@
 
-USING: kernel sequences assocs qualified circular sets fry sequences.lib ;
+USING: kernel sequences assocs circular sets fry sequences.lib ;
 
 USING: math multi-methods ;
 
index 132e401f16159f2685c260d2a480c34e8afb0921..5720c09ed9b42917b4f8c1c413a8056098f82d8e 100755 (executable)
@@ -2,7 +2,7 @@ USING: combinators io io.files io.files.links io.directories
 io.pathnames io.streams.string kernel math math.parser
 continuations namespaces pack prettyprint sequences strings
 system tools.hexdump io.encodings.binary summary accessors
-io.backend symbols byte-arrays ;
+io.backend byte-arrays ;
 IN: tar
 
 : zero-checksum 256 ; inline
index c5e059c51958a13100b5e8deec95d12996c2328b..deb3e15845789020d6781c3bb4b2cb264d76fdda 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: io.files io.encodings.ascii sequences generalizations
-math.parser combinators kernel memoize csv symbols summary
+math.parser combinators kernel memoize csv summary
 words accessors math.order binary-search ;
 IN: usa-cities
 
index 8c0b1beb8323303e4eb387f4608a7d17d628e804..322212c4fc7170edf9036ae8860f75d6d82d5dfa 100644 (file)
@@ -1,14 +1,15 @@
 USING: tools.deploy.config ;
 H{
+    { deploy-io 1 }
+    { deploy-threads? f }
+    { deploy-word-defs? f }
     { deploy-ui? f }
     { deploy-compiler? t }
+    { deploy-word-props? f }
+    { "stop-after-last-window?" t }
+    { deploy-unicode? f }
     { deploy-c-types? f }
+    { deploy-math? f }
     { deploy-reflection 1 }
     { deploy-name "WebKit demo" }
-    { deploy-io 1 }
-    { deploy-math? f }
-    { deploy-word-props? f }
-    { "stop-after-last-window?" t }
-    { deploy-word-defs? f }
-    { deploy-threads? f }
 }