Skip to content

Commit 2f84969

Browse files
committed
Renamed definition-input/output to introduce and return
1 parent 7921290 commit 2f84969

7 files changed

Lines changed: 19 additions & 19 deletions

File tree

extra/skov/code/code.factor

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ TUPLE: word-definition < definition defined? result ;
1414
TUPLE: tuple-definition < definition defined? ;
1515

1616
TUPLE: node < element ;
17-
TUPLE: definition-input < node ;
18-
TUPLE: definition-output < node ;
17+
TUPLE: introduce < node ;
18+
TUPLE: return < node ;
1919
TUPLE: word < node path ;
2020
TUPLE: text < node ;
2121
TUPLE: slot < node initial-value ;
@@ -32,7 +32,7 @@ TUPLE: special-input < input ;
3232
TUPLE: special-output < output ;
3333

3434
UNION: special-connector special-input special-output ;
35-
UNION: definition-connector definition-input definition-output ;
35+
UNION: definition-connector introduce return ;
3636

3737
TUPLE: result < element ;
3838

@@ -49,8 +49,8 @@ M: element connectors>> ( elt -- seq ) contents>> [ definition-connector? ] filt
4949
M: node connectors>> ( elt -- seq ) contents>> [ connector? ] filter ;
5050
M: element inputs>> ( elt -- seq ) contents>> [ input? ] filter ;
5151
M: element outputs>> ( elt -- seq ) contents>> [ output? ] filter ;
52-
M: word-definition inputs>> ( elt -- seq ) contents>> [ definition-input? ] filter ;
53-
M: word-definition outputs>> ( elt -- seq ) contents>> [ definition-output? ] filter ;
52+
M: word-definition inputs>> ( elt -- seq ) contents>> [ introduce? ] filter ;
53+
M: word-definition outputs>> ( elt -- seq ) contents>> [ return? ] filter ;
5454
M: node slots>> ( elt -- seq ) contents>> [ slot? ] filter ;
5555

5656
:: add-element ( parent child -- parent )
@@ -139,8 +139,8 @@ M: definition path>>
139139

140140
GENERIC: (add-connectors) ( node -- node )
141141
M: element (add-connectors) ;
142-
M: definition-input (add-connectors) f >>contents dup name>> output add-with-name ;
143-
M: definition-output (add-connectors) f >>contents dup name>> input add-with-name ;
142+
M: introduce (add-connectors) f >>contents dup name>> output add-with-name ;
143+
M: return (add-connectors) f >>contents dup name>> input add-with-name ;
144144
M: text (add-connectors) f >>contents dup name>> output add-with-name add-special-connectors ;
145145

146146
M: word (add-connectors)

extra/skov/execution/execution.factor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ M: node write
5050
[ outputs>> [ special-output? ] reject [ write-id ":>" swap 2array ] map reverse ]
5151
tri 3array ;
5252

53-
M: definition-output write
53+
M: return write
5454
inputs>> [ link>> write-id ] map ;
5555

5656
M: text write

extra/skov/gadgets/environment-gadget/environment-gadget.factor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ IN: skov.gadgets.environment-gadget
3535
: make-keyboard-safe ( env quot -- )
3636
[ world-focus editor? not ] swap smart-when* ; inline
3737

38-
: add-input ( env -- ) [ definition-input add-to-word ] make-keyboard-safe ;
39-
: add-output ( env -- ) [ definition-output add-to-word ] make-keyboard-safe ;
38+
: add-input ( env -- ) [ introduce add-to-word ] make-keyboard-safe ;
39+
: add-output ( env -- ) [ return add-to-word ] make-keyboard-safe ;
4040
: add-text ( env -- ) [ text add-to-word ] make-keyboard-safe ;
4141
: add-slot ( env -- ) [ slot add-to-tuple ] make-keyboard-safe ;
4242
: add-constructor ( env -- ) [ constructor add-to-word ] make-keyboard-safe ;

extra/skov/gadgets/gadgets.factor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ TUPLE: proto-connection < gadget loc1 loc2 ;
2020
: connections>> ( def -- seq ) children>> [ connection-gadget? ] filter ;
2121
M: node-gadget connectors>> ( node-gadget -- seq ) children>> [ connector-gadget? ] filter ;
2222
M: node-gadget inputs>> ( node-gadget -- seq )
23-
connectors>> [ control-value [ input? ] [ definition-input? ] bi or ] filter ;
23+
connectors>> [ control-value [ input? ] [ introduce? ] bi or ] filter ;
2424
M: node-gadget outputs>> ( node-gadget -- seq )
25-
connectors>> [ control-value [ output? ] [ definition-output? ] bi or ] filter ;
25+
connectors>> [ control-value [ output? ] [ return? ] bi or ] filter ;
2626

2727
: find-env ( gadget -- env ) [ environment-gadget? ] find-parent ;
2828
: find-vocab ( gadget -- vocab ) [ vocab-gadget? ] find-parent ;

extra/skov/gadgets/help-graph/help-graph.factor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ IN: skov.gadgets.help-graph
1717
dup contents>> first add-connectors contents>>
1818
[ special-connector? ] reject [
1919
:> inside
20-
inside input? [ definition-input ] [ definition-output ] if new
20+
inside input? [ introduce ] [ return ] if new
2121
inside name>> >>name add-connectors :> outside
2222
inside outside contents>> first order-connectors connect
2323
outside add-element

extra/skov/gadgets/plus-button-pile/plus-button-pile.factor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ IN: skov.gadgets.plus-button-pile
2222
] smart-when* ;
2323

2424
: plus-buttons-for-word ( -- seq )
25-
[ "dark" [ find-env definition-input add-to-word ] <plus-button> "Add input ( i )" >>tooltip
26-
"dark" [ find-env definition-output add-to-word ] <plus-button> "Add output ( o )" >>tooltip
25+
[ "dark" [ find-env introduce add-to-word ] <plus-button> "Add input ( i )" >>tooltip
26+
"dark" [ find-env return add-to-word ] <plus-button> "Add output ( o )" >>tooltip
2727
<space>
2828
"green" [ find-env word add-to-word ] <plus-button> "Add word ( w )" >>tooltip
2929
<space>

extra/skov/import-export/import-export.factor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ M: input (export)
3737
M: output (export)
3838
[ name>> ] [ id>> ] bi 2array ;
3939

40-
M: definition-input (export)
40+
M: introduce (export)
4141
[ name>> ] [ contents>> [ export ] map >array ] bi 2array ;
4242

43-
M: definition-output (export)
43+
M: return (export)
4444
[ name>> ] [ contents>> [ export ] map >array ] bi 2array ;
4545

4646
M: text (export)
@@ -80,13 +80,13 @@ M: definition (import)
8080
M: word (import)
8181
swap first3 [ >>name ] [ >>path ] [ [ import add-element ] each ] tri* ;
8282

83-
M: definition-input (import)
83+
M: introduce (import)
8484
swap first2 [ >>name ] [ [ import add-element ] each ] bi* ;
8585

8686
M: input (import)
8787
swap first2 [ >>name ] [ >>link ] bi* ;
8888

89-
M: definition-output (import)
89+
M: return (import)
9090
swap first2 [ >>name ] [ [ import add-element ] each ] bi* ;
9191

9292
M: output (import)

0 commit comments

Comments
 (0)