diff --git a/basis/alien/enums/enums.factor b/basis/alien/enums/enums.factor index 5634805f5d..e049c9cf95 100644 --- a/basis/alien/enums/enums.factor +++ b/basis/alien/enums/enums.factor @@ -40,7 +40,7 @@ M: enum-c-type c-type-setter : define-enum-constructor ( word -- ) [ name>> "<" ">" surround create-in ] keep - [ number>enum ] curry (( number -- enum )) define-inline ; + [ number>enum ] curry ( number -- enum ) define-inline ; PRIVATE> diff --git a/basis/alien/parser/parser-tests.factor b/basis/alien/parser/parser-tests.factor index 17f417b48d..2333eb3725 100644 --- a/basis/alien/parser/parser-tests.factor +++ b/basis/alien/parser/parser-tests.factor @@ -38,7 +38,7 @@ CONSTANT: eleven 11 FUNCTION: void* alien-parser-function-effect-test ( int *arg1 float arg2 ) ; -[ (( arg1 arg2 -- void* )) ] [ +[ ( arg1 arg2 -- void* ) ] [ \ alien-parser-function-effect-test "declared-effect" word-prop ] unit-test @@ -46,7 +46,7 @@ FUNCTION: void* alien-parser-function-effect-test ( int *arg1 float arg2 ) ; FUNCTION-ALIAS: (alien-parser-function-effect-test) void* alien-parser-function-effect-test ( int *arg1 float arg2 ) ; -[ (( arg1 arg2 -- void* )) ] [ +[ ( arg1 arg2 -- void* ) ] [ \ (alien-parser-function-effect-test) "declared-effect" word-prop ] unit-test @@ -54,7 +54,7 @@ FUNCTION-ALIAS: (alien-parser-function-effect-test) void* alien-parser-function- CALLBACK: void* alien-parser-callback-effect-test ( int *arg1 float arg2 ) ; -[ (( arg1 arg2 -- void* )) ] [ +[ ( arg1 arg2 -- void* ) ] [ \ alien-parser-callback-effect-test "callback-effect" word-prop ] unit-test diff --git a/basis/alien/parser/parser.factor b/basis/alien/parser/parser.factor index a196e416de..63d0377e29 100755 --- a/basis/alien/parser/parser.factor +++ b/basis/alien/parser/parser.factor @@ -155,7 +155,7 @@ PRIVATE> void* type-word typedef type-word names return function-effect "callback-effect" set-word-prop type-word lib "callback-library" set-word-prop - type-word return types lib library-abi callback-quot (( quot -- alien )) ; + type-word return types lib library-abi callback-quot ( quot -- alien ) ; : (CALLBACK:) ( -- word quot effect ) current-library get @@ -182,11 +182,11 @@ PREDICATE: alien-callback-type-word < typedef-word '[ _ _ address-of 0 _ set-alien-value ] ; : define-global-getter ( type word -- ) - [ nip ] [ global-quot ] 2bi (( -- value )) define-declared ; + [ nip ] [ global-quot ] 2bi ( -- value ) define-declared ; : define-global-setter ( type word -- ) [ nip name>> "set-" prepend create-in ] - [ set-global-quot ] 2bi (( obj -- )) define-declared ; + [ set-global-quot ] 2bi ( obj -- ) define-declared ; : define-global ( type word -- ) [ define-global-getter ] [ define-global-setter ] 2bi ; diff --git a/basis/classes/struct/bit-accessors/bit-accessors-tests.factor b/basis/classes/struct/bit-accessors/bit-accessors-tests.factor index ecf7b68a2d..44bc90b023 100644 --- a/basis/classes/struct/bit-accessors/bit-accessors-tests.factor +++ b/basis/classes/struct/bit-accessors/bit-accessors-tests.factor @@ -4,5 +4,5 @@ USING: classes.struct.bit-accessors tools.test effects kernel sequences random stack-checker ; IN: classes.struct.bit-accessors.test -[ t ] [ 20 random 20 random bit-reader infer (( alien -- n )) effect= ] unit-test -[ t ] [ 20 random 20 random bit-writer infer (( n alien -- )) effect= ] unit-test +[ t ] [ 20 random 20 random bit-reader infer ( alien -- n ) effect= ] unit-test +[ t ] [ 20 random 20 random bit-writer infer ( n alien -- ) effect= ] unit-test diff --git a/basis/cocoa/messages/messages.factor b/basis/cocoa/messages/messages.factor index 21604c8df1..8c2b045b71 100644 --- a/basis/cocoa/messages/messages.factor +++ b/basis/cocoa/messages/messages.factor @@ -231,7 +231,7 @@ ERROR: no-objc-type name ; [ class-init-hooks get set-at ] [ [ "cocoa.classes" create ] [ '[ _ objc-class ] ] bi - (( -- class )) define-declared + ( -- class ) define-declared ] bi ; : import-objc-class ( name quot -- ) diff --git a/basis/cocoa/subclassing/subclassing.factor b/basis/cocoa/subclassing/subclassing.factor index 62916e45a1..57e5bc7e2b 100644 --- a/basis/cocoa/subclassing/subclassing.factor +++ b/basis/cocoa/subclassing/subclassing.factor @@ -43,7 +43,7 @@ IN: cocoa.subclassing : prepare-method ( ret types quot -- type imp ) [ [ encode-types ] 2keep ] dip '[ _ _ cdecl _ alien-callback ] - (( -- callback )) define-temp ; + ( -- callback ) define-temp ; : prepare-methods ( methods -- methods ) [ diff --git a/basis/compiler/tests/codegen.factor b/basis/compiler/tests/codegen.factor index f5555716f3..3b4123aa28 100644 --- a/basis/compiler/tests/codegen.factor +++ b/basis/compiler/tests/codegen.factor @@ -106,7 +106,7 @@ unit-test [ ] [ [ [ 200 dup [ 200 3array ] curry map drop ] times - ] [ (( n -- )) define-temp ] with-compilation-unit drop + ] [ ( n -- ) define-temp ] with-compilation-unit drop ] unit-test ! Test how dispatch handles the end of a basic block diff --git a/basis/compiler/tests/redefine15.factor b/basis/compiler/tests/redefine15.factor index 54066c690d..7e4d7f4b59 100644 --- a/basis/compiler/tests/redefine15.factor +++ b/basis/compiler/tests/redefine15.factor @@ -5,7 +5,7 @@ DEFER: word-1 : word-2 ( a -- b ) word-1 ; -[ \ word-1 [ ] (( a -- b )) define-declared ] with-compilation-unit +[ \ word-1 [ ] ( a -- b ) define-declared ] with-compilation-unit [ "a" ] [ "a" word-2 ] unit-test @@ -15,6 +15,6 @@ DEFER: word-1 [ 1 1 ] [ 0 word-4 ] unit-test -[ \ word-3 [ [ 2 + ] bi@ ] (( a b -- c d )) define-declared ] with-compilation-unit +[ \ word-3 [ [ 2 + ] bi@ ] ( a b -- c d ) define-declared ] with-compilation-unit [ 2 3 ] [ 0 word-4 ] unit-test diff --git a/basis/compiler/tree/propagation/call-effect/call-effect-tests.factor b/basis/compiler/tree/propagation/call-effect/call-effect-tests.factor index 03bf43418e..b61488bd38 100644 --- a/basis/compiler/tree/propagation/call-effect/call-effect-tests.factor +++ b/basis/compiler/tree/propagation/call-effect/call-effect-tests.factor @@ -5,19 +5,19 @@ compiler.tree.builder compiler.tree.optimizer compiler.tree.debugger sequences eval combinators ; IN: compiler.tree.propagation.call-effect.tests -[ t ] [ \ + (( a b -- c )) execute-effect-unsafe? ] unit-test -[ t ] [ \ + (( a b c -- d e )) execute-effect-unsafe? ] unit-test -[ f ] [ \ + (( a b c -- d )) execute-effect-unsafe? ] unit-test -[ f ] [ \ call (( x -- )) execute-effect-unsafe? ] unit-test +[ t ] [ \ + ( a b -- c ) execute-effect-unsafe? ] unit-test +[ t ] [ \ + ( a b c -- d e ) execute-effect-unsafe? ] unit-test +[ f ] [ \ + ( a b c -- d ) execute-effect-unsafe? ] unit-test +[ f ] [ \ call ( x -- ) execute-effect-unsafe? ] unit-test -[ t ] [ [ + ] cached-effect (( a b -- c )) effect= ] unit-test -[ t ] [ 5 [ + ] curry cached-effect (( a -- c )) effect= ] unit-test -[ t ] [ 5 [ ] curry cached-effect (( -- c )) effect= ] unit-test -[ t ] [ [ dup ] [ drop ] compose cached-effect (( a -- b )) effect= ] unit-test -[ t ] [ [ drop ] [ dup ] compose cached-effect (( a b -- c d )) effect= ] unit-test -[ t ] [ [ 2drop ] [ dup ] compose cached-effect (( a b c -- d e )) effect= ] unit-test -[ t ] [ [ 1 2 3 ] [ 2drop ] compose cached-effect (( -- a )) effect= ] unit-test -[ t ] [ [ 1 2 ] [ 3drop ] compose cached-effect (( a -- )) effect= ] unit-test +[ t ] [ [ + ] cached-effect ( a b -- c ) effect= ] unit-test +[ t ] [ 5 [ + ] curry cached-effect ( a -- c ) effect= ] unit-test +[ t ] [ 5 [ ] curry cached-effect ( -- c ) effect= ] unit-test +[ t ] [ [ dup ] [ drop ] compose cached-effect ( a -- b ) effect= ] unit-test +[ t ] [ [ drop ] [ dup ] compose cached-effect ( a b -- c d ) effect= ] unit-test +[ t ] [ [ 2drop ] [ dup ] compose cached-effect ( a b c -- d e ) effect= ] unit-test +[ t ] [ [ 1 2 3 ] [ 2drop ] compose cached-effect ( -- a ) effect= ] unit-test +[ t ] [ [ 1 2 ] [ 3drop ] compose cached-effect ( a -- ) effect= ] unit-test : optimized-quot ( quot -- quot' ) build-tree optimize-tree nodes>quot ; @@ -44,11 +44,11 @@ IN: compiler.tree.propagation.call-effect.tests [ 3 ] [ 1 2 '[ _ + ] call( a -- b ) ] unit-test [ 3 ] [ 1 2 '[ _ ] [ + ] compose call( a -- b ) ] unit-test -[ t ] [ [ 2 '[ _ ] [ + ] compose ] final-info first infer-value (( object -- object )) effect= ] unit-test -[ t ] [ [ 2 '[ _ ] 1 '[ _ + ] compose ] final-info first infer-value (( -- object )) effect= ] unit-test -[ t ] [ [ 2 '[ _ + ] ] final-info first infer-value (( object -- object )) effect= ] unit-test +[ t ] [ [ 2 '[ _ ] [ + ] compose ] final-info first infer-value ( object -- object ) effect= ] unit-test +[ t ] [ [ 2 '[ _ ] 1 '[ _ + ] compose ] final-info first infer-value ( -- object ) effect= ] unit-test +[ t ] [ [ 2 '[ _ + ] ] final-info first infer-value ( object -- object ) effect= ] unit-test [ f ] [ [ [ [ ] [ 1 ] if ] ] final-info first infer-value ] unit-test -[ t ] [ [ [ 1 ] '[ @ ] ] final-info first infer-value (( -- object )) effect= ] unit-test +[ t ] [ [ [ 1 ] '[ @ ] ] final-info first infer-value ( -- object ) effect= ] unit-test [ f ] [ [ dup drop ] final-info first infer-value ] unit-test ! This should not hang @@ -66,11 +66,11 @@ TUPLE: a-tuple x ; : test-quotatation ( -- quot ) [ call(-redefine-test ] ; -[ t ] [ test-quotatation cached-effect (( a -- b )) effect<= ] unit-test +[ t ] [ test-quotatation cached-effect ( a -- b ) effect<= ] unit-test [ ] [ "IN: compiler.tree.propagation.call-effect.tests USE: math : call(-redefine-test ( a b -- c ) + ;" eval( -- ) ] unit-test -[ t ] [ test-quotatation cached-effect (( a b -- c )) effect<= ] unit-test +[ t ] [ test-quotatation cached-effect ( a b -- c ) effect<= ] unit-test : inline-cache-invalidation-test ( a b c -- c ) call( a b -- c ) ; @@ -78,7 +78,7 @@ TUPLE: a-tuple x ; [ ] [ "IN: compiler.tree.propagation.call-effect.tests USE: math : call(-redefine-test ( a -- c ) 1 + ;" eval( -- ) ] unit-test -[ 1 3 test-quotatation inline-cache-invalidation-test ] [ T{ wrong-values f [ call(-redefine-test ] (( a b -- c )) } = ] must-fail-with +[ 1 3 test-quotatation inline-cache-invalidation-test ] [ T{ wrong-values f [ call(-redefine-test ] ( a b -- c ) } = ] must-fail-with ! See if redefining a tuple class bumps effect counter TUPLE: my-tuple a b c ; diff --git a/basis/compiler/tree/propagation/call-effect/call-effect.factor b/basis/compiler/tree/propagation/call-effect/call-effect.factor index d55769c17b..dee4605a35 100644 --- a/basis/compiler/tree/propagation/call-effect/call-effect.factor +++ b/basis/compiler/tree/propagation/call-effect/call-effect.factor @@ -167,7 +167,7 @@ M: quotation add-quot-to-history add-to-history ; ERROR: uninferable ; : remove-effect-input ( effect -- effect' ) - (( -- object )) swap compose-effects ; + ( -- object ) swap compose-effects ; : (infer-value) ( value-info -- effect ) dup literal?>> [ diff --git a/basis/compiler/tree/propagation/propagation-tests.factor b/basis/compiler/tree/propagation/propagation-tests.factor index 35c6ef8d2a..55d13da3fa 100644 --- a/basis/compiler/tree/propagation/propagation-tests.factor +++ b/basis/compiler/tree/propagation/propagation-tests.factor @@ -899,7 +899,7 @@ SYMBOL: not-an-assoc [ f ] [ [ 5 instance? ] { instance? } inlined? ] unit-test [ t ] [ [ array instance? ] { instance? } inlined? ] unit-test -[ t ] [ [ (( a b c -- c b a )) shuffle ] { shuffle } inlined? ] unit-test +[ t ] [ [ ( a b c -- c b a ) shuffle ] { shuffle } inlined? ] unit-test [ f ] [ [ { 1 2 3 } swap shuffle ] { shuffle } inlined? ] unit-test ! Type function for 'clone' had a subtle issue diff --git a/basis/core-foundation/strings/strings.factor b/basis/core-foundation/strings/strings.factor index 25cd16485b..75e56dff4f 100644 --- a/basis/core-foundation/strings/strings.factor +++ b/basis/core-foundation/strings/strings.factor @@ -99,4 +99,4 @@ FUNCTION: CFStringRef CFCopyTypeIDDescription ( CFTypeID type_id ) ; SYNTAX: CFSTRING: scan-new-word scan-object [ drop ] [ '[ _ [ _ ] initialize-alien ] ] 2bi - (( -- alien )) define-declared ; + ( -- alien ) define-declared ; diff --git a/basis/eval/eval-docs.factor b/basis/eval/eval-docs.factor index e7e3c02303..5ff68665db 100644 --- a/basis/eval/eval-docs.factor +++ b/basis/eval/eval-docs.factor @@ -21,7 +21,7 @@ HELP: eval( "This parsing word is just a slightly nicer syntax for " { $link eval } ". The following are equivalent:" { $code "eval( inputs -- outputs )" - "(( inputs -- outputs )) eval" + "( inputs -- outputs ) eval" } } { $errors "Throws an error if the input is malformed, or if the evaluation itself throws an error." } ; @@ -51,7 +51,7 @@ $nl """USING: eval listener vocabs.parser ; [ "cad.objects" use-vocab - (( -- seq )) (eval) + ( -- seq ) (eval) ] with-interactive-vocabs""" } "Note that the search path in the outer code (set by the " { $link POSTPONE: USING: } " form) has no relation to the search path used when parsing the string parameter (this is determined by " { $link with-interactive-vocabs } " and " { $link use-vocab } ")." ; diff --git a/basis/eval/eval.factor b/basis/eval/eval.factor index a4b5638c02..eb551b1f2a 100644 --- a/basis/eval/eval.factor +++ b/basis/eval/eval.factor @@ -19,7 +19,7 @@ SYNTAX: eval( \ eval parse-call( ; : (eval>string) ( str -- output ) [ parser-quiet? on - '[ _ (( -- )) (eval) ] [ print-error ] recover + '[ _ ( -- ) (eval) ] [ print-error ] recover ] with-string-writer ; : eval>string ( str -- output ) diff --git a/basis/logging/logging.factor b/basis/logging/logging.factor index ddcde5a1ac..e3befe8d3c 100644 --- a/basis/logging/logging.factor +++ b/basis/logging/logging.factor @@ -140,7 +140,7 @@ SYNTAX: LOG: #! Syntax: name level scan-new-word dup scan-word '[ 1array stack>message _ _ log-message ] - (( message -- )) define-declared ; + ( message -- ) define-declared ; USE: vocabs.loader diff --git a/basis/match/match.factor b/basis/match/match.factor index 9baadfe1f2..ca8e8163a4 100644 --- a/basis/match/match.factor +++ b/basis/match/match.factor @@ -11,7 +11,7 @@ SYMBOL: _ : define-match-var ( name -- ) create-in dup t "match-var" set-word-prop - dup [ get ] curry (( -- value )) define-declared ; + dup [ get ] curry ( -- value ) define-declared ; : define-match-vars ( seq -- ) [ define-match-var ] each ; diff --git a/basis/math/bitwise/bitwise.factor b/basis/math/bitwise/bitwise.factor index 509d1d3ca0..8e96cd5e4f 100644 --- a/basis/math/bitwise/bitwise.factor +++ b/basis/math/bitwise/bitwise.factor @@ -77,7 +77,7 @@ DEFER: byte-bit-count 256 iota [ 8 0 [ [ 1 + ] when ] reduce ] B{ } map-as '[ HEX: ff bitand _ nth-unsafe ] -(( byte -- table )) define-declared +( byte -- table ) define-declared \ byte-bit-count make-inline diff --git a/basis/math/partial-dispatch/partial-dispatch.factor b/basis/math/partial-dispatch/partial-dispatch.factor index 2f928dcbe3..fcb789687e 100644 --- a/basis/math/partial-dispatch/partial-dispatch.factor +++ b/basis/math/partial-dispatch/partial-dispatch.factor @@ -95,7 +95,7 @@ M: word integer-op-input-classes : define-integer-op-word ( fix-word big-word triple -- ) [ [ 2nip integer-op-word dup make-foldable ] [ integer-op-quot ] 3bi - (( x y -- z )) define-declared + ( x y -- z ) define-declared ] [ 2nip [ integer-op-word ] keep diff --git a/basis/math/vectors/simd/simd-tests.factor b/basis/math/vectors/simd/simd-tests.factor index 5a0a98107c..3b9e4ffc67 100644 --- a/basis/math/vectors/simd/simd-tests.factor +++ b/basis/math/vectors/simd/simd-tests.factor @@ -334,11 +334,11 @@ simd-classes&reps [ ! Invalid inputs should not cause the compiler to throw errors [ ] [ - [ [ { int-4 } declare t hrshift ] (( a -- b )) define-temp drop ] with-compilation-unit + [ [ { int-4 } declare t hrshift ] ( a -- b ) define-temp drop ] with-compilation-unit ] unit-test [ ] [ - [ [ { int-4 } declare { 3 2 1 } vshuffle ] (( a -- b )) define-temp drop ] with-compilation-unit + [ [ { int-4 } declare { 3 2 1 } vshuffle ] ( a -- b ) define-temp drop ] with-compilation-unit ] unit-test ! Shuffles diff --git a/basis/memoize/memoize-tests.factor b/basis/memoize/memoize-tests.factor index 11dfd705c2..e89685263d 100644 --- a/basis/memoize/memoize-tests.factor +++ b/basis/memoize/memoize-tests.factor @@ -30,6 +30,6 @@ unit-test [ "IN: memoize.tests\n: fib ( -- ) ;\n" ] [ [ \ fib see ] with-string-writer ] unit-test -[ sq ] (( a -- b )) memoize-quot "q" set +[ sq ] ( a -- b ) memoize-quot "q" set [ 9 ] [ 3 "q" get call ] unit-test diff --git a/basis/multiline/multiline.factor b/basis/multiline/multiline.factor index 51efecc9cd..070b1da032 100644 --- a/basis/multiline/multiline.factor +++ b/basis/multiline/multiline.factor @@ -34,7 +34,7 @@ ERROR: text-found-before-eol string ; SYNTAX: STRING: scan-new-word parse-here 1quotation - (( -- string )) define-inline ; + ( -- string ) define-inline ; quot swapd - (( input -- ast )) define-declared "ebnf-parser" set-word-prop + ( input -- ast ) define-declared "ebnf-parser" set-word-prop reset-tokenizer ; diff --git a/basis/peg/peg.factor b/basis/peg/peg.factor index 4511c9d235..2714e8e56f 100644 --- a/basis/peg/peg.factor +++ b/basis/peg/peg.factor @@ -270,7 +270,7 @@ GENERIC: (compile) ( peg -- quot ) : define-parser-word ( parser word -- ) #! Return the body of the word that is the compiled version #! of the parser. - 2dup swap peg>> (compile) (( -- result )) define-declared + 2dup swap peg>> (compile) ( -- result ) define-declared swap id>> "peg-id" set-word-prop ; : compile-parser ( parser -- word ) @@ -295,13 +295,13 @@ SYMBOL: delayed #! Work through all delayed parsers and recompile their #! words to have the correct bodies. delayed get [ - call( -- parser ) compile-parser-quot (( -- result )) define-declared + call( -- parser ) compile-parser-quot ( -- result ) define-declared ] assoc-each ; : compile ( parser -- word ) [ H{ } clone delayed [ - compile-parser-quot (( -- result )) define-temp fixup-delayed + compile-parser-quot ( -- result ) define-temp fixup-delayed ] with-variable ] with-compilation-unit ; diff --git a/basis/regexp/compiler/compiler.factor b/basis/regexp/compiler/compiler.factor index 0682cc4f56..a8b3c9168b 100644 --- a/basis/regexp/compiler/compiler.factor +++ b/basis/regexp/compiler/compiler.factor @@ -112,7 +112,7 @@ C: box : states>code ( words dfa -- ) '[ dup _ word>quot - (( last-match index string -- ? )) + ( last-match index string -- ? ) define-declared ] each ; @@ -132,7 +132,7 @@ PRIVATE> : dfa>word ( dfa -- quot ) dfa>main-word execution-quot word-template - (( start-index string regexp -- i/f )) define-temp ; + ( start-index string regexp -- i/f ) define-temp ; : dfa>shortest-word ( dfa -- word ) t shortest? [ dfa>word ] with-variable ; diff --git a/basis/regexp/regexp.factor b/basis/regexp/regexp.factor index de0c1a03a7..6ad6060dcf 100644 --- a/basis/regexp/regexp.factor +++ b/basis/regexp/regexp.factor @@ -167,7 +167,7 @@ DEFER: compile-next-match dup \ next-initial-word = [ drop _ [ compile-regexp dfa>> def>> ] [ reverse-regexp? ] bi '[ { array-capacity string regexp } declare _ _ next-match ] - (( i string regexp -- start end string )) define-temp + ( i string regexp -- start end string ) define-temp ] when ] change-next-match ; diff --git a/basis/stack-checker/branches/branches.factor b/basis/stack-checker/branches/branches.factor index 77e983eefb..00f2773b38 100644 --- a/basis/stack-checker/branches/branches.factor +++ b/basis/stack-checker/branches/branches.factor @@ -47,7 +47,7 @@ SYMBOLS: +bottom+ +top+ ; SYMBOLS: combinator quotations ; : simple-unbalanced-branches-error ( word quots branches -- * ) - [ length [ (( ..a -- ..b )) ] replicate ] + [ length [ ( ..a -- ..b ) ] replicate ] [ [ length [ "x" ] bi@ ] { } assoc>map ] bi unbalanced-branches-error ; @@ -128,8 +128,8 @@ M: declared-effect curried/composed? known>> curried/composed? ; : declare-if-effects ( -- ) H{ } clone V{ } clone - [ [ \ if (( ..a -- ..b )) ] 2dip 0 declare-effect-d ] - [ [ \ if (( ..a -- ..b )) ] 2dip 1 declare-effect-d ] 2bi ; + [ [ \ if ( ..a -- ..b ) ] 2dip 0 declare-effect-d ] + [ [ \ if ( ..a -- ..b ) ] 2dip 1 declare-effect-d ] 2bi ; : infer-if ( -- ) \ if combinator set diff --git a/basis/stack-checker/known-words/known-words.factor b/basis/stack-checker/known-words/known-words.factor index 11657af458..6d62c9fc74 100644 --- a/basis/stack-checker/known-words/known-words.factor +++ b/basis/stack-checker/known-words/known-words.factor @@ -41,10 +41,10 @@ IN: stack-checker.known-words "shuffle" word-prop infer-shuffle ; : infer-local-reader ( word -- ) - (( -- value )) apply-word/effect ; + ( -- value ) apply-word/effect ; : infer-local-writer ( word -- ) - (( value -- )) apply-word/effect ; + ( value -- ) apply-word/effect ; : non-inline-word ( word -- ) dup depends-on-effect @@ -61,21 +61,21 @@ IN: stack-checker.known-words } cond ; { - { drop (( x -- )) } - { 2drop (( x y -- )) } - { 3drop (( x y z -- )) } - { dup (( x -- x x )) } - { 2dup (( x y -- x y x y )) } - { 3dup (( x y z -- x y z x y z )) } - { rot (( x y z -- y z x )) } - { -rot (( x y z -- z x y )) } - { dupd (( x y -- x x y )) } - { swapd (( x y z -- y x z )) } - { nip (( x y -- y )) } - { 2nip (( x y z -- z )) } - { over (( x y -- x y x )) } - { pick (( x y z -- x y z x )) } - { swap (( x y -- y x )) } + { drop ( x -- ) } + { 2drop ( x y -- ) } + { 3drop ( x y z -- ) } + { dup ( x -- x x ) } + { 2dup ( x y -- x y x y ) } + { 3dup ( x y z -- x y z x y z ) } + { rot ( x y z -- y z x ) } + { -rot ( x y z -- z x y ) } + { dupd ( x y -- x x y ) } + { swapd ( x y z -- y x z ) } + { nip ( x y -- y ) } + { 2nip ( x y z -- z ) } + { over ( x y -- x y x ) } + { pick ( x y z -- x y z x ) } + { swap ( x y -- y x ) } } [ "shuffle" set-word-prop ] assoc-each : check-declaration ( declaration -- declaration ) diff --git a/basis/tools/deploy/shaker/shaker.factor b/basis/tools/deploy/shaker/shaker.factor index 0f838926e0..72a2c4b881 100755 --- a/basis/tools/deploy/shaker/shaker.factor +++ b/basis/tools/deploy/shaker/shaker.factor @@ -285,7 +285,7 @@ IN: tools.deploy.shaker recursive-subst ; : new-default-method ( -- gensym ) - [ [ "No method" throw ] (( -- * )) define-temp ] with-compilation-unit ; + [ [ "No method" throw ] ( -- * ) define-temp ] with-compilation-unit ; : strip-default-methods ( -- ) ! In a development image, each generic has its own default method. @@ -569,11 +569,11 @@ SYMBOL: deploy-vocab : die-with ( error original-error -- * ) #! We don't want DCE to drop the error before the die call! - [ die 1 exit ] (( a -- * )) call-effect-unsafe ; + [ die 1 exit ] ( a -- * ) call-effect-unsafe ; : die-with2 ( error original-error -- * ) #! We don't want DCE to drop the error before the die call! - [ die 1 exit ] (( a b -- * )) call-effect-unsafe ; + [ die 1 exit ] ( a b -- * ) call-effect-unsafe ; : deploy-error-handler ( quot -- ) [ diff --git a/basis/tools/profiler/profiler-tests.factor b/basis/tools/profiler/profiler-tests.factor index b02b800463..68b26420d0 100644 --- a/basis/tools/profiler/profiler-tests.factor +++ b/basis/tools/profiler/profiler-tests.factor @@ -67,7 +67,7 @@ IN: tools.profiler.tests [ 1 ] [ [ - [ [ ] (( -- )) define-temp ] with-compilation-unit + [ [ ] ( -- ) define-temp ] with-compilation-unit dup execute( -- ) ] profile counter>> diff --git a/basis/tr/tr.factor b/basis/tr/tr.factor index c7a21c3cb2..7c3cc9e054 100644 --- a/basis/tr/tr.factor +++ b/basis/tr/tr.factor @@ -30,13 +30,13 @@ M: bad-tr summary '[ [ dup ascii? [ _ tr-nth ] when ] map ] ; : define-tr ( word mapping -- ) - tr-quot (( seq -- translated )) define-declared ; + tr-quot ( seq -- translated ) define-declared ; : fast-tr-quot ( mapping -- quot ) '[ [ _ tr-nth ] map! drop ] ; : define-fast-tr ( word mapping -- ) - fast-tr-quot (( seq -- )) define-declared ; + fast-tr-quot ( seq -- ) define-declared ; PRIVATE> diff --git a/basis/typed/typed-tests.factor b/basis/typed/typed-tests.factor index 70edcf2334..6e4b892b81 100644 --- a/basis/typed/typed-tests.factor +++ b/basis/typed/typed-tests.factor @@ -52,7 +52,7 @@ TUPLE: unboxable2 TYPED: unboxy ( in: unboxable -- out: unboxable2 ) dup [ x>> ] [ y>> ] bi - unboxable2 boa ; -[ (( in: fixnum in: fixnum -- out: fixnum out: fixnum out: fixnum )) ] +[ ( in: fixnum in: fixnum -- out: fixnum out: fixnum out: fixnum ) ] [ \ unboxy "typed-word" word-prop stack-effect ] unit-test [ T{ unboxable2 { u T{ unboxable { x 12 } { y 3 } } } { xy 9 } } ] diff --git a/basis/ui/ui.factor b/basis/ui/ui.factor index 7a7868149d..4917b3697b 100644 --- a/basis/ui/ui.factor +++ b/basis/ui/ui.factor @@ -222,7 +222,7 @@ HOOK: system-alert ui-backend ( caption text -- ) : define-main-window ( word attributes quot -- ) [ - '[ [ f _ clone @ open-window ] with-ui ] (( -- )) define-declared + '[ [ f _ clone @ open-window ] with-ui ] ( -- ) define-declared ] [ 2drop current-vocab main<< ] 3bi ; SYNTAX: MAIN-WINDOW: diff --git a/basis/values/values.factor b/basis/values/values.factor index 0189742ad4..83003a1776 100644 --- a/basis/values/values.factor +++ b/basis/values/values.factor @@ -34,7 +34,7 @@ SYNTAX: VALUE: scan-new-word dup t "no-def-strip" set-word-prop T{ value-holder } clone [ obj>> ] curry - (( -- value )) define-declared ; + ( -- value ) define-declared ; M: value-word definer drop \ VALUE: f ; diff --git a/basis/windows/com/com-tests.factor b/basis/windows/com/com-tests.factor index f11c930c85..43e99d739a 100644 --- a/basis/windows/com/com-tests.factor +++ b/basis/windows/com/com-tests.factor @@ -25,11 +25,11 @@ COM-INTERFACE: ISelfReferential IUnknown {d4f45bf8-f720-4701-a09d-e8e341981121} { GUID: {00000000-0000-0000-C000-000000000046} } [ IUnknown-iid ] unit-test { GUID: {b06ac3f4-30e4-406b-a7cd-c29cead4552c} } [ IUnrelated-iid ] unit-test -{ (( -- iid )) } [ \ ISimple-iid stack-effect ] unit-test -{ (( this -- HRESULT )) } [ \ ISimple::returnOK stack-effect ] unit-test -{ (( this -- int )) } [ \ IInherited::getX stack-effect ] unit-test -{ (( this newX -- )) } [ \ IInherited::setX stack-effect ] unit-test -{ (( this mul add -- int )) } [ \ IUnrelated::xMulAdd stack-effect ] unit-test +{ ( -- iid ) } [ \ ISimple-iid stack-effect ] unit-test +{ ( this -- HRESULT ) } [ \ ISimple::returnOK stack-effect ] unit-test +{ ( this -- int ) } [ \ IInherited::getX stack-effect ] unit-test +{ ( this newX -- ) } [ \ IInherited::setX stack-effect ] unit-test +{ ( this mul add -- int ) } [ \ IUnrelated::xMulAdd stack-effect ] unit-test SYMBOL: +test-wrapper+ SYMBOL: +guinea-pig-implementation+ diff --git a/basis/windows/com/syntax/syntax.factor b/basis/windows/com/syntax/syntax.factor index 06e43b39f5..a19f15b483 100755 --- a/basis/windows/com/syntax/syntax.factor +++ b/basis/windows/com/syntax/syntax.factor @@ -74,7 +74,7 @@ ERROR: no-com-interface interface ; define-declared ; : define-words-for-com-interface ( definition -- ) - [ [ (iid-word) ] [ iid>> 1quotation ] bi (( -- iid )) define-declared ] + [ [ (iid-word) ] [ iid>> 1quotation ] bi ( -- iid ) define-declared ] [ dup family-tree-functions [ (define-word-for-function) ] with each-index diff --git a/basis/windows/com/wrapper/wrapper.factor b/basis/windows/com/wrapper/wrapper.factor index e4601a1de2..88c8d28859 100644 --- a/basis/windows/com/wrapper/wrapper.factor +++ b/basis/windows/com/wrapper/wrapper.factor @@ -93,7 +93,7 @@ unless : compile-alien-callback ( word return parameters abi quot -- word ) '[ _ _ _ _ alien-callback ] - [ [ (( -- alien )) define-declared ] pick [ call ] dip ] + [ [ ( -- alien ) define-declared ] pick [ call ] dip ] with-compilation-unit ; : (callback-word) ( function-name interface counter -- word ) diff --git a/basis/xml/syntax/syntax.factor b/basis/xml/syntax/syntax.factor index 9780869c0e..ca196ac7ad 100644 --- a/basis/xml/syntax/syntax.factor +++ b/basis/xml/syntax/syntax.factor @@ -37,7 +37,7 @@ SYNTAX: TAG: scan-token scan-word parse-definition define-tag ; SYNTAX: XML-NS: - scan-new-word scan-token '[ f swap _ ] (( string -- name )) define-memoized ; + scan-new-word scan-token '[ f swap _ ] ( string -- name ) define-memoized ; tuple 1quotation (( -- value )) define-inline +2array >tuple 1quotation ( -- value ) define-inline "((tombstone))" "hashtables.private" create "tombstone" "hashtables.private" lookup t -2array >tuple 1quotation (( -- value )) define-inline +2array >tuple 1quotation ( -- value ) define-inline ! Some tuple classes "curry" "kernel" create @@ -287,7 +287,7 @@ tuple ] [ ] make ] } cleave -(( obj quot -- curry )) define-declared +( obj quot -- curry ) define-declared "compose" "kernel" create tuple @@ -310,7 +310,7 @@ tuple ] [ ] make ] } cleave -(( quot1 quot2 -- compose )) define-declared +( quot1 quot2 -- compose ) define-declared ! Sub-primitive words : make-sub-primitive ( word vocab effect -- ) @@ -321,62 +321,62 @@ tuple ] dip define-declared ; { - { "mega-cache-lookup" "generic.single.private" (( methods index cache -- )) } - { "inline-cache-miss" "generic.single.private" (( generic methods index cache -- )) } - { "inline-cache-miss-tail" "generic.single.private" (( generic methods index cache -- )) } - { "drop" "kernel" (( x -- )) } - { "2drop" "kernel" (( x y -- )) } - { "3drop" "kernel" (( x y z -- )) } - { "dup" "kernel" (( x -- x x )) } - { "2dup" "kernel" (( x y -- x y x y )) } - { "3dup" "kernel" (( x y z -- x y z x y z )) } - { "rot" "kernel" (( x y z -- y z x )) } - { "-rot" "kernel" (( x y z -- z x y )) } - { "dupd" "kernel" (( x y -- x x y )) } - { "swapd" "kernel" (( x y z -- y x z )) } - { "nip" "kernel" (( x y -- y )) } - { "2nip" "kernel" (( x y z -- z )) } - { "over" "kernel" (( x y -- x y x )) } - { "pick" "kernel" (( x y z -- x y z x )) } - { "swap" "kernel" (( x y -- y x )) } - { "eq?" "kernel" (( obj1 obj2 -- ? )) } - { "tag" "kernel.private" (( object -- n )) } - { "(execute)" "kernel.private" (( word -- )) } - { "(call)" "kernel.private" (( quot -- )) } - { "fpu-state" "kernel.private" (( -- )) } - { "set-fpu-state" "kernel.private" (( -- )) } - { "unwind-native-frames" "kernel.private" (( -- )) } - { "set-callstack" "kernel.private" (( callstack -- * )) } - { "lazy-jit-compile" "kernel.private" (( -- )) } - { "c-to-factor" "kernel.private" (( -- )) } - { "slot" "slots.private" (( obj m -- value )) } - { "get-local" "locals.backend" (( n -- obj )) } - { "load-local" "locals.backend" (( obj -- )) } - { "drop-locals" "locals.backend" (( n -- )) } - { "both-fixnums?" "math.private" (( x y -- ? )) } - { "fixnum+fast" "math.private" (( x y -- z )) } - { "fixnum-fast" "math.private" (( x y -- z )) } - { "fixnum*fast" "math.private" (( x y -- z )) } - { "fixnum-bitand" "math.private" (( x y -- z )) } - { "fixnum-bitor" "math.private" (( x y -- z )) } - { "fixnum-bitxor" "math.private" (( x y -- z )) } - { "fixnum-bitnot" "math.private" (( x -- y )) } - { "fixnum-mod" "math.private" (( x y -- z )) } - { "fixnum-shift-fast" "math.private" (( x y -- z )) } - { "fixnum/i-fast" "math.private" (( x y -- z )) } - { "fixnum/mod-fast" "math.private" (( x y -- z w )) } - { "fixnum+" "math.private" (( x y -- z )) } - { "fixnum-" "math.private" (( x y -- z )) } - { "fixnum*" "math.private" (( x y -- z )) } - { "fixnum<" "math.private" (( x y -- ? )) } - { "fixnum<=" "math.private" (( x y -- z )) } - { "fixnum>" "math.private" (( x y -- ? )) } - { "fixnum>=" "math.private" (( x y -- ? )) } - { "string-nth-fast" "strings.private" (( n string -- ch )) } - { "(set-context)" "threads.private" (( obj context -- obj' )) } - { "(set-context-and-delete)" "threads.private" (( obj context -- * )) } - { "(start-context)" "threads.private" (( obj quot -- obj' )) } - { "(start-context-and-delete)" "threads.private" (( obj quot -- * )) } + { "mega-cache-lookup" "generic.single.private" ( methods index cache -- ) } + { "inline-cache-miss" "generic.single.private" ( generic methods index cache -- ) } + { "inline-cache-miss-tail" "generic.single.private" ( generic methods index cache -- ) } + { "drop" "kernel" ( x -- ) } + { "2drop" "kernel" ( x y -- ) } + { "3drop" "kernel" ( x y z -- ) } + { "dup" "kernel" ( x -- x x ) } + { "2dup" "kernel" ( x y -- x y x y ) } + { "3dup" "kernel" ( x y z -- x y z x y z ) } + { "rot" "kernel" ( x y z -- y z x ) } + { "-rot" "kernel" ( x y z -- z x y ) } + { "dupd" "kernel" ( x y -- x x y ) } + { "swapd" "kernel" ( x y z -- y x z ) } + { "nip" "kernel" ( x y -- y ) } + { "2nip" "kernel" ( x y z -- z ) } + { "over" "kernel" ( x y -- x y x ) } + { "pick" "kernel" ( x y z -- x y z x ) } + { "swap" "kernel" ( x y -- y x ) } + { "eq?" "kernel" ( obj1 obj2 -- ? ) } + { "tag" "kernel.private" ( object -- n ) } + { "(execute)" "kernel.private" ( word -- ) } + { "(call)" "kernel.private" ( quot -- ) } + { "fpu-state" "kernel.private" ( -- ) } + { "set-fpu-state" "kernel.private" ( -- ) } + { "unwind-native-frames" "kernel.private" ( -- ) } + { "set-callstack" "kernel.private" ( callstack -- * ) } + { "lazy-jit-compile" "kernel.private" ( -- ) } + { "c-to-factor" "kernel.private" ( -- ) } + { "slot" "slots.private" ( obj m -- value ) } + { "get-local" "locals.backend" ( n -- obj ) } + { "load-local" "locals.backend" ( obj -- ) } + { "drop-locals" "locals.backend" ( n -- ) } + { "both-fixnums?" "math.private" ( x y -- ? ) } + { "fixnum+fast" "math.private" ( x y -- z ) } + { "fixnum-fast" "math.private" ( x y -- z ) } + { "fixnum*fast" "math.private" ( x y -- z ) } + { "fixnum-bitand" "math.private" ( x y -- z ) } + { "fixnum-bitor" "math.private" ( x y -- z ) } + { "fixnum-bitxor" "math.private" ( x y -- z ) } + { "fixnum-bitnot" "math.private" ( x -- y ) } + { "fixnum-mod" "math.private" ( x y -- z ) } + { "fixnum-shift-fast" "math.private" ( x y -- z ) } + { "fixnum/i-fast" "math.private" ( x y -- z ) } + { "fixnum/mod-fast" "math.private" ( x y -- z w ) } + { "fixnum+" "math.private" ( x y -- z ) } + { "fixnum-" "math.private" ( x y -- z ) } + { "fixnum*" "math.private" ( x y -- z ) } + { "fixnum<" "math.private" ( x y -- ? ) } + { "fixnum<=" "math.private" ( x y -- z ) } + { "fixnum>" "math.private" ( x y -- ? ) } + { "fixnum>=" "math.private" ( x y -- ? ) } + { "string-nth-fast" "strings.private" ( n string -- ch ) } + { "(set-context)" "threads.private" ( obj context -- obj' ) } + { "(set-context-and-delete)" "threads.private" ( obj context -- * ) } + { "(start-context)" "threads.private" ( obj quot -- obj' ) } + { "(start-context-and-delete)" "threads.private" ( obj quot -- * ) } } [ first3 make-sub-primitive ] each ! Primitive words @@ -391,165 +391,165 @@ tuple ] dip define-declared ; { - { "" "alien" "primitive_callback" (( return-rewind word -- alien )) } - { "" "alien" "primitive_displaced_alien" (( displacement c-ptr -- alien )) } - { "alien-address" "alien" "primitive_alien_address" (( c-ptr -- addr )) } - { "alien-cell" "alien.accessors" "primitive_alien_cell" (( c-ptr n -- value )) } - { "alien-double" "alien.accessors" "primitive_alien_double" (( c-ptr n -- value )) } - { "alien-float" "alien.accessors" "primitive_alien_float" (( c-ptr n -- value )) } - { "alien-signed-1" "alien.accessors" "primitive_alien_signed_1" (( c-ptr n -- value )) } - { "alien-signed-2" "alien.accessors" "primitive_alien_signed_2" (( c-ptr n -- value )) } - { "alien-signed-4" "alien.accessors" "primitive_alien_signed_4" (( c-ptr n -- value )) } - { "alien-signed-8" "alien.accessors" "primitive_alien_signed_8" (( c-ptr n -- value )) } - { "alien-signed-cell" "alien.accessors" "primitive_alien_signed_cell" (( c-ptr n -- value )) } - { "alien-unsigned-1" "alien.accessors" "primitive_alien_unsigned_1" (( c-ptr n -- value )) } - { "alien-unsigned-2" "alien.accessors" "primitive_alien_unsigned_2" (( c-ptr n -- value )) } - { "alien-unsigned-4" "alien.accessors" "primitive_alien_unsigned_4" (( c-ptr n -- value )) } - { "alien-unsigned-8" "alien.accessors" "primitive_alien_unsigned_8" (( c-ptr n -- value )) } - { "alien-unsigned-cell" "alien.accessors" "primitive_alien_unsigned_cell" (( c-ptr n -- value )) } - { "set-alien-cell" "alien.accessors" "primitive_set_alien_cell" (( value c-ptr n -- )) } - { "set-alien-double" "alien.accessors" "primitive_set_alien_double" (( value c-ptr n -- )) } - { "set-alien-float" "alien.accessors" "primitive_set_alien_float" (( value c-ptr n -- )) } - { "set-alien-signed-1" "alien.accessors" "primitive_set_alien_signed_1" (( value c-ptr n -- )) } - { "set-alien-signed-2" "alien.accessors" "primitive_set_alien_signed_2" (( value c-ptr n -- )) } - { "set-alien-signed-4" "alien.accessors" "primitive_set_alien_signed_4" (( value c-ptr n -- )) } - { "set-alien-signed-8" "alien.accessors" "primitive_set_alien_signed_8" (( value c-ptr n -- )) } - { "set-alien-signed-cell" "alien.accessors" "primitive_set_alien_signed_cell" (( value c-ptr n -- )) } - { "set-alien-unsigned-1" "alien.accessors" "primitive_set_alien_unsigned_1" (( value c-ptr n -- )) } - { "set-alien-unsigned-2" "alien.accessors" "primitive_set_alien_unsigned_2" (( value c-ptr n -- )) } - { "set-alien-unsigned-4" "alien.accessors" "primitive_set_alien_unsigned_4" (( value c-ptr n -- )) } - { "set-alien-unsigned-8" "alien.accessors" "primitive_set_alien_unsigned_8" (( value c-ptr n -- )) } - { "set-alien-unsigned-cell" "alien.accessors" "primitive_set_alien_unsigned_cell" (( value c-ptr n -- )) } - { "(dlopen)" "alien.libraries" "primitive_dlopen" (( path -- dll )) } - { "(dlsym)" "alien.libraries" "primitive_dlsym" (( name dll -- alien )) } - { "(dlsym-raw)" "alien.libraries" "primitive_dlsym_raw" (( name dll -- alien )) } - { "dlclose" "alien.libraries" "primitive_dlclose" (( dll -- )) } - { "dll-valid?" "alien.libraries" "primitive_dll_validp" (( dll -- ? )) } - { "current-callback" "alien.private" "primitive_current_callback" (( -- n )) } - { "" "arrays" "primitive_array" (( n elt -- array )) } - { "resize-array" "arrays" "primitive_resize_array" (( n array -- new-array )) } - { "(byte-array)" "byte-arrays" "primitive_uninitialized_byte_array" (( n -- byte-array )) } - { "" "byte-arrays" "primitive_byte_array" (( n -- byte-array )) } - { "resize-byte-array" "byte-arrays" "primitive_resize_byte_array" (( n byte-array -- new-byte-array )) } - { "" "classes.tuple.private" "primitive_tuple_boa" (( slots... layout -- tuple )) } - { "" "classes.tuple.private" "primitive_tuple" (( layout -- tuple )) } - { "modify-code-heap" "compiler.units" "primitive_modify_code_heap" (( alist update-existing? reset-pics? -- )) } - { "lookup-method" "generic.single.private" "primitive_lookup_method" (( object methods -- method )) } - { "mega-cache-miss" "generic.single.private" "primitive_mega_cache_miss" (( methods index cache -- method )) } - { "(exists?)" "io.files.private" "primitive_existsp" (( path -- ? )) } - { "(fopen)" "io.streams.c" "primitive_fopen" (( path mode -- alien )) } - { "fclose" "io.streams.c" "primitive_fclose" (( alien -- )) } - { "fflush" "io.streams.c" "primitive_fflush" (( alien -- )) } - { "fgetc" "io.streams.c" "primitive_fgetc" (( alien -- byte/f )) } - { "fputc" "io.streams.c" "primitive_fputc" (( byte alien -- )) } - { "fread-unsafe" "io.streams.c" "primitive_fread" (( n buf alien -- count )) } - { "fseek" "io.streams.c" "primitive_fseek" (( alien offset whence -- )) } - { "ftell" "io.streams.c" "primitive_ftell" (( alien -- n )) } - { "fwrite" "io.streams.c" "primitive_fwrite" (( data length alien -- )) } - { "(clone)" "kernel" "primitive_clone" (( obj -- newobj )) } - { "" "kernel" "primitive_wrapper" (( obj -- wrapper )) } - { "callstack" "kernel" "primitive_callstack" (( -- callstack )) } - { "callstack>array" "kernel" "primitive_callstack_to_array" (( callstack -- array )) } - { "datastack" "kernel" "primitive_datastack" (( -- array )) } - { "die" "kernel" "primitive_die" (( -- )) } - { "retainstack" "kernel" "primitive_retainstack" (( -- array )) } - { "(identity-hashcode)" "kernel.private" "primitive_identity_hashcode" (( obj -- code )) } - { "become" "kernel.private" "primitive_become" (( old new -- )) } - { "callstack-bounds" "kernel.private" "primitive_callstack_bounds" (( -- start end )) } - { "check-datastack" "kernel.private" "primitive_check_datastack" (( array in# out# -- ? )) } - { "compute-identity-hashcode" "kernel.private" "primitive_compute_identity_hashcode" (( obj -- )) } - { "context-object" "kernel.private" "primitive_context_object" (( n -- obj )) } - { "innermost-frame-executing" "kernel.private" "primitive_innermost_stack_frame_executing" (( callstack -- obj )) } - { "innermost-frame-scan" "kernel.private" "primitive_innermost_stack_frame_scan" (( callstack -- n )) } - { "set-context-object" "kernel.private" "primitive_set_context_object" (( obj n -- )) } - { "set-datastack" "kernel.private" "primitive_set_datastack" (( array -- )) } - { "set-innermost-frame-quot" "kernel.private" "primitive_set_innermost_stack_frame_quot" (( n callstack -- )) } - { "set-retainstack" "kernel.private" "primitive_set_retainstack" (( array -- )) } - { "set-special-object" "kernel.private" "primitive_set_special_object" (( obj n -- )) } - { "special-object" "kernel.private" "primitive_special_object" (( n -- obj )) } - { "strip-stack-traces" "kernel.private" "primitive_strip_stack_traces" (( -- )) } - { "unimplemented" "kernel.private" "primitive_unimplemented" (( -- * )) } - { "load-locals" "locals.backend" "primitive_load_locals" (( ... n -- )) } - { "bits>double" "math" "primitive_bits_double" (( n -- x )) } - { "bits>float" "math" "primitive_bits_float" (( n -- x )) } - { "double>bits" "math" "primitive_double_bits" (( x -- n )) } - { "float>bits" "math" "primitive_float_bits" (( x -- n )) } - { "(format-float)" "math.parser.private" "primitive_format_float" (( n format -- byte-array )) } - { "bignum*" "math.private" "primitive_bignum_multiply" (( x y -- z )) } - { "bignum+" "math.private" "primitive_bignum_add" (( x y -- z )) } - { "bignum-" "math.private" "primitive_bignum_subtract" (( x y -- z )) } - { "bignum-bit?" "math.private" "primitive_bignum_bitp" (( n x -- ? )) } - { "bignum-bitand" "math.private" "primitive_bignum_and" (( x y -- z )) } - { "bignum-bitnot" "math.private" "primitive_bignum_not" (( x -- y )) } - { "bignum-bitor" "math.private" "primitive_bignum_or" (( x y -- z )) } - { "bignum-bitxor" "math.private" "primitive_bignum_xor" (( x y -- z )) } - { "bignum-log2" "math.private" "primitive_bignum_log2" (( x -- n )) } - { "bignum-mod" "math.private" "primitive_bignum_mod" (( x y -- z )) } - { "bignum-shift" "math.private" "primitive_bignum_shift" (( x y -- z )) } - { "bignum/i" "math.private" "primitive_bignum_divint" (( x y -- z )) } - { "bignum/mod" "math.private" "primitive_bignum_divmod" (( x y -- z w )) } - { "bignum<" "math.private" "primitive_bignum_less" (( x y -- ? )) } - { "bignum<=" "math.private" "primitive_bignum_lesseq" (( x y -- ? )) } - { "bignum=" "math.private" "primitive_bignum_eq" (( x y -- ? )) } - { "bignum>" "math.private" "primitive_bignum_greater" (( x y -- ? )) } - { "bignum>=" "math.private" "primitive_bignum_greatereq" (( x y -- ? )) } - { "bignum>fixnum" "math.private" "primitive_bignum_to_fixnum" (( x -- y )) } - { "fixnum-shift" "math.private" "primitive_fixnum_shift" (( x y -- z )) } - { "fixnum/i" "math.private" "primitive_fixnum_divint" (( x y -- z )) } - { "fixnum/mod" "math.private" "primitive_fixnum_divmod" (( x y -- z w )) } - { "fixnum>bignum" "math.private" "primitive_fixnum_to_bignum" (( x -- y )) } - { "fixnum>float" "math.private" "primitive_fixnum_to_float" (( x -- y )) } - { "float*" "math.private" "primitive_float_multiply" (( x y -- z )) } - { "float+" "math.private" "primitive_float_add" (( x y -- z )) } - { "float-" "math.private" "primitive_float_subtract" (( x y -- z )) } - { "float-u<" "math.private" "primitive_float_less" (( x y -- ? )) } - { "float-u<=" "math.private" "primitive_float_lesseq" (( x y -- ? )) } - { "float-u>" "math.private" "primitive_float_greater" (( x y -- ? )) } - { "float-u>=" "math.private" "primitive_float_greatereq" (( x y -- ? )) } - { "float/f" "math.private" "primitive_float_divfloat" (( x y -- z )) } - { "float<" "math.private" "primitive_float_less" (( x y -- ? )) } - { "float<=" "math.private" "primitive_float_lesseq" (( x y -- ? )) } - { "float=" "math.private" "primitive_float_eq" (( x y -- ? )) } - { "float>" "math.private" "primitive_float_greater" (( x y -- ? )) } - { "float>=" "math.private" "primitive_float_greatereq" (( x y -- ? )) } - { "float>bignum" "math.private" "primitive_float_to_bignum" (( x -- y )) } - { "float>fixnum" "math.private" "primitive_float_to_fixnum" (( x -- y )) } - { "all-instances" "memory" "primitive_all_instances" (( -- array )) } - { "(code-blocks)" "tools.memory.private" "primitive_code_blocks" (( -- array )) } - { "(code-room)" "tools.memory.private" "primitive_code_room" (( -- code-room )) } - { "compact-gc" "memory" "primitive_compact_gc" (( -- )) } - { "(data-room)" "tools.memory.private" "primitive_data_room" (( -- data-room )) } - { "disable-gc-events" "tools.memory.private" "primitive_disable_gc_events" (( -- events )) } - { "enable-gc-events" "tools.memory.private" "primitive_enable_gc_events" (( -- )) } - { "gc" "memory" "primitive_full_gc" (( -- )) } - { "minor-gc" "memory" "primitive_minor_gc" (( -- )) } - { "size" "memory" "primitive_size" (( obj -- n )) } - { "(save-image)" "memory.private" "primitive_save_image" (( path1 path2 -- )) } - { "(save-image-and-exit)" "memory.private" "primitive_save_image_and_exit" (( path1 path2 -- )) } - { "jit-compile" "quotations" "primitive_jit_compile" (( quot -- )) } - { "quot-compiled?" "quotations" "primitive_quot_compiled_p" (( quot -- ? )) } - { "quotation-code" "quotations" "primitive_quotation_code" (( quot -- start end )) } - { "array>quotation" "quotations.private" "primitive_array_to_quotation" (( array -- quot )) } - { "set-slot" "slots.private" "primitive_set_slot" (( value obj n -- )) } - { "" "strings" "primitive_string" (( n ch -- string )) } - { "resize-string" "strings" "primitive_resize_string" (( n str -- newstr )) } - { "set-string-nth-fast" "strings.private" "primitive_set_string_nth_fast" (( ch n string -- )) } - { "(exit)" "system" "primitive_exit" (( n -- * )) } - { "nano-count" "system" "primitive_nano_count" (( -- ns )) } - { "(sleep)" "threads.private" "primitive_sleep" (( nanos -- )) } - { "callstack-for" "threads.private" "primitive_callstack_for" (( context -- array )) } - { "context-object-for" "threads.private" "primitive_context_object_for" (( n context -- obj )) } - { "datastack-for" "threads.private" "primitive_datastack_for" (( context -- array )) } - { "retainstack-for" "threads.private" "primitive_retainstack_for" (( context -- array )) } - { "dispatch-stats" "tools.dispatch.private" "primitive_dispatch_stats" (( -- stats )) } - { "reset-dispatch-stats" "tools.dispatch.private" "primitive_reset_dispatch_stats" (( -- )) } - { "profiling" "tools.profiler.private" "primitive_profiling" (( ? -- )) } - { "optimized?" "words" "primitive_optimized_p" (( word -- ? )) } - { "word-code" "words" "primitive_word_code" (( word -- start end )) } - { "(word)" "words.private" "primitive_word" (( name vocab hashcode -- word )) } + { "" "alien" "primitive_callback" ( return-rewind word -- alien ) } + { "" "alien" "primitive_displaced_alien" ( displacement c-ptr -- alien ) } + { "alien-address" "alien" "primitive_alien_address" ( c-ptr -- addr ) } + { "alien-cell" "alien.accessors" "primitive_alien_cell" ( c-ptr n -- value ) } + { "alien-double" "alien.accessors" "primitive_alien_double" ( c-ptr n -- value ) } + { "alien-float" "alien.accessors" "primitive_alien_float" ( c-ptr n -- value ) } + { "alien-signed-1" "alien.accessors" "primitive_alien_signed_1" ( c-ptr n -- value ) } + { "alien-signed-2" "alien.accessors" "primitive_alien_signed_2" ( c-ptr n -- value ) } + { "alien-signed-4" "alien.accessors" "primitive_alien_signed_4" ( c-ptr n -- value ) } + { "alien-signed-8" "alien.accessors" "primitive_alien_signed_8" ( c-ptr n -- value ) } + { "alien-signed-cell" "alien.accessors" "primitive_alien_signed_cell" ( c-ptr n -- value ) } + { "alien-unsigned-1" "alien.accessors" "primitive_alien_unsigned_1" ( c-ptr n -- value ) } + { "alien-unsigned-2" "alien.accessors" "primitive_alien_unsigned_2" ( c-ptr n -- value ) } + { "alien-unsigned-4" "alien.accessors" "primitive_alien_unsigned_4" ( c-ptr n -- value ) } + { "alien-unsigned-8" "alien.accessors" "primitive_alien_unsigned_8" ( c-ptr n -- value ) } + { "alien-unsigned-cell" "alien.accessors" "primitive_alien_unsigned_cell" ( c-ptr n -- value ) } + { "set-alien-cell" "alien.accessors" "primitive_set_alien_cell" ( value c-ptr n -- ) } + { "set-alien-double" "alien.accessors" "primitive_set_alien_double" ( value c-ptr n -- ) } + { "set-alien-float" "alien.accessors" "primitive_set_alien_float" ( value c-ptr n -- ) } + { "set-alien-signed-1" "alien.accessors" "primitive_set_alien_signed_1" ( value c-ptr n -- ) } + { "set-alien-signed-2" "alien.accessors" "primitive_set_alien_signed_2" ( value c-ptr n -- ) } + { "set-alien-signed-4" "alien.accessors" "primitive_set_alien_signed_4" ( value c-ptr n -- ) } + { "set-alien-signed-8" "alien.accessors" "primitive_set_alien_signed_8" ( value c-ptr n -- ) } + { "set-alien-signed-cell" "alien.accessors" "primitive_set_alien_signed_cell" ( value c-ptr n -- ) } + { "set-alien-unsigned-1" "alien.accessors" "primitive_set_alien_unsigned_1" ( value c-ptr n -- ) } + { "set-alien-unsigned-2" "alien.accessors" "primitive_set_alien_unsigned_2" ( value c-ptr n -- ) } + { "set-alien-unsigned-4" "alien.accessors" "primitive_set_alien_unsigned_4" ( value c-ptr n -- ) } + { "set-alien-unsigned-8" "alien.accessors" "primitive_set_alien_unsigned_8" ( value c-ptr n -- ) } + { "set-alien-unsigned-cell" "alien.accessors" "primitive_set_alien_unsigned_cell" ( value c-ptr n -- ) } + { "(dlopen)" "alien.libraries" "primitive_dlopen" ( path -- dll ) } + { "(dlsym)" "alien.libraries" "primitive_dlsym" ( name dll -- alien ) } + { "(dlsym-raw)" "alien.libraries" "primitive_dlsym_raw" ( name dll -- alien ) } + { "dlclose" "alien.libraries" "primitive_dlclose" ( dll -- ) } + { "dll-valid?" "alien.libraries" "primitive_dll_validp" ( dll -- ? ) } + { "current-callback" "alien.private" "primitive_current_callback" ( -- n ) } + { "" "arrays" "primitive_array" ( n elt -- array ) } + { "resize-array" "arrays" "primitive_resize_array" ( n array -- new-array ) } + { "(byte-array)" "byte-arrays" "primitive_uninitialized_byte_array" ( n -- byte-array ) } + { "" "byte-arrays" "primitive_byte_array" ( n -- byte-array ) } + { "resize-byte-array" "byte-arrays" "primitive_resize_byte_array" ( n byte-array -- new-byte-array ) } + { "" "classes.tuple.private" "primitive_tuple_boa" ( slots... layout -- tuple ) } + { "" "classes.tuple.private" "primitive_tuple" ( layout -- tuple ) } + { "modify-code-heap" "compiler.units" "primitive_modify_code_heap" ( alist update-existing? reset-pics? -- ) } + { "lookup-method" "generic.single.private" "primitive_lookup_method" ( object methods -- method ) } + { "mega-cache-miss" "generic.single.private" "primitive_mega_cache_miss" ( methods index cache -- method ) } + { "(exists?)" "io.files.private" "primitive_existsp" ( path -- ? ) } + { "(fopen)" "io.streams.c" "primitive_fopen" ( path mode -- alien ) } + { "fclose" "io.streams.c" "primitive_fclose" ( alien -- ) } + { "fflush" "io.streams.c" "primitive_fflush" ( alien -- ) } + { "fgetc" "io.streams.c" "primitive_fgetc" ( alien -- byte/f ) } + { "fputc" "io.streams.c" "primitive_fputc" ( byte alien -- ) } + { "fread-unsafe" "io.streams.c" "primitive_fread" ( n buf alien -- count ) } + { "fseek" "io.streams.c" "primitive_fseek" ( alien offset whence -- ) } + { "ftell" "io.streams.c" "primitive_ftell" ( alien -- n ) } + { "fwrite" "io.streams.c" "primitive_fwrite" ( data length alien -- ) } + { "(clone)" "kernel" "primitive_clone" ( obj -- newobj ) } + { "" "kernel" "primitive_wrapper" ( obj -- wrapper ) } + { "callstack" "kernel" "primitive_callstack" ( -- callstack ) } + { "callstack>array" "kernel" "primitive_callstack_to_array" ( callstack -- array ) } + { "datastack" "kernel" "primitive_datastack" ( -- array ) } + { "die" "kernel" "primitive_die" ( -- ) } + { "retainstack" "kernel" "primitive_retainstack" ( -- array ) } + { "(identity-hashcode)" "kernel.private" "primitive_identity_hashcode" ( obj -- code ) } + { "become" "kernel.private" "primitive_become" ( old new -- ) } + { "callstack-bounds" "kernel.private" "primitive_callstack_bounds" ( -- start end ) } + { "check-datastack" "kernel.private" "primitive_check_datastack" ( array in# out# -- ? ) } + { "compute-identity-hashcode" "kernel.private" "primitive_compute_identity_hashcode" ( obj -- ) } + { "context-object" "kernel.private" "primitive_context_object" ( n -- obj ) } + { "innermost-frame-executing" "kernel.private" "primitive_innermost_stack_frame_executing" ( callstack -- obj ) } + { "innermost-frame-scan" "kernel.private" "primitive_innermost_stack_frame_scan" ( callstack -- n ) } + { "set-context-object" "kernel.private" "primitive_set_context_object" ( obj n -- ) } + { "set-datastack" "kernel.private" "primitive_set_datastack" ( array -- ) } + { "set-innermost-frame-quot" "kernel.private" "primitive_set_innermost_stack_frame_quot" ( n callstack -- ) } + { "set-retainstack" "kernel.private" "primitive_set_retainstack" ( array -- ) } + { "set-special-object" "kernel.private" "primitive_set_special_object" ( obj n -- ) } + { "special-object" "kernel.private" "primitive_special_object" ( n -- obj ) } + { "strip-stack-traces" "kernel.private" "primitive_strip_stack_traces" ( -- ) } + { "unimplemented" "kernel.private" "primitive_unimplemented" ( -- * ) } + { "load-locals" "locals.backend" "primitive_load_locals" ( ... n -- ) } + { "bits>double" "math" "primitive_bits_double" ( n -- x ) } + { "bits>float" "math" "primitive_bits_float" ( n -- x ) } + { "double>bits" "math" "primitive_double_bits" ( x -- n ) } + { "float>bits" "math" "primitive_float_bits" ( x -- n ) } + { "(format-float)" "math.parser.private" "primitive_format_float" ( n format -- byte-array ) } + { "bignum*" "math.private" "primitive_bignum_multiply" ( x y -- z ) } + { "bignum+" "math.private" "primitive_bignum_add" ( x y -- z ) } + { "bignum-" "math.private" "primitive_bignum_subtract" ( x y -- z ) } + { "bignum-bit?" "math.private" "primitive_bignum_bitp" ( n x -- ? ) } + { "bignum-bitand" "math.private" "primitive_bignum_and" ( x y -- z ) } + { "bignum-bitnot" "math.private" "primitive_bignum_not" ( x -- y ) } + { "bignum-bitor" "math.private" "primitive_bignum_or" ( x y -- z ) } + { "bignum-bitxor" "math.private" "primitive_bignum_xor" ( x y -- z ) } + { "bignum-log2" "math.private" "primitive_bignum_log2" ( x -- n ) } + { "bignum-mod" "math.private" "primitive_bignum_mod" ( x y -- z ) } + { "bignum-shift" "math.private" "primitive_bignum_shift" ( x y -- z ) } + { "bignum/i" "math.private" "primitive_bignum_divint" ( x y -- z ) } + { "bignum/mod" "math.private" "primitive_bignum_divmod" ( x y -- z w ) } + { "bignum<" "math.private" "primitive_bignum_less" ( x y -- ? ) } + { "bignum<=" "math.private" "primitive_bignum_lesseq" ( x y -- ? ) } + { "bignum=" "math.private" "primitive_bignum_eq" ( x y -- ? ) } + { "bignum>" "math.private" "primitive_bignum_greater" ( x y -- ? ) } + { "bignum>=" "math.private" "primitive_bignum_greatereq" ( x y -- ? ) } + { "bignum>fixnum" "math.private" "primitive_bignum_to_fixnum" ( x -- y ) } + { "fixnum-shift" "math.private" "primitive_fixnum_shift" ( x y -- z ) } + { "fixnum/i" "math.private" "primitive_fixnum_divint" ( x y -- z ) } + { "fixnum/mod" "math.private" "primitive_fixnum_divmod" ( x y -- z w ) } + { "fixnum>bignum" "math.private" "primitive_fixnum_to_bignum" ( x -- y ) } + { "fixnum>float" "math.private" "primitive_fixnum_to_float" ( x -- y ) } + { "float*" "math.private" "primitive_float_multiply" ( x y -- z ) } + { "float+" "math.private" "primitive_float_add" ( x y -- z ) } + { "float-" "math.private" "primitive_float_subtract" ( x y -- z ) } + { "float-u<" "math.private" "primitive_float_less" ( x y -- ? ) } + { "float-u<=" "math.private" "primitive_float_lesseq" ( x y -- ? ) } + { "float-u>" "math.private" "primitive_float_greater" ( x y -- ? ) } + { "float-u>=" "math.private" "primitive_float_greatereq" ( x y -- ? ) } + { "float/f" "math.private" "primitive_float_divfloat" ( x y -- z ) } + { "float<" "math.private" "primitive_float_less" ( x y -- ? ) } + { "float<=" "math.private" "primitive_float_lesseq" ( x y -- ? ) } + { "float=" "math.private" "primitive_float_eq" ( x y -- ? ) } + { "float>" "math.private" "primitive_float_greater" ( x y -- ? ) } + { "float>=" "math.private" "primitive_float_greatereq" ( x y -- ? ) } + { "float>bignum" "math.private" "primitive_float_to_bignum" ( x -- y ) } + { "float>fixnum" "math.private" "primitive_float_to_fixnum" ( x -- y ) } + { "all-instances" "memory" "primitive_all_instances" ( -- array ) } + { "(code-blocks)" "tools.memory.private" "primitive_code_blocks" ( -- array ) } + { "(code-room)" "tools.memory.private" "primitive_code_room" ( -- code-room ) } + { "compact-gc" "memory" "primitive_compact_gc" ( -- ) } + { "(data-room)" "tools.memory.private" "primitive_data_room" ( -- data-room ) } + { "disable-gc-events" "tools.memory.private" "primitive_disable_gc_events" ( -- events ) } + { "enable-gc-events" "tools.memory.private" "primitive_enable_gc_events" ( -- ) } + { "gc" "memory" "primitive_full_gc" ( -- ) } + { "minor-gc" "memory" "primitive_minor_gc" ( -- ) } + { "size" "memory" "primitive_size" ( obj -- n ) } + { "(save-image)" "memory.private" "primitive_save_image" ( path1 path2 -- ) } + { "(save-image-and-exit)" "memory.private" "primitive_save_image_and_exit" ( path1 path2 -- ) } + { "jit-compile" "quotations" "primitive_jit_compile" ( quot -- ) } + { "quot-compiled?" "quotations" "primitive_quot_compiled_p" ( quot -- ? ) } + { "quotation-code" "quotations" "primitive_quotation_code" ( quot -- start end ) } + { "array>quotation" "quotations.private" "primitive_array_to_quotation" ( array -- quot ) } + { "set-slot" "slots.private" "primitive_set_slot" ( value obj n -- ) } + { "" "strings" "primitive_string" ( n ch -- string ) } + { "resize-string" "strings" "primitive_resize_string" ( n str -- newstr ) } + { "set-string-nth-fast" "strings.private" "primitive_set_string_nth_fast" ( ch n string -- ) } + { "(exit)" "system" "primitive_exit" ( n -- * ) } + { "nano-count" "system" "primitive_nano_count" ( -- ns ) } + { "(sleep)" "threads.private" "primitive_sleep" ( nanos -- ) } + { "callstack-for" "threads.private" "primitive_callstack_for" ( context -- array ) } + { "context-object-for" "threads.private" "primitive_context_object_for" ( n context -- obj ) } + { "datastack-for" "threads.private" "primitive_datastack_for" ( context -- array ) } + { "retainstack-for" "threads.private" "primitive_retainstack_for" ( context -- array ) } + { "dispatch-stats" "tools.dispatch.private" "primitive_dispatch_stats" ( -- stats ) } + { "reset-dispatch-stats" "tools.dispatch.private" "primitive_reset_dispatch_stats" ( -- ) } + { "profiling" "tools.profiler.private" "primitive_profiling" ( ? -- ) } + { "optimized?" "words" "primitive_optimized_p" ( word -- ? ) } + { "word-code" "words" "primitive_word_code" ( word -- start end ) } + { "(word)" "words.private" "primitive_word" ( name vocab hashcode -- word ) } } [ first4 make-primitive ] each ! Bump build number -"build" "kernel" create build 1 + [ ] curry (( -- n )) define-declared +"build" "kernel" create build 1 + [ ] curry ( -- n ) define-declared ] with-compilation-unit diff --git a/core/classes/classes.factor b/core/classes/classes.factor index 623368d6fb..4bbf6bc9cb 100644 --- a/core/classes/classes.factor +++ b/core/classes/classes.factor @@ -78,7 +78,7 @@ M: predicate reset-word [ call-next-method ] [ f "predicating" set-word-prop ] bi ; : define-predicate ( class quot -- ) - [ predicate-word ] dip (( object -- ? )) define-declared ; + [ predicate-word ] dip ( object -- ? ) define-declared ; : superclass ( class -- super ) #! Output f for non-classes to work with algebra code diff --git a/core/classes/tuple/tuple-tests.factor b/core/classes/tuple/tuple-tests.factor index 48db064cf8..bbc5004f0a 100644 --- a/core/classes/tuple/tuple-tests.factor +++ b/core/classes/tuple/tuple-tests.factor @@ -714,7 +714,7 @@ DEFER: redefine-tuple-twice ERROR: base-error x y ; ERROR: derived-error < base-error z ; -[ (( x y z -- * )) ] [ \ derived-error stack-effect ] unit-test +[ ( x y z -- * ) ] [ \ derived-error stack-effect ] unit-test ! Make sure that tuple reshaping updates code heap roots TUPLE: code-heap-ref ; diff --git a/core/classes/tuple/tuple.factor b/core/classes/tuple/tuple.factor index 207759ee18..5eafdb0332 100644 --- a/core/classes/tuple/tuple.factor +++ b/core/classes/tuple/tuple.factor @@ -16,7 +16,7 @@ ERROR: not-a-tuple object ; : all-slots ( class -- slots ) superclasses [ "slots" word-prop ] map concat ; -PREDICATE: immutable-tuple-class < tuple-class ( class -- ? ) +PREDICATE: immutable-tuple-class < tuple-class all-slots [ read-only>> ] all? ; > +<< \ corner-case-1 2 [ + ] curry 1array [ case ] curry ( a -- b ) define-declared >> [ t ] [ \ corner-case-1 optimized? ] unit-test @@ -321,6 +321,6 @@ DEFER: corner-case-1 [ "nachos" ] [ 33 test-case-12 ] unit-test [ "nachos" ] [ 33 \ test-case-12 def>> call ] unit-test -[ (( x x -- x x )) ] [ +[ ( x x -- x x ) ] [ [ { [ ] [ ] } spread ] infer ] unit-test diff --git a/core/combinators/combinators.factor b/core/combinators/combinators.factor index 58c205d671..61d54a424d 100644 --- a/core/combinators/combinators.factor +++ b/core/combinators/combinators.factor @@ -17,7 +17,7 @@ IN: combinators M: object throw 5 special-object [ die ] or - (( error -- * )) call-effect-unsafe ; + ( error -- * ) call-effect-unsafe ; PRIVATE> diff --git a/core/compiler/units/units-tests.factor b/core/compiler/units/units-tests.factor index 86711f4ab0..72a504e91a 100644 --- a/core/compiler/units/units-tests.factor +++ b/core/compiler/units/units-tests.factor @@ -40,7 +40,7 @@ SYMBOL: counter M: observer definitions-changed 2drop global [ counter inc ] bind ; -[ gensym [ ] (( -- )) define-declared ] with-compilation-unit +[ gensym [ ] ( -- ) define-declared ] with-compilation-unit [ 1 ] [ counter get-global ] unit-test diff --git a/core/continuations/continuations.factor b/core/continuations/continuations.factor index bfcca41587..aeae5778e4 100644 --- a/core/continuations/continuations.factor +++ b/core/continuations/continuations.factor @@ -10,7 +10,7 @@ IN: continuations [ [ datastack ] dip swap [ { } like set-datastack ] dip ] dip swap [ call datastack ] dip swap [ set-datastack ] dip - ] (( stack quot -- new-stack )) call-effect-unsafe ; + ] ( stack quot -- new-stack ) call-effect-unsafe ; SYMBOL: original-error SYMBOL: error @@ -68,7 +68,7 @@ PRIVATE> set-retainstack [ set-datastack ] dip set-callstack - ] (( continuation -- * )) call-effect-unsafe ; + ] ( continuation -- * ) call-effect-unsafe ; PRIVATE> @@ -81,7 +81,7 @@ PRIVATE> set-retainstack [ set-datastack drop 4 special-object f 4 set-special-object f ] dip set-callstack - ] (( obj continuation -- * )) call-effect-unsafe ; + ] ( obj continuation -- * ) call-effect-unsafe ; : continue ( continuation -- * ) f swap continue-with ; diff --git a/core/effects/effects-docs.factor b/core/effects/effects-docs.factor index 7cd21a004e..da151991a5 100644 --- a/core/effects/effects-docs.factor +++ b/core/effects/effects-docs.factor @@ -50,13 +50,13 @@ HELP: { $notes "This word cannot construct effects with " { $link "effects-variables" } ". Use " { $link } " to construct variable stack effects." } { $examples { $example """USING: effects prettyprint ; -{ "a" "b" } { "c" } .""" """(( a b -- c ))""" } +{ "a" "b" } { "c" } .""" """( a b -- c )""" } { $example """USING: arrays effects prettyprint ; -{ "a" { "b" array } } { "c" } .""" """(( a b: array -- c ))""" } +{ "a" { "b" array } } { "c" } .""" """( a b: array -- c )""" } { $example """USING: effects prettyprint ; -{ "a" { "b" (( x y -- z )) } } { "c" } .""" """(( a b: ( x y -- z ) -- c ))""" } +{ "a" { "b" ( x y -- z ) } } { "c" } .""" """( a b: ( x y -- z ) -- c )""" } { $example """USING: effects prettyprint ; -{ "a" { "b" (( x y -- z )) } } { "*" } .""" """(( a b: ( x y -- z ) -- * ))""" } +{ "a" { "b" ( x y -- z ) } } { "*" } .""" """( a b: ( x y -- z ) -- * )""" } } ; HELP: @@ -70,9 +70,9 @@ HELP: { $notes "This word cannot construct effects with " { $link "effects-variables" } ". Use " { $link } " to construct variable stack effects." } { $examples { $example """USING: effects prettyprint ; -{ "a" { "b" (( x y -- z )) } } { "c" } f .""" """(( a b: ( x y -- z ) -- c ))""" } +{ "a" { "b" ( x y -- z ) } } { "c" } f .""" """( a b: ( x y -- z ) -- c )""" } { $example """USING: effects prettyprint ; -{ "a" { "b" (( x y -- z )) } } { } t .""" """(( a b: ( x y -- z ) -- * ))""" } +{ "a" { "b" ( x y -- z ) } } { } t .""" """( a b: ( x y -- z ) -- * )""" } } ; HELP: @@ -86,13 +86,13 @@ HELP: { $description "Constructs an " { $link effect } " object like " { $link } ". If " { $snippet "in-var" } " or " { $snippet "out-var" } " are not " { $link f } ", they are used as the names of the " { $link "effects-variables" } " for the inputs and outputs of the effect object." } { $examples { $example """USING: effects prettyprint ; -f { "a" "b" } f { "c" } .""" """(( a b -- c ))""" } +f { "a" "b" } f { "c" } .""" """( a b -- c )""" } { $example """USING: effects prettyprint ; -"x" { "a" "b" } "y" { "c" } .""" """(( ..x a b -- ..y c ))""" } +"x" { "a" "b" } "y" { "c" } .""" """( ..x a b -- ..y c )""" } { $example """USING: arrays effects prettyprint ; -"y" { "a" { "b" (( ..x -- ..y )) } } "x" { "c" } .""" """(( ..y a b: ( ..x -- ..y ) -- ..x c ))""" } +"y" { "a" { "b" ( ..x -- ..y ) } } "x" { "c" } .""" """( ..y a b: ( ..x -- ..y ) -- ..x c )""" } { $example """USING: effects prettyprint ; -"." { "a" "b" } f { "*" } .""" """(( ... a b -- * ))""" } +"." { "a" "b" } f { "*" } .""" """( ... a b -- * )""" } } ; @@ -131,7 +131,7 @@ HELP: effect= { $values { "effect1" effect } { "effect2" effect } { "?" "a boolean" } } { $description "Tests if " { $snippet "effect1" } " and " { $snippet "effect2" } " represent the same stack transformation, without looking parameter names." } { $examples - { $example "USING: effects prettyprint ;" "(( a -- b )) (( x -- y )) effect= ." "t" } + { $example "USING: effects prettyprint ;" "( a -- b ) ( x -- y ) effect= ." "t" } } ; HELP: effect>string diff --git a/core/effects/effects-tests.factor b/core/effects/effects-tests.factor index 0afc61047d..5f4a299ac8 100644 --- a/core/effects/effects-tests.factor +++ b/core/effects/effects-tests.factor @@ -7,45 +7,45 @@ IN: effects.tests [ t ] [ { "a" "b" } { "a" "b" } { "a" "b" } { "a" "b" } effect<= ] unit-test [ f ] [ { "a" "b" "c" } { "a" "b" "c" } { "a" "b" } { "a" "b" } effect<= ] unit-test [ f ] [ { "a" "b" } { "a" "b" "c" } { "a" "b" } { "a" "b" } effect<= ] unit-test -[ 2 ] [ (( a b -- c )) in>> length ] unit-test -[ 1 ] [ (( a b -- c )) out>> length ] unit-test +[ 2 ] [ ( a b -- c ) in>> length ] unit-test +[ 1 ] [ ( a b -- c ) out>> length ] unit-test -[ t ] [ (( a b -- c )) (( ... a b -- ... c )) effect<= ] unit-test -[ t ] [ (( b -- )) (( ... a b -- ... c )) effect<= ] unit-test -[ f ] [ (( ... a b -- ... c )) (( a b -- c )) effect<= ] unit-test -[ f ] [ (( ... b -- ... )) (( a b -- c )) effect<= ] unit-test -[ f ] [ (( a b -- c )) (( ... a b -- c )) effect<= ] unit-test -[ f ] [ (( a b -- c )) (( ..x a b -- ..y c )) effect<= ] unit-test +[ t ] [ ( a b -- c ) ( ... a b -- ... c ) effect<= ] unit-test +[ t ] [ ( b -- ) ( ... a b -- ... c ) effect<= ] unit-test +[ f ] [ ( ... a b -- ... c ) ( a b -- c ) effect<= ] unit-test +[ f ] [ ( ... b -- ... ) ( a b -- c ) effect<= ] unit-test +[ f ] [ ( a b -- c ) ( ... a b -- c ) effect<= ] unit-test +[ f ] [ ( a b -- c ) ( ..x a b -- ..y c ) effect<= ] unit-test -[ "(( object -- object ))" ] [ { f } { f } unparse ] unit-test -[ "(( a b -- c d ))" ] [ { "a" "b" } { "c" "d" } unparse ] unit-test -[ "(( -- c d ))" ] [ { } { "c" "d" } unparse ] unit-test -[ "(( a b -- ))" ] [ { "a" "b" } { } unparse ] unit-test -[ "(( -- ))" ] [ { } { } unparse ] unit-test -[ "(( a b -- c ))" ] [ (( a b -- c )) unparse ] unit-test +[ "( object -- object )" ] [ { f } { f } unparse ] unit-test +[ "( a b -- c d )" ] [ { "a" "b" } { "c" "d" } unparse ] unit-test +[ "( -- c d )" ] [ { } { "c" "d" } unparse ] unit-test +[ "( a b -- )" ] [ { "a" "b" } { } unparse ] unit-test +[ "( -- )" ] [ { } { } unparse ] unit-test +[ "( a b -- c )" ] [ ( a b -- c ) unparse ] unit-test -[ { "x" "y" } ] [ { "y" "x" } (( a b -- b a )) shuffle ] unit-test -[ { "y" "x" "y" } ] [ { "y" "x" } (( a b -- a b a )) shuffle ] unit-test -[ { } ] [ { "y" "x" } (( a b -- )) shuffle ] unit-test +[ { "x" "y" } ] [ { "y" "x" } ( a b -- b a ) shuffle ] unit-test +[ { "y" "x" "y" } ] [ { "y" "x" } ( a b -- a b a ) shuffle ] unit-test +[ { } ] [ { "y" "x" } ( a b -- ) shuffle ] unit-test -[ t ] [ (( -- )) (( -- )) compose-effects (( -- )) effect= ] unit-test -[ t ] [ (( -- * )) (( -- )) compose-effects (( -- * )) effect= ] unit-test -[ t ] [ (( -- )) (( -- * )) compose-effects (( -- * )) effect= ] unit-test +[ t ] [ ( -- ) ( -- ) compose-effects ( -- ) effect= ] unit-test +[ t ] [ ( -- * ) ( -- ) compose-effects ( -- * ) effect= ] unit-test +[ t ] [ ( -- ) ( -- * ) compose-effects ( -- * ) effect= ] unit-test -[ { object object } ] [ (( a b -- )) effect-in-types ] unit-test -[ { object sequence } ] [ (( a b: sequence -- )) effect-in-types ] unit-test +[ { object object } ] [ ( a b -- ) effect-in-types ] unit-test +[ { object sequence } ] [ ( a b: sequence -- ) effect-in-types ] unit-test -[ f ] [ (( a b c -- d )) in-var>> ] unit-test -[ f ] [ (( -- d )) in-var>> ] unit-test -[ "a" ] [ (( ..a b c -- d )) in-var>> ] unit-test -[ { "b" "c" } ] [ (( ..a b c -- d )) in>> ] unit-test +[ f ] [ ( a b c -- d ) in-var>> ] unit-test +[ f ] [ ( -- d ) in-var>> ] unit-test +[ "a" ] [ ( ..a b c -- d ) in-var>> ] unit-test +[ { "b" "c" } ] [ ( ..a b c -- d ) in>> ] unit-test -[ f ] [ (( ..a b c -- e )) out-var>> ] unit-test -[ "d" ] [ (( ..a b c -- ..d e )) out-var>> ] unit-test -[ { "e" } ] [ (( ..a b c -- ..d e )) out>> ] unit-test +[ f ] [ ( ..a b c -- e ) out-var>> ] unit-test +[ "d" ] [ ( ..a b c -- ..d e ) out-var>> ] unit-test +[ { "e" } ] [ ( ..a b c -- ..d e ) out>> ] unit-test -[ "(( a ..b c -- d ))" eval( -- effect ) ] +[ "( a ..b c -- d )" eval( -- effect ) ] [ error>> invalid-row-variable? ] must-fail-with -[ "(( ..a: integer b c -- d ))" eval( -- effect ) ] +[ "( ..a: integer b c -- d )" eval( -- effect ) ] [ error>> row-variable-can't-have-type? ] must-fail-with diff --git a/core/effects/effects.factor b/core/effects/effects.factor index 12573ad937..6626ee685d 100644 --- a/core/effects/effects.factor +++ b/core/effects/effects.factor @@ -92,7 +92,7 @@ M: word stack-effect [ "declared-effect" word-prop ] [ parent-word dup [ stack-effect ] when ] bi or ; -M: deferred stack-effect call-next-method (( -- * )) or ; +M: deferred stack-effect call-next-method ( -- * ) or ; M: effect clone [ in>> clone ] [ out>> clone ] bi ; diff --git a/core/effects/parser/parser-docs.factor b/core/effects/parser/parser-docs.factor index 6cb39d208d..e345b9d8f0 100644 --- a/core/effects/parser/parser-docs.factor +++ b/core/effects/parser/parser-docs.factor @@ -4,6 +4,6 @@ USING: strings effects help.markup help.syntax ; HELP: parse-effect { $values { "end" string } { "effect" "an instance of " { $link effect } } } { $description "Parses a stack effect from the current input line." } -{ $examples "This word is used by " { $link POSTPONE: ( } " and " { $link POSTPONE: (( } " to parse stack effect declarations." } +{ $examples "This word is used by " { $link POSTPONE: ( } " to parse stack effect declarations." } $parsing-note ; diff --git a/core/generic/math/math.factor b/core/generic/math/math.factor index 8cdb645880..490015d451 100644 --- a/core/generic/math/math.factor +++ b/core/generic/math/math.factor @@ -122,7 +122,7 @@ M: math-combination perform-combination define ] with-variable ; -PREDICATE: math-generic < generic ( word -- ? ) +PREDICATE: math-generic < generic "combination" word-prop math-combination? ; M: math-generic definer drop \ MATH: f ; diff --git a/core/generic/parser/parser-tests.factor b/core/generic/parser/parser-tests.factor index d14da1bde5..11702b4042 100644 --- a/core/generic/parser/parser-tests.factor +++ b/core/generic/parser/parser-tests.factor @@ -2,12 +2,12 @@ USING: generic.parser tools.test ; IN: generic.parser.tests -[ t ] [ (( -- )) (( -- )) method-effect= ] unit-test -[ t ] [ (( a -- b )) (( x -- y )) method-effect= ] unit-test -[ f ] [ (( a b -- c )) (( x -- y )) method-effect= ] unit-test -[ f ] [ (( a -- b )) (( x y -- z )) method-effect= ] unit-test +[ t ] [ ( -- ) ( -- ) method-effect= ] unit-test +[ t ] [ ( a -- b ) ( x -- y ) method-effect= ] unit-test +[ f ] [ ( a b -- c ) ( x -- y ) method-effect= ] unit-test +[ f ] [ ( a -- b ) ( x y -- z ) method-effect= ] unit-test -[ t ] [ (( -- * )) (( -- )) method-effect= ] unit-test -[ f ] [ (( -- * )) (( x -- y )) method-effect= ] unit-test -[ t ] [ (( x -- * )) (( x -- y )) method-effect= ] unit-test -[ t ] [ (( x -- * )) (( x -- y z )) method-effect= ] unit-test +[ t ] [ ( -- * ) ( -- ) method-effect= ] unit-test +[ f ] [ ( -- * ) ( x -- y ) method-effect= ] unit-test +[ t ] [ ( x -- * ) ( x -- y ) method-effect= ] unit-test +[ t ] [ ( x -- * ) ( x -- y z ) method-effect= ] unit-test diff --git a/core/parser/parser-tests.factor b/core/parser/parser-tests.factor index e96d7600d5..b0943995c2 100644 --- a/core/parser/parser-tests.factor +++ b/core/parser/parser-tests.factor @@ -337,7 +337,7 @@ DEFER: foo ] must-fail [ ] [ - "IN: parser.tests USE: kernel PREDICATE: foo < object ( x -- y ) ;" eval( -- ) + "IN: parser.tests USE: kernel PREDICATE: foo < object ;" eval( -- ) ] unit-test [ t ] [ @@ -543,7 +543,7 @@ EXCLUDE: qualified.tests.bar => x ; [ t ] [ "was-once-a-word-bug" "parser.tests" lookup >boolean ] unit-test [ [ ] ] [ - "IN: parser.tests USE: words << \"was-once-a-word-bug\" \"parser.tests\" create [ ] (( -- )) define-declared >>" + "IN: parser.tests USE: words << \"was-once-a-word-bug\" \"parser.tests\" create [ ] ( -- ) define-declared >>" "was-once-a-word-test" parse-stream ] unit-test diff --git a/core/parser/parser.factor b/core/parser/parser.factor index 3191f64007..b31a6ef4bc 100644 --- a/core/parser/parser.factor +++ b/core/parser/parser.factor @@ -15,7 +15,7 @@ IN: parser : save-location ( definition -- ) location remember-definition ; -M: parsing-word stack-effect drop (( parsed -- parsed )) ; +M: parsing-word stack-effect drop ( parsed -- parsed ) ; : create-in ( str -- word ) current-vocab create dup set-word dup save-location ; diff --git a/core/slots/slots.factor b/core/slots/slots.factor index 35a459b888..128ab4003d 100644 --- a/core/slots/slots.factor +++ b/core/slots/slots.factor @@ -45,7 +45,7 @@ M: object reader-quot "reading" associate ; : define-reader-generic ( name -- ) - reader-word (( object -- value )) define-simple-generic ; + reader-word ( object -- value ) define-simple-generic ; : define-reader ( class slot-spec -- ) [ nip name>> define-reader-generic ] @@ -92,7 +92,7 @@ M: object writer-quot "writing" associate ; : define-writer-generic ( name -- ) - writer-word (( value object -- )) define-simple-generic ; + writer-word ( value object -- ) define-simple-generic ; : define-writer ( class slot-spec -- ) [ nip name>> define-writer-generic ] [ @@ -110,7 +110,7 @@ M: object writer-quot : define-setter ( name -- ) dup setter-word dup deferred? [ [ \ over , swap writer-word , ] [ ] make - (( object value -- object )) define-inline + ( object value -- object ) define-inline ] [ 2drop ] if ; : changer-word ( name -- word ) @@ -123,7 +123,7 @@ M: object writer-quot over reader-word 1quotation [ dip call ] curry [ ] like [ dip swap ] curry % swap setter-word , - ] [ ] make (( object quot -- object )) define-inline + ] [ ] make ( object quot -- object ) define-inline ] [ 2drop ] if ; : define-slot-methods ( class slot-spec -- ) diff --git a/core/source-files/errors/errors-tests.factor b/core/source-files/errors/errors-tests.factor index f13790f5bb..30a6ddeb54 100644 --- a/core/source-files/errors/errors-tests.factor +++ b/core/source-files/errors/errors-tests.factor @@ -4,7 +4,7 @@ IN: source-files.errors.tests DEFER: forget-test -[ ] [ [ \ forget-test [ 1 ] (( -- )) define-declared ] with-compilation-unit ] unit-test +[ ] [ [ \ forget-test [ 1 ] ( -- ) define-declared ] with-compilation-unit ] unit-test [ t ] [ \ forget-test compiler-errors get key? ] unit-test [ ] [ [ \ forget-test forget ] with-compilation-unit ] unit-test -[ f ] [ \ forget-test compiler-errors get key? ] unit-test \ No newline at end of file +[ f ] [ \ forget-test compiler-errors get key? ] unit-test diff --git a/core/syntax/syntax-docs.factor b/core/syntax/syntax-docs.factor index 0472d6394d..72245d2796 100644 --- a/core/syntax/syntax-docs.factor +++ b/core/syntax/syntax-docs.factor @@ -214,7 +214,7 @@ ARTICLE: "syntax-pathnames" "Pathname syntax" ARTICLE: "syntax-effects" "Stack effect syntax" "Note that this is " { $emphasis "not" } " syntax to declare stack effects of words. This pushes an " { $link effect } " instance on the stack for reflection, for use with words such as " { $link define-declared } ", " { $link call-effect } " and " { $link execute-effect } "." -{ $subsections POSTPONE: (( } +{ $subsections POSTPONE: ( } { $see-also "effects" "inference" "tools.inference" } ; ARTICLE: "syntax-literals" "Literals" @@ -625,13 +625,7 @@ HELP: P" HELP: ( { $syntax "( inputs -- outputs )" } { $values { "inputs" "a list of tokens" } { "outputs" "a list of tokens" } } -{ $description "A stack effect declaration. This is treated as a comment unless it appears inside a word definition." } -{ $see-also "effects" } ; - -HELP: (( -{ $syntax "(( inputs -- outputs ))" } -{ $values { "inputs" "a list of tokens" } { "outputs" "a list of tokens" } } -{ $description "Literal stack effect syntax." } +{ $description "Literal stack effect syntax. Also used by syntax words (such as " { $link POSTPONE: : } "), typically declaring the stack effect of the word definition which follows." } { $notes "Useful for meta-programming with " { $link define-declared } "." } { $examples { $example @@ -642,13 +636,15 @@ HELP: (( "" "[" " my-dynamic-word 2 { [ + ] [ * ] } random curry" - " (( x -- y )) define-declared" + " ( x -- y ) define-declared" "] with-compilation-unit" "" "2 my-dynamic-word ." "4" } -} ; +} +{ $see-also "effects" } +; HELP: ! { $syntax "! comment..." } diff --git a/core/syntax/syntax.factor b/core/syntax/syntax.factor index c99802d44b..32a187c12c 100644 --- a/core/syntax/syntax.factor +++ b/core/syntax/syntax.factor @@ -226,11 +226,7 @@ IN: bootstrap.syntax ] define-core-syntax "(" [ - ")" parse-effect drop - ] define-core-syntax - - "((" [ - "))" parse-effect suffix! + ")" parse-effect suffix! ] define-core-syntax "MAIN:" [ diff --git a/core/words/alias/alias-tests.factor b/core/words/alias/alias-tests.factor index c4bc8519a9..4dc53f769e 100644 --- a/core/words/alias/alias-tests.factor +++ b/core/words/alias/alias-tests.factor @@ -3,4 +3,4 @@ IN: words.alias.tests ALIAS: foo + [ ] [ "IN: words.alias.tests CONSTANT: foo 5" eval( -- ) ] unit-test -[ (( -- value )) ] [ \ foo stack-effect ] unit-test +[ ( -- value ) ] [ \ foo stack-effect ] unit-test diff --git a/core/words/constant/constant.factor b/core/words/constant/constant.factor index b518760bf9..30503bc92f 100644 --- a/core/words/constant/constant.factor +++ b/core/words/constant/constant.factor @@ -7,11 +7,11 @@ PREDICATE: constant < word "constant" word-prop >boolean ; : define-constant ( word value -- ) [ "constant" set-word-prop ] - [ [ ] curry (( -- value )) define-inline ] 2bi ; + [ [ ] curry ( -- value ) define-inline ] 2bi ; M: constant reset-word [ call-next-method ] [ f "constant" set-word-prop ] bi ; M: constant definer drop \ CONSTANT: f ; -M: constant definition "constant" word-prop literalize 1quotation ; \ No newline at end of file +M: constant definition "constant" word-prop literalize 1quotation ; diff --git a/core/words/symbol/symbol.factor b/core/words/symbol/symbol.factor index 34ec6b9174..fdb7e862ca 100644 --- a/core/words/symbol/symbol.factor +++ b/core/words/symbol/symbol.factor @@ -3,7 +3,7 @@ USING: kernel sequences accessors definitions words ; IN: words.symbol -PREDICATE: symbol < word ( obj -- ? ) +PREDICATE: symbol < word [ def>> ] [ [ ] curry ] bi sequence= ; M: symbol definer drop \ SYMBOL: f ; @@ -11,4 +11,4 @@ M: symbol definer drop \ SYMBOL: f ; M: symbol definition drop f ; : define-symbol ( word -- ) - dup [ ] curry (( -- value )) define-inline ; + dup [ ] curry ( -- value ) define-inline ; diff --git a/core/words/words-docs.factor b/core/words/words-docs.factor index 442bf29ead..d4a60a5350 100644 --- a/core/words/words-docs.factor +++ b/core/words/words-docs.factor @@ -330,7 +330,7 @@ HELP: define-temp { $notes "The following phrases are equivalent:" { $code "[ 2 2 + . ] call" } - { $code "[ 2 2 + . ] (( -- )) define-temp execute" } + { $code "[ 2 2 + . ] ( -- ) define-temp execute" } "This word must be called from inside " { $link with-compilation-unit } "." } ; diff --git a/core/words/words-tests.factor b/core/words/words-tests.factor index 2734defaac..2a9ccf1d99 100644 --- a/core/words/words-tests.factor +++ b/core/words/words-tests.factor @@ -6,7 +6,7 @@ IN: words.tests [ 4 ] [ [ - "poo" "words.tests" create [ 2 2 + ] (( -- n )) define-declared + "poo" "words.tests" create [ 2 2 + ] ( -- n ) define-declared ] with-compilation-unit "poo" "words.tests" lookup execute ] unit-test diff --git a/core/words/words.factor b/core/words/words.factor index 56503d3692..cef5c1afc3 100644 --- a/core/words/words.factor +++ b/core/words/words.factor @@ -51,11 +51,11 @@ TUPLE: undefined word ; #! above. [ undefined f ] ; -PREDICATE: deferred < word ( obj -- ? ) def>> undefined-def = ; +PREDICATE: deferred < word def>> undefined-def = ; M: deferred definer drop \ DEFER: f ; M: deferred definition drop f ; -PREDICATE: primitive < word ( obj -- ? ) "primitive" word-prop ; +PREDICATE: primitive < word "primitive" word-prop ; M: primitive definer drop \ PRIMITIVE: f ; M: primitive definition drop f ; diff --git a/extra/calendar/holidays/holidays.factor b/extra/calendar/holidays/holidays.factor index cfae6028bb..d8f5e0e9cc 100644 --- a/extra/calendar/holidays/holidays.factor +++ b/extra/calendar/holidays/holidays.factor @@ -12,7 +12,7 @@ SYNTAX: HOLIDAY: dup "holiday" word-prop [ dup H{ } clone "holiday" set-word-prop ] unless - parse-definition (( timestamp/n -- timestamp )) define-declared ; + parse-definition ( timestamp/n -- timestamp ) define-declared ; SYNTAX: HOLIDAY-NAME: [let scan-word "holiday" word-prop :> holidays scan-word :> name scan-object :> value diff --git a/extra/cpu/8080/emulator/emulator.factor b/extra/cpu/8080/emulator/emulator.factor index eff9b6db2a..6207b51d8c 100644 --- a/extra/cpu/8080/emulator/emulator.factor +++ b/extra/cpu/8080/emulator/emulator.factor @@ -1391,7 +1391,7 @@ SYMBOL: last-opcode dup " " join instruction-quotations [ "_" join [ "emulate-" % % ] "" make create-in dup last-instruction set-global - ] dip (( cpu -- )) define-declared ; + ] dip ( cpu -- ) define-declared ; SYNTAX: INSTRUCTION: ";" parse-tokens parse-instructions ; diff --git a/extra/cuda/libraries/libraries.factor b/extra/cuda/libraries/libraries.factor index faf50bb39b..b57939fb26 100644 --- a/extra/cuda/libraries/libraries.factor +++ b/extra/cuda/libraries/libraries.factor @@ -183,7 +183,7 @@ MACRO: cuda-invoke ( module-name function-name arguments -- ) 3bi define-inline ; : define-cuda-global ( word module-name symbol-name -- ) - '[ _ _ cuda-global ] (( -- device-ptr )) define-inline ; + '[ _ _ cuda-global ] ( -- device-ptr ) define-inline ; TUPLE: cuda-library name abi path handle ; ERROR: bad-cuda-abi abi ; diff --git a/extra/graphviz/notation/notation.factor b/extra/graphviz/notation/notation.factor index b801cf8b82..1d7d95b636 100644 --- a/extra/graphviz/notation/notation.factor +++ b/extra/graphviz/notation/notation.factor @@ -24,7 +24,7 @@ IN: graphviz.notation [ 2nip ] [ create dup 1 - (( graphviz-obj val -- graphviz-obj' )) + ( graphviz-obj val -- graphviz-obj' ) define-generic ] if* ; diff --git a/extra/graphviz/render/render.factor b/extra/graphviz/render/render.factor index f16278f9a2..794e423509 100644 --- a/extra/graphviz/render/render.factor +++ b/extra/graphviz/render/render.factor @@ -112,7 +112,7 @@ PRIVATE> : define-graphviz-by-engine ( -K -- ) [ "graphviz.render" create dup make-inline ] [ [ graphviz ] curry ] bi - (( graph -O -T -- )) + ( graph -O -T -- ) define-declared ; : define-graphviz-by-format ( -T -- ) @@ -121,7 +121,7 @@ PRIVATE> "graphviz.render" create dup make-inline ] [ [ graphviz* ] curry ] bi - (( graph -O -- )) + ( graph -O -- ) define-declared ; PRIVATE> diff --git a/extra/html/elements/elements.factor b/extra/html/elements/elements.factor index 119662348f..ca5517f408 100644 --- a/extra/html/elements/elements.factor +++ b/extra/html/elements/elements.factor @@ -29,7 +29,7 @@ SYMBOL: html #! Return the name and code for the patterned #! word. dup swap '[ _ write-html ] - (( -- )) html-word ; + ( -- ) html-word ; : ( str -- foo> ) ">" append ; : def-for-html-word-foo> ( name -- ) #! Return the name and code for the foo> patterned #! word. - foo> [ ">" write-html ] (( -- )) html-word ; + foo> [ ">" write-html ] ( -- ) html-word ; : ( str -- ) "" surround ; : def-for-html-word- ( name -- ) #! Return the name and code for the patterned #! word. - dup '[ _ write-html ] (( -- )) html-word ; + dup '[ _ write-html ] ( -- ) html-word ; : ( str -- ) "<" "/>" surround ; @@ -59,14 +59,14 @@ SYMBOL: html #! Return the name and code for the patterned #! word. dup swap '[ _ write-html ] - (( -- )) html-word ; + ( -- ) html-word ; : foo/> ( str -- str/> ) "/>" append ; : def-for-html-word-foo/> ( name -- ) #! Return the name and code for the foo/> patterned #! word. - foo/> [ "/>" write-html ] (( -- )) html-word ; + foo/> [ "/>" write-html ] ( -- ) html-word ; : define-closed-html-word ( name -- ) #! Given an HTML tag name, define the words for @@ -92,7 +92,7 @@ SYMBOL: html : define-attribute-word ( name -- ) dup "=" prepend swap - '[ _ write-attr ] (( string -- )) html-word ; + '[ _ write-attr ] ( string -- ) html-word ; ! Define some closed HTML tags [ diff --git a/extra/mongodb/tuple/persistent/persistent.factor b/extra/mongodb/tuple/persistent/persistent.factor index d24e88f90e..3b741bd963 100644 --- a/extra/mongodb/tuple/persistent/persistent.factor +++ b/extra/mongodb/tuple/persistent/persistent.factor @@ -62,7 +62,7 @@ CONSTRUCTOR: cond-value ( value quot -- cond-value ) ; { [ dup value>> mdb-persistent? ] [ [ value>> ] [ quot>> ] bi write-mdb-persistent ] } { [ dup value>> data-tuple? ] - [ [ value>> ] [ quot>> ] bi (( tuple -- assoc )) call-effect ] } + [ [ value>> ] [ quot>> ] bi ( tuple -- assoc ) call-effect ] } { [ dup value>> [ hashtable? ] [ linked-assoc? ] bi or ] [ [ value>> ] [ quot>> ] bi '[ _ write-field ] assoc-map ] } [ value>> ] diff --git a/extra/multi-methods/tests/definitions.factor b/extra/multi-methods/tests/definitions.factor index b0ab2c1bc3..4b34513017 100644 --- a/extra/multi-methods/tests/definitions.factor +++ b/extra/multi-methods/tests/definitions.factor @@ -4,7 +4,7 @@ IN: multi-methods.tests DEFER: fake \ fake H{ } clone "multi-methods" set-word-prop -<< (( -- )) \ fake set-stack-effect >> +<< ( -- ) \ fake set-stack-effect >> [ [ "fake-{ }" ] [ { } \ fake method-word-name ] unit-test @@ -24,7 +24,7 @@ DEFER: fake DEFER: testing - [ ] [ \ testing (( -- )) define-generic ] unit-test + [ ] [ \ testing ( -- ) define-generic ] unit-test [ t ] [ \ testing generic? ] unit-test ] with-compilation-unit diff --git a/extra/project-euler/common/common.factor b/extra/project-euler/common/common.factor index 5b83a7d640..0e06e9eb93 100644 --- a/extra/project-euler/common/common.factor +++ b/extra/project-euler/common/common.factor @@ -159,5 +159,5 @@ SYNTAX: SOLUTION: scan-word [ name>> "-main" append create-in ] keep [ drop current-vocab main<< ] - [ [ . ] swap prefix (( -- )) define-declared ] + [ [ . ] swap prefix ( -- ) define-declared ] 2bi ; diff --git a/extra/readline/readline.factor b/extra/readline/readline.factor index 53f31b0b3d..76aea30d7e 100644 --- a/extra/readline/readline.factor +++ b/extra/readline/readline.factor @@ -26,6 +26,6 @@ IN: readline '[ [ @ [ utf8 malloc-string ] [ f ] if* ] readline.ffi:rl_compentry_func_t - ] (( -- alien )) define-temp + ] ( -- alien ) define-temp ] with-compilation-unit execute( -- alien ) readline.ffi:set-rl_completion_entry_function ; diff --git a/extra/variables/variables.factor b/extra/variables/variables.factor index 1ce77f66a6..a6dc84fbeb 100644 --- a/extra/variables/variables.factor +++ b/extra/variables/variables.factor @@ -23,12 +23,12 @@ SYNTAX: set: '[ _ set ] ; : (define-variable) ( word getter setter -- ) - [ (( -- value )) define-inline ] + [ ( -- value ) define-inline ] [ [ [ name>> "set: " prepend ] [ over "variable-setter" set-word-prop ] bi - ] dip (( value -- )) define-inline + ] dip ( value -- ) define-inline ] bi-curry* bi ; : define-variable ( word -- ) diff --git a/unmaintained/ui/gadgets/layout/layout.factor b/unmaintained/ui/gadgets/layout/layout.factor index fb498103b5..bb35dccdd9 100644 --- a/unmaintained/ui/gadgets/layout/layout.factor +++ b/unmaintained/ui/gadgets/layout/layout.factor @@ -55,7 +55,7 @@ M: model -> dup , ; ERROR: not-in-template word ; SYNTAX: $ scan-new-word dup - [ [ dup templates get at [ nip , ] [ not-in-template ] if* ] curry (( -- )) define-declared "$" expect ] + [ [ dup templates get at [ nip , ] [ not-in-template ] if* ] curry ( -- ) define-declared "$" expect ] [ [ [ swap templates get set-at ] keep , ] curry ] bi append! ; : insert-gadget ( number parent gadget -- ) -rot [ but-last insert-nth ] change-children drop ;