From dea1fa42ab840d0656a7c1101df256051288b0a0 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Wed, 22 Jun 2016 09:12:50 -0700 Subject: [PATCH] factor: fix rest of the files. only functors don't lex fully --- core/modern/paths/paths.factor | 12 ++++++------ language/compiler/tests/redefine18.factor | 12 ++++++------ language/compiler/tests/redefine2.factor | 6 +++--- language/compiler/tests/redefine3.factor | 6 +++--- language/compiler/tests/redefine6.factor | 2 +- language/compiler/tests/redefine7.factor | 2 +- language/compiler/tests/redefine8.factor | 2 +- language/compiler/tests/redefine9.factor | 2 +- libs/fjsc/resources/bootstrap.factor | 4 ++-- libs/math/vectors/simd/cords/cords.factor | 1 - libs/zeromq/examples/hwclient.factor | 1 - libs/zeromq/examples/wuclient.factor | 1 - 12 files changed, 24 insertions(+), 27 deletions(-) diff --git a/core/modern/paths/paths.factor b/core/modern/paths/paths.factor index 2cf77690f2..87d9927d56 100644 --- a/core/modern/paths/paths.factor +++ b/core/modern/paths/paths.factor @@ -1,9 +1,9 @@ ! Copyright (C) 2015 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors combinators.smart io.files kernel namespaces -sequences sets splitting vocabs.files vocabs.hierarchy -vocabs.loader vocabs.metadata ; -IN: modern.paths +USING: accessors combinators.smart io.directories.search +io.files kernel namespaces sequences sets splitting vocabs.files +vocabs.hierarchy vocabs.loader vocabs.metadata ; +in: modern.paths : vocabs-from ( root -- vocabs ) "" disk-vocabs-in-root/prefix @@ -89,5 +89,5 @@ IN: modern.paths ] { } append-outputs-as reject-some-paths filter-exists ; : all-paths ( -- seq ) - vocab-roots get [ [ ".factor" tail? ] find-all-files ] map - reject-some-paths ; \ No newline at end of file + vocab-roots get [ [ ".factor" tail? ] find-all-files ] map concat + reject-some-paths ; diff --git a/language/compiler/tests/redefine18.factor b/language/compiler/tests/redefine18.factor index 77ebb8f5b9..cabd1ef707 100644 --- a/language/compiler/tests/redefine18.factor +++ b/language/compiler/tests/redefine18.factor @@ -1,25 +1,25 @@ USING: kernel tools.test eval words ; -in: compiler.tests.redefine18 +IN: compiler.tests.redefine18 ! Mixin bug found by Doug GENERIC: g1 ( a -- b ) ; GENERIC: g2 ( a -- b ) ; -mixin: c -singleton: a +MIXIN: c +SINGLETON: a INSTANCE: a c ; M: c g1 g2 ; M: a g2 drop a ; -mixin: d +MIXIN: d INSTANCE: d c ; M: d g2 drop d ; -[ ] [ "in: compiler.tests.redefine18 singleton: b INSTANCE: b d ;" eval( -- ) ] unit-test ; +[ ] [ "IN: compiler.tests.redefine18 SINGLETON: b INSTANCE: b d ;" eval( -- ) ] unit-test [ d ] [ "b" "compiler.tests.redefine18" lookup-word g1 ] unit-test -[ ] [ "in: compiler.tests.redefine18 forget: b" eval( -- ) ] unit-test +[ ] [ "IN: compiler.tests.redefine18 forget: b" eval( -- ) ] unit-test diff --git a/language/compiler/tests/redefine2.factor b/language/compiler/tests/redefine2.factor index 8b3bc5e5e3..e8c1fdbfc9 100644 --- a/language/compiler/tests/redefine2.factor +++ b/language/compiler/tests/redefine2.factor @@ -1,11 +1,11 @@ USING: compiler compiler.units tools.test math parser kernel sequences sequences.private classes.mixin generic definitions arrays words assocs eval words.symbol ; -in: compiler.tests.redefine2 +IN: compiler.tests.redefine2 -defer: redefine2-test +DEFER: redefine2-test -[ ] [ "use: sequences use: kernel in: compiler.tests.redefine2 TUPLE: redefine2-test ; M: redefine2-test nth 2drop 3 ; INSTANCE: redefine2-test sequence" eval( -- ) ] unit-test ; +[ ] [ "USE: sequences USE: kernel IN: compiler.tests.redefine2 TUPLE: redefine2-test ; M: redefine2-test nth 2drop 3 ; INSTANCE: redefine2-test sequence ;" eval( -- ) ] unit-test [ t ] [ \ redefine2-test symbol? ] unit-test diff --git a/language/compiler/tests/redefine3.factor b/language/compiler/tests/redefine3.factor index 9093c6077a..201f71187e 100644 --- a/language/compiler/tests/redefine3.factor +++ b/language/compiler/tests/redefine3.factor @@ -1,13 +1,13 @@ USING: accessors compiler compiler.units tools.test math parser kernel sequences sequences.private classes.mixin generic definitions arrays words assocs eval grouping ; -in: compiler.tests.redefine3 +IN: compiler.tests.redefine3 GENERIC: sheeple ( obj -- x ) ; M: object sheeple drop "sheeple" ; inline -mixin: empty-mixin +MIXIN: empty-mixin ; M: empty-mixin sheeple drop "wake up" ; inline @@ -21,7 +21,7 @@ M: empty-mixin sheeple drop "wake up" ; inline [ t ] [ object \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test [ f ] [ empty-mixin \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test -[ ] [ "in: compiler.tests.redefine3 use: arrays INSTANCE: array empty-mixin" eval( -- ) ] unit-test ; +[ ] [ "IN: compiler.tests.redefine3 USE: arrays INSTANCE: array empty-mixin ;" eval( -- ) ] unit-test [ "wake up" ] [ sheeple-test ] unit-test [ f ] [ object \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test diff --git a/language/compiler/tests/redefine6.factor b/language/compiler/tests/redefine6.factor index 977cfa2519..b81bedc27f 100644 --- a/language/compiler/tests/redefine6.factor +++ b/language/compiler/tests/redefine6.factor @@ -21,7 +21,7 @@ in: compiler.tests.redefine6 in: compiler.tests.redefine6 TUPLE: my-tuple ; M: my-tuple my-generic drop 1 ; - INSTANCE: my-tuple my-mixin" ; + INSTANCE: my-tuple my-mixin ;" eval( -- ) ] unit-test diff --git a/language/compiler/tests/redefine7.factor b/language/compiler/tests/redefine7.factor index a2bf80f505..5b54c0e398 100644 --- a/language/compiler/tests/redefine7.factor +++ b/language/compiler/tests/redefine7.factor @@ -18,7 +18,7 @@ in: compiler.tests.redefine7 [ ] [ "use: math in: compiler.tests.redefine7 - INSTANCE: float my-mixin" ; + INSTANCE: float my-mixin ;" eval( -- ) ] unit-test diff --git a/language/compiler/tests/redefine8.factor b/language/compiler/tests/redefine8.factor index 4654aca446..6d992e4106 100644 --- a/language/compiler/tests/redefine8.factor +++ b/language/compiler/tests/redefine8.factor @@ -21,7 +21,7 @@ in: compiler.tests.redefine8 [ ] [ "use: math in: compiler.tests.redefine8 - INSTANCE: float my-mixin" ; + INSTANCE: float my-mixin ;" eval( -- ) ] unit-test diff --git a/language/compiler/tests/redefine9.factor b/language/compiler/tests/redefine9.factor index ac393b59c0..3d9174361b 100644 --- a/language/compiler/tests/redefine9.factor +++ b/language/compiler/tests/redefine9.factor @@ -22,7 +22,7 @@ in: compiler.tests.redefine9 "use: math in: compiler.tests.redefine9 TUPLE: my-tuple ; - INSTANCE: my-tuple my-mixin" ; + INSTANCE: my-tuple my-mixin ;" eval( -- ) ] unit-test diff --git a/libs/fjsc/resources/bootstrap.factor b/libs/fjsc/resources/bootstrap.factor index 9b21b79188..4dc766c870 100644 --- a/libs/fjsc/resources/bootstrap.factor +++ b/libs/fjsc/resources/bootstrap.factor @@ -9,7 +9,7 @@ use: kernel-internals ! Call JQuery's $ function window { "result" } "" "$" { "string" } alien-invoke ; -: html ( string -- element ) +: html ( string -- element ) ! Set the innerHTML of element using jQuery { } "" "html" { "string" } alien-invoke ; @@ -31,7 +31,7 @@ use: kernel-internals "Waiting for click on button" alert continue ] callcc0 - drop "Click done!" alert + drop "Click done!" alert ] callcc0 ; : alert ( string -- ) diff --git a/libs/math/vectors/simd/cords/cords.factor b/libs/math/vectors/simd/cords/cords.factor index a7db3451c5..e134b063a5 100644 --- a/libs/math/vectors/simd/cords/cords.factor +++ b/libs/math/vectors/simd/cords/cords.factor @@ -94,4 +94,3 @@ SIMD-128-CORD: longlong-2 longlong-4 ; SIMD-128-CORD: ulonglong-2 ulonglong-4 ; SIMD-128-CORD: float-4 float-8 ; SIMD-128-CORD: double-2 double-4 ; - diff --git a/libs/zeromq/examples/hwclient.factor b/libs/zeromq/examples/hwclient.factor index 008031eed1..6b6e420d32 100644 --- a/libs/zeromq/examples/hwclient.factor +++ b/libs/zeromq/examples/hwclient.factor @@ -20,4 +20,3 @@ in: zeromq.examples.hwclient ] with-destructors ; main: hwclient - diff --git a/libs/zeromq/examples/wuclient.factor b/libs/zeromq/examples/wuclient.factor index dd0d864f8e..141e2a9c3e 100644 --- a/libs/zeromq/examples/wuclient.factor +++ b/libs/zeromq/examples/wuclient.factor @@ -23,4 +23,3 @@ in: zeromq.examples.wuclient ] with-destructors ; main: wuclient -