From b62630b5ac8c8b99883b467db92bceadf13e480b Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 14 May 2009 23:23:06 -0500 Subject: [PATCH] Updating code in basis and extra for stricter vocab search path semantics --- basis/alien/fortran/fortran.factor | 2 +- basis/channels/channels.factor | 2 +- basis/checksums/sha1/sha1.factor | 2 +- basis/db/errors/postgresql/postgresql.factor | 3 ++- basis/db/tester/tester.factor | 2 +- basis/db/tuples/tuples.factor | 2 +- basis/formatting/formatting.factor | 8 ++++---- basis/furnace/sessions/sessions-docs.factor | 2 +- basis/game-input/iokit/iokit.factor | 2 +- basis/help/html/html.factor | 2 +- basis/html/templates/chloe/chloe-docs.factor | 3 ++- basis/html/templates/chloe/chloe.factor | 4 ++-- basis/html/templates/chloe/syntax/syntax.factor | 12 +++++------- basis/html/templates/fhtml/fhtml.factor | 2 +- basis/http/server/server.factor | 4 +--- basis/inverse/inverse.factor | 2 +- basis/io/encodings/gb18030/gb18030.factor | 5 +++-- basis/io/mmap/mmap.factor | 2 +- basis/locals/locals-tests.factor | 8 -------- basis/peg/ebnf/ebnf.factor | 2 +- basis/random/dummy/dummy.factor | 2 +- basis/regexp/classes/classes.factor | 3 ++- basis/soundex/soundex.factor | 2 +- basis/tools/files/unix/unix.factor | 2 +- .../ui/tools/listener/completion/completion.factor | 8 ++++---- basis/ui/tools/listener/listener.factor | 2 +- basis/unicode/collation/collation.factor | 11 +++++------ basis/xml/syntax/syntax.factor | 4 ++-- basis/xmode/code2html/code2html.factor | 6 +++--- basis/xmode/marker/marker.factor | 3 +-- extra/4DNav/turtle/turtle.factor | 9 +++------ extra/4DNav/window3D/window3D.factor | 1 - extra/benchmark/backtrack/backtrack.factor | 2 +- extra/bunny/outlined/outlined.factor | 1 + extra/fjsc/fjsc.factor | 3 +-- extra/fuel/eval/eval.factor | 14 +++++++------- extra/fuel/xref/xref.factor | 6 +++++- extra/google-tech-talk/google-tech-talk.factor | 2 +- extra/hashcash/hashcash.factor | 7 +++---- extra/html/parser/analyzer/analyzer.factor | 2 +- extra/id3/id3.factor | 2 +- extra/infix/infix.factor | 2 +- extra/jamshred/tunnel/tunnel.factor | 1 + extra/koszul/koszul.factor | 2 +- extra/mason/common/common.factor | 2 +- extra/mason/mason.factor | 5 +++-- extra/mason/release/release.factor | 2 +- extra/mongodb/benchmark/benchmark.factor | 4 ++-- extra/mongodb/tuple/tuple.factor | 2 ++ extra/otug-talk/otug-talk.factor | 2 +- extra/peg/javascript/parser/parser.factor | 3 ++- extra/project-euler/common/common.factor | 2 +- extra/spheres/spheres.factor | 1 + extra/tetris/tetris.factor | 1 + extra/ui/gadgets/book-extras/book-extras.factor | 1 + extra/vpri-talk/vpri-talk.factor | 2 +- extra/webapps/site-watcher/site-watcher.factor | 2 +- extra/webapps/wiki/wiki.factor | 2 +- {extra => unmaintained}/sandbox/authors.txt | 0 .../sandbox/sandbox-tests.factor | 0 {extra => unmaintained}/sandbox/sandbox.factor | 0 {extra => unmaintained}/sandbox/summary.txt | 0 .../sandbox/syntax/syntax.factor | 0 63 files changed, 98 insertions(+), 101 deletions(-) rename {extra => unmaintained}/sandbox/authors.txt (100%) rename {extra => unmaintained}/sandbox/sandbox-tests.factor (100%) rename {extra => unmaintained}/sandbox/sandbox.factor (100%) rename {extra => unmaintained}/sandbox/summary.txt (100%) rename {extra => unmaintained}/sandbox/syntax/syntax.factor (100%) diff --git a/basis/alien/fortran/fortran.factor b/basis/alien/fortran/fortran.factor index b27c62b9a1..54b799f675 100644 --- a/basis/alien/fortran/fortran.factor +++ b/basis/alien/fortran/fortran.factor @@ -421,7 +421,7 @@ PRIVATE> : define-fortran-record ( name vocab fields -- ) [ >lower ] [ ] [ fortran-record>c-struct ] tri* define-struct ; -SYNTAX: RECORD: scan in get parse-definition define-fortran-record ; +SYNTAX: RECORD: scan current-vocab parse-definition define-fortran-record ; : set-fortran-abi ( library -- ) library-fortran-abis get-global at fortran-abi set ; diff --git a/basis/channels/channels.factor b/basis/channels/channels.factor index 9b8c418634..0eb7881f95 100644 --- a/basis/channels/channels.factor +++ b/basis/channels/channels.factor @@ -3,7 +3,7 @@ ! ! Channels - based on ideas from newsqueak USING: kernel sequences threads continuations -random math accessors random ; +random math accessors ; IN: channels TUPLE: channel receivers senders ; diff --git a/basis/checksums/sha1/sha1.factor b/basis/checksums/sha1/sha1.factor index e7aee0dd09..707aa66ba6 100644 --- a/basis/checksums/sha1/sha1.factor +++ b/basis/checksums/sha1/sha1.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2006, 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: arrays combinators kernel io io.encodings.binary io.files -io.streams.byte-array math.vectors strings sequences namespaces +io.streams.byte-array math.vectors strings namespaces make math parser sequences assocs grouping vectors io.binary hashtables math.bitwise checksums checksums.common checksums.stream ; diff --git a/basis/db/errors/postgresql/postgresql.factor b/basis/db/errors/postgresql/postgresql.factor index 02b43ecd88..3cd0909288 100644 --- a/basis/db/errors/postgresql/postgresql.factor +++ b/basis/db/errors/postgresql/postgresql.factor @@ -1,7 +1,8 @@ ! Copyright (C) 2009 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: kernel db.errors peg.ebnf strings sequences math -combinators.short-circuit accessors math.parser quoting ; +combinators.short-circuit accessors math.parser quoting +locals ; IN: db.errors.postgresql EBNF: parse-postgresql-sql-error diff --git a/basis/db/tester/tester.factor b/basis/db/tester/tester.factor index 56bac7efcd..19140259bf 100644 --- a/basis/db/tester/tester.factor +++ b/basis/db/tester/tester.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: concurrency.combinators db.pools db.sqlite db.tuples db.types kernel math random threads tools.test db sequences -io prettyprint db.postgresql db.sqlite accessors io.files.temp +io prettyprint db.postgresql accessors io.files.temp namespaces fry system math.parser ; IN: db.tester diff --git a/basis/db/tuples/tuples.factor b/basis/db/tuples/tuples.factor index 19d4be5fc8..388c9ba47e 100644 --- a/basis/db/tuples/tuples.factor +++ b/basis/db/tuples/tuples.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: arrays assocs classes db kernel namespaces classes.tuple words sequences slots math accessors -math.parser io prettyprint db.types continuations +math.parser io prettyprint continuations destructors mirrors sets db.types db.private fry combinators.short-circuit db.errors ; IN: db.tuples diff --git a/basis/formatting/formatting.factor b/basis/formatting/formatting.factor index 5a517e4ac4..f8b9ba501b 100644 --- a/basis/formatting/formatting.factor +++ b/basis/formatting/formatting.factor @@ -1,10 +1,10 @@ ! Copyright (C) 2008 John Benediktsson ! See http://factorcode.org/license.txt for BSD license -USING: accessors arrays ascii assocs calendar combinators fry kernel -generalizations io io.encodings.ascii io.files io.streams.string -macros math math.functions math.parser peg.ebnf quotations -sequences splitting strings unicode.case vectors combinators.smart ; +USING: accessors arrays assocs calendar combinators fry kernel +generalizations io io.streams.string macros math math.functions +math.parser peg.ebnf quotations sequences splitting strings +unicode.categories unicode.case vectors combinators.smart ; IN: formatting diff --git a/basis/furnace/sessions/sessions-docs.factor b/basis/furnace/sessions/sessions-docs.factor index 7a4de18eaf..5c1ceecbf0 100644 --- a/basis/furnace/sessions/sessions-docs.factor +++ b/basis/furnace/sessions/sessions-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax io.streams.string quotations -strings calendar serialize kernel furnace.db words words.symbol +strings calendar serialize furnace.db words words.symbol kernel ; IN: furnace.sessions diff --git a/basis/game-input/iokit/iokit.factor b/basis/game-input/iokit/iokit.factor index 5f09a054f9..c42d48d569 100755 --- a/basis/game-input/iokit/iokit.factor +++ b/basis/game-input/iokit/iokit.factor @@ -1,7 +1,7 @@ USING: cocoa cocoa.plists core-foundation iokit iokit.hid kernel cocoa.enumeration destructors math.parser cocoa.application sequences locals combinators.short-circuit threads -namespaces assocs vectors arrays combinators hints alien +namespaces assocs arrays combinators hints alien core-foundation.run-loop accessors sequences.private alien.c-types math parser game-input vectors ; IN: game-input.iokit diff --git a/basis/help/html/html.factor b/basis/help/html/html.factor index 348fcbbbfb..09208749b9 100644 --- a/basis/help/html/html.factor +++ b/basis/help/html/html.factor @@ -4,7 +4,7 @@ USING: io.encodings.utf8 io.encodings.ascii io.encodings.binary io.files io.files.temp io.directories html.streams help kernel assocs sequences make words accessors arrays help.topics vocabs vocabs.hierarchy help.vocabs namespaces prettyprint io -vocabs.loader serialize fry memoize ascii unicode.case math.order +vocabs.loader serialize fry memoize unicode.case math.order sorting debugger html xml.syntax xml.writer math.parser ; IN: help.html diff --git a/basis/html/templates/chloe/chloe-docs.factor b/basis/html/templates/chloe/chloe-docs.factor index fcfd454478..9716407de8 100644 --- a/basis/html/templates/chloe/chloe-docs.factor +++ b/basis/html/templates/chloe/chloe-docs.factor @@ -1,8 +1,9 @@ IN: html.templates.chloe -USING: xml.data help.markup help.syntax html.components html.forms +USING: help.markup help.syntax html.components html.forms html.templates html.templates.chloe.syntax html.templates.chloe.compiler html.templates.chloe.components math strings quotations namespaces ; +FROM: xml.data => tag ; HELP: { $values { "path" "a pathname string without the trailing " { $snippet ".xml" } " extension" } { "chloe" chloe } } diff --git a/basis/html/templates/chloe/chloe.factor b/basis/html/templates/chloe/chloe.factor index 1fe90b08d3..f42a5c3bde 100644 --- a/basis/html/templates/chloe/chloe.factor +++ b/basis/html/templates/chloe/chloe.factor @@ -1,11 +1,11 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors kernel sequences combinators kernel fry +USING: accessors kernel sequences combinators fry namespaces make classes.tuple assocs splitting words arrays io io.files io.files.info io.encodings.utf8 io.streams.string unicode.case mirrors math urls present multiline quotations xml logging -xml.data xml.writer xml.syntax strings +xml.writer xml.syntax strings html.forms html html.components diff --git a/basis/html/templates/chloe/syntax/syntax.factor b/basis/html/templates/chloe/syntax/syntax.factor index 7c47a44d9e..f7da0fe277 100644 --- a/basis/html/templates/chloe/syntax/syntax.factor +++ b/basis/html/templates/chloe/syntax/syntax.factor @@ -1,13 +1,11 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -IN: html.templates.chloe.syntax -USING: accessors kernel sequences combinators kernel namespaces -classes.tuple assocs splitting words arrays memoize parser lexer -io io.files io.encodings.utf8 io.streams.string -unicode.case mirrors fry math urls -multiline xml xml.data xml.writer xml.syntax -html.components +USING: accessors sequences combinators kernel namespaces classes.tuple +assocs splitting words arrays memoize parser lexer io io.files +io.encodings.utf8 io.streams.string unicode.case mirrors fry math urls +multiline xml xml.data xml.writer xml.syntax html.components html.templates ; +IN: html.templates.chloe.syntax SYMBOL: tags diff --git a/basis/html/templates/fhtml/fhtml.factor b/basis/html/templates/fhtml/fhtml.factor index 21e9f8352d..34783a0b4a 100644 --- a/basis/html/templates/fhtml/fhtml.factor +++ b/basis/html/templates/fhtml/fhtml.factor @@ -60,7 +60,7 @@ SYNTAX: %> lexer get parse-%> ; [ "quiet" on parser-notes off - "html.templates.fhtml" use+ + "html.templates.fhtml" use-vocab string-lines parse-template-lines ] with-file-vocabs ; diff --git a/basis/http/server/server.factor b/basis/http/server/server.factor index 3beb730499..c838471e3f 100755 --- a/basis/http/server/server.factor +++ b/basis/http/server/server.factor @@ -17,7 +17,6 @@ io.servers.connection io.timeouts io.crlf fry logging logging.insomniac calendar urls urls.encoding -mime.multipart unicode.categories http http.parsers @@ -27,6 +26,7 @@ html.templates html.streams html xml.writer ; +FROM: mime.multipart => parse-multipart ; IN: http.server : check-absolute ( url -- url ) @@ -283,8 +283,6 @@ M: http-server handle-client* : http-insomniac ( -- ) "http.server" { "httpd-hit" } schedule-insomniac ; -USE: vocabs.loader - "http.server.filters" require "http.server.dispatchers" require "http.server.redirection" require diff --git a/basis/inverse/inverse.factor b/basis/inverse/inverse.factor index 4e807bd992..7690b34410 100755 --- a/basis/inverse/inverse.factor +++ b/basis/inverse/inverse.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007, 2009 Daniel Ehrenberg. ! See http://factorcode.org/license.txt for BSD license. USING: accessors kernel words summary slots quotations -sequences assocs math arrays stack-checker effects generalizations +sequences assocs math arrays stack-checker effects continuations debugger classes.tuple namespaces make vectors bit-arrays byte-arrays strings sbufs math.functions macros sequences.private combinators mirrors splitting combinators.smart diff --git a/basis/io/encodings/gb18030/gb18030.factor b/basis/io/encodings/gb18030/gb18030.factor index cecf103162..2be709dbc9 100644 --- a/basis/io/encodings/gb18030/gb18030.factor +++ b/basis/io/encodings/gb18030/gb18030.factor @@ -2,8 +2,9 @@ ! See http://factorcode.org/license.txt for BSD license. USING: xml xml.data kernel io io.encodings interval-maps splitting fry math.parser sequences combinators assocs locals accessors math arrays -byte-arrays values io.encodings.ascii ascii io.files biassocs -math.order combinators.short-circuit io.binary io.encodings.iana ; +byte-arrays values ascii io.files biassocs math.order +combinators.short-circuit io.binary io.encodings.iana ; +FROM: io.encodings.ascii => ascii ; IN: io.encodings.gb18030 SINGLETON: gb18030 diff --git a/basis/io/mmap/mmap.factor b/basis/io/mmap/mmap.factor index e03d5fb30b..9a4443e8e5 100644 --- a/basis/io/mmap/mmap.factor +++ b/basis/io/mmap/mmap.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: continuations destructors io.files io.files.info io.backend kernel quotations system alien alien.accessors -accessors system vocabs.loader combinators alien.c-types +accessors vocabs.loader combinators alien.c-types math ; IN: io.mmap diff --git a/basis/locals/locals-tests.factor b/basis/locals/locals-tests.factor index 1549a77663..414b2da45c 100644 --- a/basis/locals/locals-tests.factor +++ b/basis/locals/locals-tests.factor @@ -126,14 +126,6 @@ write-test-2 "q" set [ 9 ] [ 4 write-test-5 ] unit-test -SYMBOL: a - -:: use-test ( a b c -- a b c ) - USE: kernel - a b c ; - -[ t ] [ a symbol? ] unit-test - :: let-let-test ( n -- n ) [let | n [ n 3 + ] | n ] ; [ 13 ] [ 10 let-let-test ] unit-test diff --git a/basis/peg/ebnf/ebnf.factor b/basis/peg/ebnf/ebnf.factor index 94df4ca209..d4ad62fbea 100644 --- a/basis/peg/ebnf/ebnf.factor +++ b/basis/peg/ebnf/ebnf.factor @@ -461,7 +461,7 @@ M: ebnf-sequence build-locals ( code ast -- code ) M: ebnf-var build-locals ( code ast -- ) [ - "USING: locals kernel ; [let* | " % + "FROM: locals => [let* ; FROM: kernel => dup ; [let* | " % name>> % " [ dup ] " % " | " % % diff --git a/basis/random/dummy/dummy.factor b/basis/random/dummy/dummy.factor index e0cb83c330..dadf93fd43 100644 --- a/basis/random/dummy/dummy.factor +++ b/basis/random/dummy/dummy.factor @@ -1,4 +1,4 @@ -USING: kernel random math accessors random ; +USING: kernel math accessors random ; IN: random.dummy TUPLE: random-dummy i ; diff --git a/basis/regexp/classes/classes.factor b/basis/regexp/classes/classes.factor index a1c4e3ca2a..e3e2f0bcf3 100644 --- a/basis/regexp/classes/classes.factor +++ b/basis/regexp/classes/classes.factor @@ -1,9 +1,10 @@ ! Copyright (C) 2008, 2009 Doug Coleman, Daniel Ehrenberg. ! See http://factorcode.org/license.txt for BSD license. USING: accessors kernel math math.order words combinators locals -ascii unicode.categories combinators.short-circuit sequences +unicode.categories combinators.short-circuit sequences fry macros arrays assocs sets classes mirrors unicode.script unicode.data ; +FROM: ascii => ascii? ; IN: regexp.classes SINGLETONS: dot letter-class LETTER-class Letter-class digit-class diff --git a/basis/soundex/soundex.factor b/basis/soundex/soundex.factor index 2fd928252f..37eaf08822 100644 --- a/basis/soundex/soundex.factor +++ b/basis/soundex/soundex.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: sequences grouping assocs kernel ascii ascii tr ; +USING: sequences grouping assocs kernel ascii tr ; IN: soundex TR: soundex-tr diff --git a/basis/tools/files/unix/unix.factor b/basis/tools/files/unix/unix.factor index 90e91529a1..d5fdd6c889 100755 --- a/basis/tools/files/unix/unix.factor +++ b/basis/tools/files/unix/unix.factor @@ -4,7 +4,7 @@ USING: accessors combinators kernel system unicode.case io.files io.files.info io.files.info.unix generalizations strings arrays sequences math.parser unix.groups unix.users tools.files.private unix.stat math fry macros combinators.smart -io.files.info.unix io tools.files math.order prettyprint ; +io tools.files math.order prettyprint ; IN: tools.files.unix > { { CHAR: \n CHAR: \s } } substitute ] { } map>assoc ; -TUPLE: word-completion vocabs ; +TUPLE: word-completion manifest ; C: word-completion SINGLETONS: vocab-completion char-completion history-completion ; @@ -62,8 +62,8 @@ M: definition-completion row-columns 2array ; M: word-completion row-color - [ vocabulary>> ] [ vocabs>> ] bi* { - { [ 2dup [ vocab-words ] dip memq? ] [ COLOR: black ] } + [ vocabulary>> ] [ manifest>> ] bi* { + { [ 2dup search-vocabs>> memq? ] [ COLOR: black ] } { [ over ".private" tail? ] [ COLOR: dark-red ] } [ COLOR: dark-gray ] } cond 2nip ; @@ -87,7 +87,7 @@ M: vocab-completion row-color [ { 0 0 } ] 2dip doc-range ; : completion-mode ( interactor -- symbol ) - [ vocabs>> ] [ editor-caret ] [ model>> ] tri up-to-caret " \r\n" split + [ manifest>> ] [ editor-caret ] [ model>> ] tri up-to-caret " \r\n" split { { [ dup { [ complete-IN:/USE:? ] [ complete-USING:? ] } 1|| ] [ 2drop vocab-completion ] } { [ dup complete-CHAR:? ] [ 2drop char-completion ] } diff --git a/basis/ui/tools/listener/listener.factor b/basis/ui/tools/listener/listener.factor index 19328b0b31..2e89482c3d 100644 --- a/basis/ui/tools/listener/listener.factor +++ b/basis/ui/tools/listener/listener.factor @@ -55,7 +55,7 @@ M: vocab-completion (word-at-caret) drop dup vocab-exists? [ >vocab-link ] [ drop f ] if ; M: word-completion (word-at-caret) - manifest>> search-manifest ; + manifest>> dup [ search-manifest ] [ 2drop f ] if ; M: char-completion (word-at-caret) 2drop f ; diff --git a/basis/unicode/collation/collation.factor b/basis/unicode/collation/collation.factor index b6eddccae0..f8beca3c60 100755 --- a/basis/unicode/collation/collation.factor +++ b/basis/unicode/collation/collation.factor @@ -1,11 +1,10 @@ ! Copyright (C) 2008 Daniel Ehrenberg. ! See http://factorcode.org/license.txt for BSD license. -USING: combinators.short-circuit sequences io.files -io.encodings.ascii kernel values splitting accessors math.parser -ascii io assocs strings math namespaces make sorting combinators -math.order arrays unicode.normalize unicode.data locals -macros sequences.deep words unicode.breaks -quotations combinators.short-circuit simple-flat-file ; +USING: sequences io.files io.encodings.ascii kernel values splitting +accessors math.parser ascii io assocs strings math namespaces make +sorting combinators math.order arrays unicode.normalize unicode.data +locals macros sequences.deep words unicode.breaks quotations +combinators.short-circuit simple-flat-file ; IN: unicode.collation rect-vertices ; IN: bunny.outlined STRING: outlined-pass1-fragment-shader-main-source diff --git a/extra/fjsc/fjsc.factor b/extra/fjsc/fjsc.factor index bc6b8a092f..b6b5ff3b08 100755 --- a/extra/fjsc/fjsc.factor +++ b/extra/fjsc/fjsc.factor @@ -2,8 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors kernel peg strings sequences math math.parser namespaces make words quotations arrays hashtables io -io.streams.string assocs ascii peg.parsers accessors -words.symbol ; +io.streams.string assocs ascii peg.parsers words.symbol ; IN: fjsc TUPLE: ast-number value ; diff --git a/extra/fuel/eval/eval.factor b/extra/fuel/eval/eval.factor index 9f0b6fc0a3..7c83fc6e90 100644 --- a/extra/fuel/eval/eval.factor +++ b/extra/fuel/eval/eval.factor @@ -6,7 +6,7 @@ vectors vocabs.parser ; IN: fuel.eval -TUPLE: fuel-status in use restarts ; +TUPLE: fuel-status manifest restarts ; SYMBOL: fuel-status-stack V{ } clone fuel-status-stack set-global @@ -24,7 +24,7 @@ t fuel-eval-res-flag set-global fuel-eval-res-flag get-global ; : fuel-push-status ( -- ) - in get use get clone restarts get-global clone + manifest get clone restarts get-global clone fuel-status boa fuel-status-stack get push ; @@ -34,9 +34,9 @@ t fuel-eval-res-flag set-global : fuel-pop-status ( -- ) fuel-status-stack get empty? [ fuel-status-stack get pop - [ in>> in set ] - [ use>> clone use set ] - [ restarts>> fuel-pop-restarts ] tri + [ manifest>> clone manifest set ] + [ restarts>> fuel-pop-restarts ] + bi ] unless ; : fuel-forget-error ( -- ) f error set-global ; @@ -60,11 +60,11 @@ t fuel-eval-res-flag set-global [ print-error ] recover ; : (fuel-eval-usings) ( usings -- ) - [ [ add-use ] curry [ drop ] recover ] each + [ [ use-vocab ] curry [ drop ] recover ] each fuel-forget-error fuel-forget-output ; : (fuel-eval-in) ( in -- ) - [ in set ] when* ; + [ set-current-vocab ] when* ; : (fuel-eval-in-context) ( lines in usings -- ) (fuel-begin-eval) diff --git a/extra/fuel/xref/xref.factor b/extra/fuel/xref/xref.factor index 160b7212c4..3dfa129a7f 100644 --- a/extra/fuel/xref/xref.factor +++ b/extra/fuel/xref/xref.factor @@ -35,7 +35,11 @@ MEMO: (vocab-words) ( name -- seq ) >vocab-link words [ name>> ] map ; : current-words ( -- seq ) - use get [ keys ] map concat ; inline + manifest get + [ search-vocabs>> [ words>> ] map ] + [ qualified-vocabs>> [ words>> ] map ] + [ extra-words>> ] + tri 3append assoc-combine keys ; inline : vocabs-words ( names -- seq ) prune [ (vocab-words) ] map concat ; inline diff --git a/extra/google-tech-talk/google-tech-talk.factor b/extra/google-tech-talk/google-tech-talk.factor index 8e2eeeb1a7..5f33af04fe 100644 --- a/extra/google-tech-talk/google-tech-talk.factor +++ b/extra/google-tech-talk/google-tech-talk.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: slides help.markup math arrays hashtables namespaces -sequences kernel sequences parser memoize io.encodings.binary +kernel sequences parser memoize io.encodings.binary locals kernel.private help.vocabs assocs quotations urls peg.ebnf tools.annotations tools.crossref help.topics math.functions compiler.tree.optimizer diff --git a/extra/hashcash/hashcash.factor b/extra/hashcash/hashcash.factor index 1eb690b20f..a77ebf2577 100755 --- a/extra/hashcash/hashcash.factor +++ b/extra/hashcash/hashcash.factor @@ -1,9 +1,8 @@ ! Copyright (C) 2009 Diego Martinelli. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors byte-arrays calendar calendar.format -checksums checksums.openssl classes.tuple -fry kernel make math math.functions math.parser math.ranges -present random sequences splitting strings syntax ; +USING: accessors byte-arrays calendar calendar.format checksums +checksums.openssl classes.tuple fry kernel make math math.functions +math.parser math.ranges present random sequences splitting strings ; IN: hashcash ! Hashcash implementation diff --git a/extra/html/parser/analyzer/analyzer.factor b/extra/html/parser/analyzer/analyzer.factor index 2196f1baaa..02b45ee939 100755 --- a/extra/html/parser/analyzer/analyzer.factor +++ b/extra/html/parser/analyzer/analyzer.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: assocs html.parser kernel math sequences strings ascii -arrays generalizations shuffle unicode.case namespaces make +arrays generalizations shuffle namespaces make splitting http accessors io combinators http.client urls urls.encoding fry prettyprint sets ; IN: html.parser.analyzer diff --git a/extra/id3/id3.factor b/extra/id3/id3.factor index 6acace8582..6d9b778ee8 100644 --- a/extra/id3/id3.factor +++ b/extra/id3/id3.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2009 Tim Wawrzynczak, Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: sequences io io.encodings.binary io.files io.pathnames -strings kernel math io.mmap io.mmap.uchar accessors syntax +strings kernel math io.mmap io.mmap.uchar accessors combinators math.ranges unicode.categories byte-arrays io.encodings.string io.encodings.utf16 assocs math.parser combinators.short-circuit fry namespaces combinators.smart diff --git a/extra/infix/infix.factor b/extra/infix/infix.factor index 09f1b0e4b1..ce19780058 100644 --- a/extra/infix/infix.factor +++ b/extra/infix/infix.factor @@ -3,7 +3,7 @@ USING: accessors assocs combinators combinators.short-circuit effects fry infix.parser infix.ast kernel locals.parser locals.types math multiline namespaces parser quotations -sequences summary words ; +sequences summary words vocabs.parser ; IN: infix distance ; IN: jamshred.tunnel CONSTANT: n-segments 5000 diff --git a/extra/koszul/koszul.factor b/extra/koszul/koszul.factor index 4ba8e2f66b..1ecd56d416 100755 --- a/extra/koszul/koszul.factor +++ b/extra/koszul/koszul.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2006, 2007 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors arrays assocs hashtables assocs io kernel math +USING: accessors arrays hashtables assocs io kernel math math.vectors math.matrices math.matrices.elimination namespaces parser prettyprint sequences words combinators math.parser splitting sorting shuffle sets math.order ; diff --git a/extra/mason/common/common.factor b/extra/mason/common/common.factor index a33e3c5831..4ac5767009 100755 --- a/extra/mason/common/common.factor +++ b/extra/mason/common/common.factor @@ -4,7 +4,7 @@ USING: kernel namespaces sequences splitting system accessors math.functions make io io.files io.pathnames io.directories io.directories.hierarchy io.launcher io.encodings.utf8 prettyprint combinators.short-circuit parser combinators calendar -calendar.format arrays mason.config locals system debugger fry +calendar.format arrays mason.config locals debugger fry continuations strings ; IN: mason.common diff --git a/extra/mason/mason.factor b/extra/mason/mason.factor index d425985e76..8818e1cc94 100644 --- a/extra/mason/mason.factor +++ b/extra/mason/mason.factor @@ -1,8 +1,9 @@ ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors calendar continuations debugger debugger io -io.directories io.files kernel mason.build mason.common +USING: accessors calendar continuations debugger io +io.directories io.files kernel mason.common mason.email mason.updates namespaces threads ; +FROM: mason.build => build ; IN: mason : build-loop-error ( error -- ) diff --git a/extra/mason/release/release.factor b/extra/mason/release/release.factor index fc4ad0b08a..a593f000f3 100644 --- a/extra/mason/release/release.factor +++ b/extra/mason/release/release.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008, 2009 Eduardo Cavazos, Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel debugger namespaces sequences splitting combinators +USING: kernel debugger namespaces sequences splitting combinators io io.files io.launcher prettyprint bootstrap.image mason.common mason.release.branch mason.release.tidy mason.release.archive mason.release.upload mason.notify ; diff --git a/extra/mongodb/benchmark/benchmark.factor b/extra/mongodb/benchmark/benchmark.factor index 02dfa8add9..a977224d66 100644 --- a/extra/mongodb/benchmark/benchmark.factor +++ b/extra/mongodb/benchmark/benchmark.factor @@ -1,7 +1,7 @@ USING: calendar math fry kernel assocs math.ranges bson.reader io.streams.byte-array sequences formatting combinators namespaces io tools.time prettyprint io.encodings.binary -accessors words mongodb.driver strings math.parser tools.walker bson.writer -tools.continuations ; +accessors words mongodb.driver strings math.parser bson.writer ; +FROM: mongodb.driver => find ; IN: mongodb.benchmark diff --git a/extra/mongodb/tuple/tuple.factor b/extra/mongodb/tuple/tuple.factor index 677fa09bf9..ce76a37ff4 100644 --- a/extra/mongodb/tuple/tuple.factor +++ b/extra/mongodb/tuple/tuple.factor @@ -2,6 +2,8 @@ USING: accessors assocs classes.mixin classes.tuple classes.tuple.parser compiler.units fry kernel sequences mongodb.driver mongodb.msg mongodb.tuple.collection mongodb.tuple.persistent mongodb.tuple.state strings ; +FROM: mongodb.driver => update delete find count ; +FROM: mongodb.tuple.persistent => assoc>tuple ; IN: mongodb.tuple diff --git a/extra/otug-talk/otug-talk.factor b/extra/otug-talk/otug-talk.factor index 35a83a63de..0e7702512f 100644 --- a/extra/otug-talk/otug-talk.factor +++ b/extra/otug-talk/otug-talk.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: slides help.markup math arrays hashtables namespaces -sequences kernel sequences parser memoize io.encodings.binary +kernel sequences parser memoize io.encodings.binary locals kernel.private help.vocabs assocs quotations tools.annotations tools.crossref help.topics math.functions compiler.tree.optimizer compiler.cfg.optimizer fry diff --git a/extra/peg/javascript/parser/parser.factor b/extra/peg/javascript/parser/parser.factor index 7ace528150..82b50c454a 100644 --- a/extra/peg/javascript/parser/parser.factor +++ b/extra/peg/javascript/parser/parser.factor @@ -1,6 +1,7 @@ ! Copyright (C) 2008 Chris Double. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel accessors peg peg.ebnf peg.javascript.ast peg.javascript.tokenizer ; +USING: kernel accessors sequences +peg peg.ebnf peg.javascript.ast peg.javascript.tokenizer ; IN: peg.javascript.parser #! Grammar for JavaScript. Based on OMeta-JS example from: diff --git a/extra/project-euler/common/common.factor b/extra/project-euler/common/common.factor index 84291f2ce8..497fc31de7 100644 --- a/extra/project-euler/common/common.factor +++ b/extra/project-euler/common/common.factor @@ -143,6 +143,6 @@ PRIVATE> SYNTAX: SOLUTION: scan-word [ name>> "-main" append create-in ] keep - [ drop in get vocab (>>main) ] + [ drop current-vocab (>>main) ] [ [ . ] swap prefix (( -- )) define-declared ] 2bi ; diff --git a/extra/spheres/spheres.factor b/extra/spheres/spheres.factor index 710c953ed1..1a8f41b4a2 100755 --- a/extra/spheres/spheres.factor +++ b/extra/spheres/spheres.factor @@ -3,6 +3,7 @@ opengl.shaders opengl.framebuffers opengl.capabilities multiline ui.gadgets accessors sequences ui.render ui math locals arrays generalizations combinators ui.gadgets.worlds literals ui.pixel-formats ; +FROM: opengl.demo-support => rect-vertices ; IN: spheres STRING: plane-vertex-shader diff --git a/extra/tetris/tetris.factor b/extra/tetris/tetris.factor index 66f69bb053..dbdb666e4a 100644 --- a/extra/tetris/tetris.factor +++ b/extra/tetris/tetris.factor @@ -1,6 +1,7 @@ ! Copyright (C) 2006, 2007, 2008 Alex Chapman ! See http://factorcode.org/license.txt for BSD license. USING: accessors alarms arrays calendar kernel make math math.rectangles math.parser namespaces sequences system tetris.game tetris.gl ui.gadgets ui.gadgets.labels ui.gadgets.worlds ui.gadgets.status-bar ui.gestures ui.render ui ; +FROM: tetris.game => level>> ; IN: tetris TUPLE: tetris-gadget < gadget { tetris tetris } { alarm } ; diff --git a/extra/ui/gadgets/book-extras/book-extras.factor b/extra/ui/gadgets/book-extras/book-extras.factor index b9d859962f..9e94747919 100644 --- a/extra/ui/gadgets/book-extras/book-extras.factor +++ b/extra/ui/gadgets/book-extras/book-extras.factor @@ -1,4 +1,5 @@ USING: accessors kernel fry math models ui.gadgets ui.gadgets.books ui.gadgets.buttons ; +FROM: models => change-model ; IN: ui.gadgets.book-extras : ( pages -- book ) 0 ; : |<< ( book -- ) 0 swap set-control-value ; diff --git a/extra/vpri-talk/vpri-talk.factor b/extra/vpri-talk/vpri-talk.factor index 4ee499bf50..518462d7bb 100644 --- a/extra/vpri-talk/vpri-talk.factor +++ b/extra/vpri-talk/vpri-talk.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: slides help.markup math arrays hashtables namespaces -sequences kernel sequences parser memoize io.encodings.binary +kernel sequences parser memoize io.encodings.binary locals kernel.private help.vocabs assocs quotations urls peg.ebnf tools.annotations tools.crossref help.topics math.functions compiler.tree.optimizer compiler.cfg.optimizer diff --git a/extra/webapps/site-watcher/site-watcher.factor b/extra/webapps/site-watcher/site-watcher.factor index f82eb6dcd8..5ecd3bc6a8 100644 --- a/extra/webapps/site-watcher/site-watcher.factor +++ b/extra/webapps/site-watcher/site-watcher.factor @@ -37,7 +37,7 @@ IN: webapps.site-watcher "twitter" value >>twitter "sms" value >>sms update-tuple - site-list-url + f ] >>submit "update notification details" >>description ; diff --git a/extra/webapps/wiki/wiki.factor b/extra/webapps/wiki/wiki.factor index 2341b020a8..5689f23d4e 100644 --- a/extra/webapps/wiki/wiki.factor +++ b/extra/webapps/wiki/wiki.factor @@ -15,7 +15,7 @@ furnace.auth.login furnace.boilerplate furnace.syndication validators -db.types db.tuples lcs farkup urls ; +db.types db.tuples lcs urls ; IN: webapps.wiki : wiki-url ( rest path -- url ) diff --git a/extra/sandbox/authors.txt b/unmaintained/sandbox/authors.txt similarity index 100% rename from extra/sandbox/authors.txt rename to unmaintained/sandbox/authors.txt diff --git a/extra/sandbox/sandbox-tests.factor b/unmaintained/sandbox/sandbox-tests.factor similarity index 100% rename from extra/sandbox/sandbox-tests.factor rename to unmaintained/sandbox/sandbox-tests.factor diff --git a/extra/sandbox/sandbox.factor b/unmaintained/sandbox/sandbox.factor similarity index 100% rename from extra/sandbox/sandbox.factor rename to unmaintained/sandbox/sandbox.factor diff --git a/extra/sandbox/summary.txt b/unmaintained/sandbox/summary.txt similarity index 100% rename from extra/sandbox/summary.txt rename to unmaintained/sandbox/summary.txt diff --git a/extra/sandbox/syntax/syntax.factor b/unmaintained/sandbox/syntax/syntax.factor similarity index 100% rename from extra/sandbox/syntax/syntax.factor rename to unmaintained/sandbox/syntax/syntax.factor