diff --git a/core/bootstrap/image/image-tests.factor b/core/bootstrap/image/image-tests.factor index 901d23e24d..ea533f0d6f 100755 --- a/core/bootstrap/image/image-tests.factor +++ b/core/bootstrap/image/image-tests.factor @@ -1,5 +1,6 @@ IN: temporary -USING: bootstrap.image tools.test.infer ; +USING: bootstrap.image bootstrap.image.private +tools.test.inference ; \ ' must-infer \ write-image must-infer diff --git a/core/classes/classes-tests.factor b/core/classes/classes-tests.factor index 2b82c7e0d6..00bf3262aa 100755 --- a/core/classes/classes-tests.factor +++ b/core/classes/classes-tests.factor @@ -62,7 +62,7 @@ UNION: bah fixnum alien ; [ bah ] [ \ bah? "predicating" word-prop ] unit-test ! Test generic see and parsing -[ "IN: temporary\nSYMBOL: bah\n\nUNION: bah fixnum alien ;\n" ] +[ "USING: alien math ;\nIN: temporary\nUNION: bah fixnum alien ;\n" ] [ [ \ bah see ] string-out ] unit-test ! Test redefinition of classes diff --git a/core/generic/generic-tests.factor b/core/generic/generic-tests.factor index a66e24956e..5a16f40eb5 100755 --- a/core/generic/generic-tests.factor +++ b/core/generic/generic-tests.factor @@ -120,8 +120,6 @@ TUPLE: delegating ; [ t ] [ \ + math-generic? ] unit-test -[ "SYMBOL: not-a-class C: not-a-class ;" eval ] unit-test-fails - ! Test math-combination [ [ [ >float ] dip ] ] [ \ real \ float math-upgrade ] unit-test [ [ >float ] ] [ \ float \ real math-upgrade ] unit-test diff --git a/core/inference/class/class-tests.factor b/core/inference/class/class-tests.factor index 1cfae3301e..c7289b110a 100755 --- a/core/inference/class/class-tests.factor +++ b/core/inference/class/class-tests.factor @@ -3,7 +3,7 @@ USING: arrays math.private kernel math compiler inference inference.dataflow optimizer tools.test kernel.private generic sequences words inference.class quotations alien alien.c-types strings sbufs sequences.private -slots.private combinators ; +slots.private combinators definitions ; ! Make sure these compile even though this is invalid code [ ] [ [ 10 mod 3.0 /i ] dataflow optimize drop ] unit-test diff --git a/core/parser/parser.factor b/core/parser/parser.factor index 6a0b5a5fad..4503d2f2e0 100755 --- a/core/parser/parser.factor +++ b/core/parser/parser.factor @@ -265,8 +265,9 @@ M: staging-violation summary "A parsing word cannot be used in the same file it is defined in." ; : execute-parsing ( word -- ) - dup - new-definitions get first key? [ staging-violation ] when + new-definitions get [ + dupd first key? [ staging-violation ] when + ] when* execute ; : parse-step ( accum end -- accum ? ) @@ -300,6 +301,9 @@ SYMBOL: lexer-factory : parse-lines ( lines -- quot ) lexer-factory get call (parse-lines) ; +: parse ( str -- quot ) + [ string-lines parse-lines ] with-compilation-unit ; + ! Parsing word utilities : parse-effect ( -- effect ) ")" parse-tokens { "--" } split1 dup [ @@ -421,7 +425,9 @@ SYMBOL: bootstrap-syntax file get source-file-path = ] assoc-subset ; -: removed-definitions ( -- definitions ) new-definitions get old-definitions get [ first2 union ] 2apply diff ; +: removed-definitions ( -- definitions ) + new-definitions old-definitions + [ get first2 union ] 2apply diff ; : smudged-usage ( -- usages referenced removed ) removed-definitions filter-moved keys [ diff --git a/core/prettyprint/prettyprint.factor b/core/prettyprint/prettyprint.factor index 420d3bedbc..cc19a67bfa 100755 --- a/core/prettyprint/prettyprint.factor +++ b/core/prettyprint/prettyprint.factor @@ -256,7 +256,7 @@ M: builtin-class see-class* : see-class ( class -- ) dup class? [ - nl [ dup see-class* ] with-pprint nl + dup seeing-word dup see-class* ] when drop ; : see-methods ( generic -- seq ) @@ -265,7 +265,7 @@ M: builtin-class see-class* M: word see [ - dup see-class* + dup see-class dup class? over symbol? and not [ dup (see) ] when ] with-use nl [ diff --git a/core/tuples/tuples-tests.factor b/core/tuples/tuples-tests.factor index bdb8b61299..62bbc7ace5 100755 --- a/core/tuples/tuples-tests.factor +++ b/core/tuples/tuples-tests.factor @@ -233,3 +233,9 @@ C: erg's-reshape-problem [ t ] [ cons-test-1 array-capacity "a" get array-capacity = ] unit-test [ t ] [ 1 cons-test-3 array-capacity "a" get array-capacity = ] unit-test + +[ t ] [ + [ + "IN: temporary SYMBOL: not-a-class C: not-a-class" eval + ] catch [ check-tuple? ] is? +] unit-test diff --git a/extra/help/definitions/definitions-tests.factor b/extra/help/definitions/definitions-tests.factor index a07789ddfd..836f82a306 100755 --- a/extra/help/definitions/definitions-tests.factor +++ b/extra/help/definitions/definitions-tests.factor @@ -1,13 +1,11 @@ USING: math definitions help.topics help tools.test prettyprint parser io.streams.string kernel source-files -assocs namespaces words io ; +assocs namespaces words io sequences ; IN: temporary [ ] [ \ + >link see ] unit-test [ - file-vocabs - [ 4 ] [ "IN: temporary USING: help.syntax ; : hello ; HELP: hello \"test\" ; ARTICLE: \"hello\" \"world\" ; ARTICLE: \"hello2\" \"world\" ;" "foo" parse-stream drop @@ -34,9 +32,9 @@ IN: temporary "hello" "temporary" lookup "help" word-prop ] unit-test - [ [ ] ] [ "IN: temporary USING: help.syntax ; : xxx ; HELP: xxx ;" parse ] unit-test + [ ] [ "IN: temporary USING: help.syntax ; : xxx ; HELP: xxx ;" eval ] unit-test [ ] [ "xxx" "temporary" lookup help ] unit-test [ ] [ "xxx" "temporary" lookup >link synopsis print ] unit-test -] with-scope +] with-file-vocabs diff --git a/extra/help/definitions/definitions.factor b/extra/help/definitions/definitions.factor old mode 100644 new mode 100755 index 76940b50ae..eee2bcd19c --- a/extra/help/definitions/definitions.factor +++ b/extra/help/definitions/definitions.factor @@ -16,8 +16,6 @@ M: link forget link-name remove-article ; M: link definition article-content ; -M: link see (see) ; - M: link synopsis* \ ARTICLE: pprint-word dup link-name pprint* diff --git a/extra/help/syntax/syntax-tests.factor b/extra/help/syntax/syntax-tests.factor old mode 100644 new mode 100755 index 74e7d296c4..136313c2ef --- a/extra/help/syntax/syntax-tests.factor +++ b/extra/help/syntax/syntax-tests.factor @@ -2,8 +2,6 @@ IN: temporary USING: tools.test parser vocabs help.syntax namespaces ; [ - file-vocabs - [ "foobar" ] [ "IN: temporary USE: help.syntax ABOUT: \"foobar\"" eval "temporary" vocab vocab-help @@ -20,4 +18,4 @@ USING: tools.test parser vocabs help.syntax namespaces ; "IN: temporary USE: help.syntax ABOUT: xyz" eval "temporary" vocab vocab-help ] unit-test -] with-scope +] with-file-vocabs diff --git a/extra/ui/gadgets/gadgets-docs.factor b/extra/ui/gadgets/gadgets-docs.factor old mode 100644 new mode 100755 index 1132ea8d66..fd06d02ec0 --- a/extra/ui/gadgets/gadgets-docs.factor +++ b/extra/ui/gadgets/gadgets-docs.factor @@ -306,5 +306,3 @@ $nl { $subsection control-value } { $subsection set-control-value } { $see-also "models" } ; - -ABOUT: "ui-control-impl" diff --git a/extra/ui/tools/interactor/interactor.factor b/extra/ui/tools/interactor/interactor.factor index 5d7a8b67a5..a420bf278f 100755 --- a/extra/ui/tools/interactor/interactor.factor +++ b/extra/ui/tools/interactor/interactor.factor @@ -129,7 +129,7 @@ M: interactor stream-read-partial : try-parse ( str interactor -- quot/error/f ) [ [ - [ restore-vars [ parse ] with-compilation-unit ] keep save-vars + [ restore-vars parse ] keep save-vars ] [ >r f swap set-interactor-busy? drop r> dup delegate unexpected-eof? [ drop f ] when diff --git a/extra/ui/tools/walker/walker-tests.factor b/extra/ui/tools/walker/walker-tests.factor index 53903a27b3..a23b629d1e 100755 --- a/extra/ui/tools/walker/walker-tests.factor +++ b/extra/ui/tools/walker/walker-tests.factor @@ -34,7 +34,7 @@ f dup [ workspace-listener listener-gadget-input "ok" on - parse-interactive + stream-read-quot "c" get continue-with ] in-thread drop