diff --git a/library/compiler/test/callbacks.factor b/library/compiler/test/callbacks.factor index 5b8e7d1ffe..280f204108 100644 --- a/library/compiler/test/callbacks.factor +++ b/library/compiler/test/callbacks.factor @@ -1,10 +1,10 @@ IN: temporary USING: alien compiler errors inference io kernel -kernel-internals math memory namespaces test threads ; +kernel-internals math memory namespaces test threads words ; : callback-1 "void" { } [ ] alien-callback ; -[ { 0 1 } ] [ [ callback-1 ] infer ] unit-test +[ 0 1 ] [ [ callback-1 ] infer nip dup effect-in swap effect-out ] unit-test [ t ] [ callback-1 alien? ] unit-test diff --git a/library/test/redefine.factor b/library/test/redefine.factor index 039ee30723..225dd816ab 100644 --- a/library/test/redefine.factor +++ b/library/test/redefine.factor @@ -1,24 +1,27 @@ USING: compiler definitions generic hashtables inference math -namespaces parser test words ; +namespaces parser test words kernel sequences arrays ; IN: temporary DEFER: foo \ foo reset-generic DEFER: bar \ bar reset-generic +: short-effect + dup effect-in length swap effect-out length 2array nip ; + [ ] [ \ foo [ 1 2 ] define-compound ] unit-test -[ { 0 2 } ] [ [ foo ] infer ] unit-test +[ { 0 2 } ] [ [ foo ] infer short-effect ] unit-test [ ] [ \ foo compile ] unit-test [ ] [ \ bar [ foo foo ] define-compound ] unit-test [ ] [ \ bar compile ] unit-test [ ] [ \ foo [ 1 2 3 ] define-compound ] unit-test [ t ] [ \ bar changed-words get hash-member? ] unit-test [ ] [ recompile ] unit-test -[ { 0 3 } ] [ [ foo ] infer ] unit-test +[ { 0 3 } ] [ [ foo ] infer short-effect ] unit-test [ f ] [ \ bar changed-words get hash-member? ] unit-test [ ] [ \ bar [ 1 2 ] define-compound ] unit-test [ t ] [ \ bar changed-words get hash-member? ] unit-test [ ] [ recompile ] unit-test -[ { 0 2 } ] [ [ bar ] infer ] unit-test +[ { 0 2 } ] [ [ bar ] infer short-effect ] unit-test [ f ] [ \ bar changed-words get hash-member? ] unit-test [ ] [ \ foo [ 1 2 3 ] define-compound ] unit-test [ f ] [ \ bar changed-words get hash-member? ] unit-test diff --git a/library/ui/tools/operations.factor b/library/ui/tools/operations.factor index 3f16a1047c..cef6c05310 100644 --- a/library/ui/tools/operations.factor +++ b/library/ui/tools/operations.factor @@ -112,6 +112,13 @@ M: operation invoke-command ( target operation -- ) { +quot+ [ forget ] } } define-operation +[ word? ] H{ + { +name+ "Word stack effect" } + { +keyboard+ T{ key-down f { A+ } "i" } } + { +quot+ [ word-def infer. ] } + { +listener+ t } +} define-operation + [ word? ] H{ { +name+ "Word dataflow" } { +keyboard+ T{ key-down f { A+ } "d" } } @@ -193,9 +200,9 @@ M: operation invoke-command ( target operation -- ) ! Quotations [ quotation? ] H{ - { +name+ "Infer" } + { +name+ "Quotation stack effect" } { +keyboard+ T{ key-down f { C+ A+ } "i" } } - { +quot+ [ infer . ] } + { +quot+ [ infer. ] } { +listener+ t } } define-operation