diff --git a/collections/sequences/n-based/n-based-docs.factor b/collections/sequences/n-based/n-based-docs.factor index 80d17e7aec..1640d18827 100644 --- a/collections/sequences/n-based/n-based-docs.factor +++ b/collections/sequences/n-based/n-based-docs.factor @@ -8,7 +8,7 @@ HELP: { $examples { $example " USING: assocs prettyprint kernel sequences.n-based ; -in: scratchpad +IN: scratchpad : months ( -- assoc ) { @@ -34,7 +34,7 @@ HELP: n-based-assoc { $examples { $example " USING: assocs prettyprint kernel sequences.n-based ; -in: scratchpad +IN: scratchpad : months ( -- assoc ) { diff --git a/collections/specialized-arrays/specialized-arrays-tests.factor b/collections/specialized-arrays/specialized-arrays-tests.factor index 190ed77177..a43da095f1 100644 --- a/collections/specialized-arrays/specialized-arrays-tests.factor +++ b/collections/specialized-arrays/specialized-arrays-tests.factor @@ -137,7 +137,7 @@ symbol: __does_not_exist__ [ " -in: specialized-arrays.tests +IN: specialized-arrays.tests USING: specialized-arrays ; specialized-array: __does_not_exist__ " eval( -- ) @@ -145,7 +145,7 @@ specialized-array: __does_not_exist__ " eval( -- ) { } [ " -in: specialized-arrays.tests +IN: specialized-arrays.tests USING: alien.c-types classes.struct specialized-arrays ; STRUCT: __does_not_exist__ { x int } ; @@ -180,7 +180,7 @@ specialized-array: struct-resize-test { { 10 20 30 } } [ { 10 20 30 } struct-resize-test-usage ] unit-test -{ } [ "in: specialized-arrays.tests use: classes.struct use: alien.c-types STRUCT: struct-resize-test { x int } { y int } ;" eval( -- ) ] unit-test +{ } [ "IN: specialized-arrays.tests use: classes.struct use: alien.c-types STRUCT: struct-resize-test { x int } { y int } ;" eval( -- ) ] unit-test { 80 } [ 10 byte-length ] unit-test diff --git a/core-locals.factor b/core-locals.factor index 33f9d41828..11efca7df8 100644 --- a/core-locals.factor +++ b/core-locals.factor @@ -1,5 +1,5 @@ auto-use -in: syntax +IN: syntax use: delegate.private COMPILE< forget: postpone\ MACRO: COMPILE> @@ -174,4 +174,4 @@ string-lines disable-optimizer enable-optimizer -in: scratchpad 1 1 - restarts [ nth f ] change-global "peg.ebnf" reload continue-restart +IN: scratchpad 1 1 - restarts [ nth f ] change-global "peg.ebnf" reload continue-restart diff --git a/core/locals/locals-docs.factor b/core/locals/locals-docs.factor index c4549bce1a..50afdf1e4d 100644 --- a/core/locals/locals-docs.factor +++ b/core/locals/locals-docs.factor @@ -70,7 +70,7 @@ ARTICLE: "locals-examples" "Examples of lexical variables" { $heading "Definitions with lexical variables" } "The following example demonstrates lexical variable bindings in word definitions. The " { $snippet "quadratic-roots" } " word is defined with " { $link postpone\ :: } ", so it takes its inputs from the top three elements of the datastack and binds them to the variables " { $snippet "a" } ", " { $snippet "b" } ", and " { $snippet "c" } ". In the body, the " { $snippet "disc" } " variable is bound using " { $link postpone\ :> } " and then used in the following line of code." { $example "USING: locals math math.functions kernel ; -in: scratchpad +IN: scratchpad :: quadratic-roots ( a b c -- x y ) b sq 4 a c * * - sqrt :> disc b neg disc [ + ] [ - ] 2bi [ 2 a * / ] bi@ ; @@ -80,7 +80,7 @@ in: scratchpad } "If you wanted to perform the quadratic formula interactively from the listener, you could use " { $link postpone\ let[ } " to provide a scope for the variables:" { $example "USING: locals math math.functions kernel ; -in: scratchpad +IN: scratchpad let[ 1.0 :> a 1.0 :> b -6.0 :> c b sq 4 a c * * - sqrt :> disc b neg disc [ + ] [ - ] 2bi [ 2 a * / ] bi@ @@ -95,7 +95,7 @@ $nl "These next two examples demonstrate lexical variable bindings in quotations defined with " { $link postpone\ |[ } ". In this example, the values " { $snippet "5" } " and " { $snippet "3" } " are put on the datastack. When the quotation is called, it takes those values as inputs and binds them respectively to " { $snippet "m" } " and " { $snippet "n" } " before executing the quotation:" { $example "USING: kernel locals math prettyprint ;" - "in: scratchpad" + "IN: scratchpad" "5 3 |[ m n | m n - ] call ." "2" } @@ -104,7 +104,7 @@ $nl "In this example, the " { $snippet "adder" } " word creates a quotation that closes over its argument " { $snippet "n" } ". When called, the result quotation of " { $snippet "5 adder" } " pulls " { $snippet "3" } " off the datastack and binds it to " { $snippet "m" } ", which is added to the value " { $snippet "5" } " bound to " { $snippet "n" } " in the outer scope of " { $snippet "adder" } ":" { $example "USING: kernel locals math prettyprint ;" - "in: scratchpad" + "IN: scratchpad" ":: adder ( n -- quot ) |[ m | m n + ] ;" "3 5 adder call ." "8" @@ -115,7 +115,7 @@ $nl "This next example demonstrates closures and mutable variable bindings. The " { $snippet "" } " word outputs a tuple containing a pair of quotations that respectively increment and decrement an internal counter in the mutable " { $snippet "value" } " variable and then return the new value. The quotations close over the counter, so each invocation of the word gives new quotations with a new internal counter." { $example "USING: locals kernel math ; -in: scratchpad +IN: scratchpad TUPLE: counter adder subtractor ; @@ -136,7 +136,7 @@ TUPLE: counter adder subtractor ; "The same variable name can be bound multiple times in the same scope. This is different from reassigning the value of a mutable variable. The most recent binding for a variable name will mask previous bindings for that name. However, the old binding referring to the previous value can still persist in closures. The following contrived example demonstrates this:" { $example "USING: kernel locals prettyprint ; -in: scratchpad +IN: scratchpad :: rebinding-example ( -- quot1 quot2 ) 5 :> a [ a ] 6 :> a [ a ] ; @@ -155,7 +155,7 @@ mutable-example [ call . ] bi@" "Some kinds of literals can include references to lexical variables as described in " { $link "locals-literals" } ". For example, the " { $link 3array } " word could be implemented as follows:" { $example "USING: locals prettyprint ; -in: scratchpad +IN: scratchpad :: my-3array ( x y z -- array ) { x y z } ; 1 \"two\" 3.0 my-3array ." @@ -176,7 +176,7 @@ $nl { $heading "Object identity" } "This feature changes the semantics of literal object identity. An ordinary word containing a literal pushes the same literal on the stack every time it is invoked:" { $example - "in: scratchpad" + "IN: scratchpad" "TUPLE: person first-name last-name ;" ": ordinary-word-test ( -- tuple )" " T{ person { first-name \"Alan\" } { last-name \"Kay\" } } ;" @@ -186,7 +186,7 @@ $nl "Inside a lexical scope, literals which do not contain lexical variables still behave in the same way:" { $example "use: locals" - "in: scratchpad" + "IN: scratchpad" "TUPLE: person first-name last-name ;" ":: locals-word-test ( -- tuple )" " T{ person { first-name \"Alan\" } { last-name \"Kay\" } } ;" @@ -196,7 +196,7 @@ $nl "However, literals with lexical variables in them actually construct a new object:" { $example "USING: locals splitting ;" - "in: scratchpad" + "IN: scratchpad" "TUPLE: person first-name last-name ;" ":: constructor-test ( -- tuple )" " \"Jane Smith\" \" \" split1 :> last :> first" diff --git a/core/typed/typed-docs.factor b/core/typed/typed-docs.factor index 45ae0f9b11..71f917768d 100644 --- a/core/typed/typed-docs.factor +++ b/core/typed/typed-docs.factor @@ -12,7 +12,7 @@ HELP: \ TYPED: "A version of " { $link + } " specialized for floats, converting other real number types:" { $example "USING: math prettyprint typed ; -in: scratchpad +IN: scratchpad TYPED: add-floats ( a: float b: float -- c: float ) + ; @@ -30,7 +30,7 @@ HELP: \ TYPED:: "A version of the quadratic formula specialized for floats, converting other real number types:" { $example "USING: kernel math math.libm prettyprint typed ; -in: scratchpad +IN: scratchpad TYPED:: quadratic-roots ( a: float b: float c: float -- q1: float q2: float ) b neg diff --git a/core/typed/typed-tests.factor b/core/typed/typed-tests.factor index 279bb7c051..acb9151f34 100644 --- a/core/typed/typed-tests.factor +++ b/core/typed/typed-tests.factor @@ -67,7 +67,7 @@ TYPED: unboxy ( in: unboxable -- out: unboxable2 ) [ " USING: kernel math ; -in: typed.tests +IN: typed.tests TUPLE: unboxable { x fixnum read-only } @@ -77,7 +77,7 @@ TUPLE: unboxable " USING: accessors kernel math ; -in: typed.tests +IN: typed.tests T{ unboxable f 12 3 4.0 } unboxy xy>> " eval( -- xy ) ] unit-test @@ -128,7 +128,7 @@ TYPED: recompile-fail ( a: subclass -- ? ) buh get eq? ; { f } [ subclass new [ buh set ] [ recompile-fail ] bi ] unit-test -{ } [ "in: typed.tests TUPLE: subclass < superclass { y read-only } ;" eval( -- ) ] unit-test +{ } [ "IN: typed.tests TUPLE: subclass < superclass { y read-only } ;" eval( -- ) ] unit-test { t } [ subclass new [ buh set ] [ recompile-fail ] bi ] unit-test @@ -185,5 +185,5 @@ TYPED: typed-intersection ( x: intersection{ integer bignum } -- ? ) >boolean ; [ 0 typed-intersection ] [ input-mismatch-error? ] must-fail-with [ - "in: test123 use: typed TYPED: foo ( x -- y ) ;" eval( -- ) + "IN: test123 use: typed TYPED: foo ( x -- y ) ;" eval( -- ) ] [ error>> no-types-specified? ] must-fail-with diff --git a/frameworks/ui/pixel-formats/pixel-formats-docs.factor b/frameworks/ui/pixel-formats/pixel-formats-docs.factor index 4382d0a50e..ca20766c1d 100644 --- a/frameworks/ui/pixel-formats/pixel-formats-docs.factor +++ b/frameworks/ui/pixel-formats/pixel-formats-docs.factor @@ -46,7 +46,7 @@ ARTICLE: "ui.pixel-formats-attributes" "Pixel format attributes" { $examples "The following " { $link world } " subclass will request a double-buffered window with minimum 24-bit color and depth buffers, and will throw an error if the requirements aren't met:" { $code "USING: kernel ui.gadgets.worlds ui.pixel-formats ; -in: ui.pixel-formats.examples +IN: ui.pixel-formats.examples TUPLE: picky-depth-buffered-world < world ; diff --git a/frameworks/ui/ui-docs.factor b/frameworks/ui/ui-docs.factor index ad47f0e3a8..d7ef12a9a0 100644 --- a/frameworks/ui/ui-docs.factor +++ b/frameworks/ui/ui-docs.factor @@ -178,7 +178,7 @@ ARTICLE: "ui-backend" "Developing UI backends" ARTICLE: "ui-backend-init" "UI initialization and the event loop" "An UI backend is required to define a method on the " { $link (with-ui) } " word. This word should contain backend initialization, together with some boilerplate:" { $code - "in: shells" + "IN: shells" "" ": ui" " ... backend-specific initialization ..." @@ -351,7 +351,7 @@ HELP: \ WINDOW: "From the " { $vocab-link "hello-ui" } " vocabulary. Creates a window with the title \"Hi\" containing a label reading \"Hello world\":" { $code "USING: accessors ui ui.gadgets.labels ; -in: hello-ui +IN: hello-ui WINDOW: hello { { title \"Hi\" } } \"Hello world\"