From 95531ff21e17b201b07177e2725550c970203ae3 Mon Sep 17 00:00:00 2001 From: slava Date: Sat, 14 Oct 2006 04:27:43 +0000 Subject: [PATCH] Fix bootstrap problem --- TODO.FACTOR.txt | 1 - library/modules.facts | 6 ------ library/syntax/parse-stream.factor | 6 +++--- library/syntax/parse-stream.facts | 6 ++++++ library/ui/tools/listener.factor | 2 +- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index a2f69a6ca4..822fc60ed1 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -3,7 +3,6 @@ - live search: timer delay would be nice - help responder has no way to access { "foo" "bar" } - httpd search tools -- polish OS X menu bar code + ui: diff --git a/library/modules.facts b/library/modules.facts index 8ccbfab4a8..98acd0ba23 100644 --- a/library/modules.facts +++ b/library/modules.facts @@ -31,12 +31,6 @@ $terpri "If this module is already listed in the " { $link modules } " hashtable, this word does nothing. Otherwise, it calls " { $link load-module } "." } { $notes "Module definitions should use the " { $link POSTPONE: REQUIRES: } " parsing word instead. In the listener, the " { $link require } " word might be more useful since it recompiles new words after loading the module." } ; -HELP: run-files -{ $values { "seq" "a sequence of strings" } } -{ $description "Load a collection of source files." -$terpri -"If bootstrapping, this word appends the top-level forms to the currently constructing quotation instead." } ; - HELP: provide { $values { "name" "a string" } { "files" "a sequence of strings" } { "tests" "a sequence of strings" } } { $description "Registers a module definition and loads its source files. Usually instead of calling this word, module definitions use the parsing word " { $link POSTPONE: PROVIDE: } " instead." } ; diff --git a/library/syntax/parse-stream.factor b/library/syntax/parse-stream.factor index 4cc00f9003..159e24b7fa 100644 --- a/library/syntax/parse-stream.factor +++ b/library/syntax/parse-stream.factor @@ -82,15 +82,15 @@ SYMBOL: parse-hook : run-file ( file -- ) parse-file call ; +: no-parse-hook ( quot -- ) + [ parse-hook off call ] with-scope ; inline + : run-files ( seq -- ) [ bootstrapping? get [ parse-file % ] [ run-file ] ? each ] no-parse-hook ; -: no-parse-hook ( quot -- ) - [ parse-hook off call ] with-scope ; inline - : ?run-file ( file -- ) dup exists? [ [ [ run-file ] keep ] try ] when drop ; diff --git a/library/syntax/parse-stream.facts b/library/syntax/parse-stream.facts index 95928e47ee..cd18273a0d 100644 --- a/library/syntax/parse-stream.facts +++ b/library/syntax/parse-stream.facts @@ -30,6 +30,12 @@ HELP: no-parse-hook { $values { "quot" "a quotation" } } { $description "Runs the quotation in a new dynamic scope where " { $link parse-hook } " is set to " { $link f } ". This disables the default behavior of recompiling changed definitions after a source file is loaded." } ; +HELP: run-files +{ $values { "seq" "a sequence of strings" } } +{ $description "Load a collection of source files." +$terpri +"If bootstrapping, this word appends the top-level forms to the currently constructing quotation instead." } ; + HELP: parse-stream { $values { "stream" "an input stream" } { "name" "a file name for error reporting" } { "quot" "a new quotation" } } { $description "Parses Factor source code read from the stream. The initial vocabulary search path is used." } diff --git a/library/ui/tools/listener.factor b/library/ui/tools/listener.factor index f35189d5d7..e9124c74fe 100644 --- a/library/ui/tools/listener.factor +++ b/library/ui/tools/listener.factor @@ -89,7 +89,7 @@ M: listener-gadget tool-help dup empty? [ drop ] [ - [ run-files ] curry call-listener + [ run-files recompile ] curry call-listener ] if ; : listener-eof ( listener -- ) -- 2.34.1