removed shadowed imports from old modules

db4
Sam Anklesaria 2009-05-25 15:28:05 -05:00
parent 624de10b1e
commit 10c391f3ab
8 changed files with 33 additions and 77 deletions

View File

@ -1,14 +1,14 @@
USING: tools.deploy.config ; USING: tools.deploy.config ;
H{ H{
{ deploy-unicode? f }
{ deploy-threads? t }
{ deploy-math? t }
{ deploy-name "drills" } { deploy-name "drills" }
{ deploy-ui? t } { deploy-c-types? t }
{ "stop-after-last-window?" t } { "stop-after-last-window?" t }
{ deploy-word-props? f } { deploy-unicode? t }
{ deploy-c-types? f } { deploy-threads? t }
{ deploy-io 2 } { deploy-reflection 6 }
{ deploy-word-defs? f } { deploy-word-defs? t }
{ deploy-reflection 1 } { deploy-math? t }
{ deploy-ui? t }
{ deploy-word-props? t }
{ deploy-io 3 }
} }

View File

@ -1,11 +1,11 @@
USING: accessors arrays cocoa.dialogs combinators continuations USING: arrays cocoa.dialogs combinators continuations
fry grouping io.encodings.utf8 io.files io.styles kernel math fry grouping io.encodings.utf8 io.files io.styles kernel math
math.parser models models.arrow models.history namespaces random math.parser models models.arrow models.history namespaces random
sequences splitting ui ui.gadgets.alerts ui.gadgets.book-extras sequences splitting ui ui.gadgets.alerts ui.gadgets.book-extras
ui.gadgets.books ui.gadgets.buttons ui.gadgets.frames ui.gadgets.books ui.gadgets.buttons ui.gadgets.frames
ui.gadgets.grids ui.gadgets.labels ui.gadgets.tracks fonts ui.gadgets.grids ui.gadgets.labels ui.gadgets.tracks fonts
wrap.strings system ; wrap.strings system ;
EXCLUDE: accessors => change-model ;
IN: drills.deployed IN: drills.deployed
SYMBOLS: it startLength ; SYMBOLS: it startLength ;
: big ( gadget -- gadget ) T{ font { name "sans-serif" } { size 30 } } >>font ; : big ( gadget -- gadget ) T{ font { name "sans-serif" } { size 30 } } >>font ;

View File

@ -1,10 +1,11 @@
USING: accessors arrays cocoa.dialogs combinators continuations USING: arrays cocoa.dialogs combinators continuations
fry grouping io.encodings.utf8 io.files io.styles kernel math fry grouping io.encodings.utf8 io.files io.styles kernel math
math.parser models models.arrow models.history namespaces random math.parser models models.arrow models.history namespaces random
sequences splitting ui ui.gadgets.alerts ui.gadgets.book-extras sequences splitting ui ui.gadgets.alerts ui.gadgets.book-extras
ui.gadgets.books ui.gadgets.buttons ui.gadgets.frames ui.gadgets.books ui.gadgets.buttons ui.gadgets.frames
ui.gadgets.grids ui.gadgets.labels ui.gadgets.tracks fonts ui.gadgets.grids ui.gadgets.labels ui.gadgets.tracks fonts
wrap.strings ; wrap.strings ;
EXCLUDE: accessors => change-model ;
IN: drills IN: drills
SYMBOLS: it startLength ; SYMBOLS: it startLength ;

View File

@ -1,14 +1,14 @@
USING: tools.deploy.config ; USING: tools.deploy.config ;
H{ H{
{ deploy-math? t } { deploy-name "Merger" }
{ deploy-io 2 }
{ deploy-unicode? t }
{ deploy-c-types? f } { deploy-c-types? f }
{ "stop-after-last-window?" t } { "stop-after-last-window?" t }
{ deploy-ui? t } { deploy-unicode? f }
{ deploy-reflection 1 }
{ deploy-name "Merger" }
{ deploy-word-props? f }
{ deploy-threads? t } { deploy-threads? t }
{ deploy-reflection 1 }
{ deploy-word-defs? f } { deploy-word-defs? f }
{ deploy-math? t }
{ deploy-ui? t }
{ deploy-word-props? f }
{ deploy-io 2 }
} }

View File

@ -1,4 +1,5 @@
USING: accessors arrays fry io.directories kernel models sequences sets ui USING: accessors arrays fry io.directories kernel
models sequences sets ui
ui.gadgets ui.gadgets.buttons ui.gadgets.labeled ui.gadgets ui.gadgets.buttons ui.gadgets.labeled
ui.gadgets.tracks ui.gadgets.labels ui.gadgets.glass ui.gadgets.tracks ui.gadgets.labels ui.gadgets.glass
math.rectangles cocoa.dialogs ; math.rectangles cocoa.dialogs ;

View File

@ -21,7 +21,7 @@ M: frp-table row-color color-quot>> [ call( a -- b ) ] [ drop f ] if* ;
: <frp-table> ( model -- table ) f frp-table new-table dup >>renderer : <frp-table> ( model -- table ) f frp-table new-table dup >>renderer
V{ } clone <basic> >>selected-values V{ } clone <basic> >>selected-indices* ; V{ } clone <basic> >>selected-values V{ } clone <basic> >>selected-indices* ;
: <frp-table*> ( -- table ) V{ } clone <model> <frp-table> ; : <frp-table*> ( -- table ) V{ } clone <model> <frp-table> ;
: <frp-list> ( model -- table ) <frp-table> [ 1array ] >>quot ; : <frp-list> ( column-model -- table ) <frp-table> [ 1array ] >>quot ;
: <frp-list*> ( -- table ) V{ } clone <model> <frp-list> ; : <frp-list*> ( -- table ) V{ } clone <model> <frp-list> ;
: indexed ( table -- table ) f >>val-quot ; : indexed ( table -- table ) f >>val-quot ;

View File

@ -10,25 +10,25 @@ M: multi-model model-activated dup dependencies>> dup length 1 =
TUPLE: basic-model < multi-model ; TUPLE: basic-model < multi-model ;
M: basic-model (model-changed) [ value>> ] dip set-model ; M: basic-model (model-changed) [ value>> ] dip set-model ;
: <merge> ( models -- model ) basic-model <multi-model> ; : <merge> ( models -- signal ) basic-model <multi-model> ;
: <basic> ( value -- model ) basic-model new-model ; : <basic> ( value -- signal ) basic-model new-model ;
TUPLE: filter-model < multi-model quot ; TUPLE: filter-model < multi-model quot ;
M: filter-model (model-changed) [ value>> ] dip 2dup quot>> call( a -- ? ) M: filter-model (model-changed) [ value>> ] dip 2dup quot>> call( a -- ? )
[ set-model ] [ 2drop ] if ; [ set-model ] [ 2drop ] if ;
: <filter> ( model quot -- filter-model ) [ 1array filter-model <multi-model> ] dip >>quot ; : <filter> ( model quot -- filter-signal ) [ 1array filter-model <multi-model> ] dip >>quot ;
TUPLE: fold-model < multi-model oldval quot ; TUPLE: fold-model < multi-model oldval quot ;
M: fold-model (model-changed) [ [ value>> ] [ [ oldval>> ] [ quot>> ] bi ] bi* M: fold-model (model-changed) [ [ value>> ] [ [ oldval>> ] [ quot>> ] bi ] bi*
call( val oldval -- newval ) ] keep set-model ; call( val oldval -- newval ) ] keep set-model ;
: <fold> ( oldval quot model -- model' ) 1array fold-model <multi-model> swap >>quot : <fold> ( oldval quot model -- signal ) 1array fold-model <multi-model> swap >>quot
swap [ >>oldval ] [ >>value ] bi ; swap [ >>oldval ] [ >>value ] bi ;
TUPLE: updater-model < multi-model values updates ; TUPLE: updater-model < multi-model values updates ;
M: updater-model (model-changed) tuck updates>> = M: updater-model (model-changed) tuck updates>> =
[ [ values>> value>> ] keep set-model ] [ [ values>> value>> ] keep set-model ]
[ drop ] if ; [ drop ] if ;
: <updates> ( values updates -- updater ) [ 2array updater-model <multi-model> ] 2keep : <updates> ( values updates -- signal ) [ 2array updater-model <multi-model> ] 2keep
[ >>values ] [ >>updates ] bi* ; [ >>values ] [ >>updates ] bi* ;
TUPLE: switch-model < multi-model original switcher on ; TUPLE: switch-model < multi-model original switcher on ;
@ -41,20 +41,20 @@ M: switch-model model-activated [ original>> ] keep model-changed ;
: >behavior ( event -- behavior ) t <model> swap <switch> ; : >behavior ( event -- behavior ) t <model> swap <switch> ;
TUPLE: mapped-model < multi-model model quot ; TUPLE: mapped-model < multi-model model quot ;
: new-mapped-model ( model quot class -- const-model ) [ over 1array ] dip : new-mapped-model ( model quot class -- mapped-model ) [ over 1array ] dip
<multi-model> swap >>quot swap >>model ; <multi-model> swap >>quot swap >>model ;
: <mapped> ( model quot -- mapped ) mapped-model new-mapped-model ; : <mapped> ( model quot -- signal ) mapped-model new-mapped-model ;
M: mapped-model (model-changed) M: mapped-model (model-changed)
[ [ value>> ] [ quot>> ] bi* call( old -- new ) ] [ nip ] 2bi [ [ value>> ] [ quot>> ] bi* call( old -- new ) ] [ nip ] 2bi
set-model ; set-model ;
TUPLE: side-effect-model < mapped-model ; TUPLE: side-effect-model < mapped-model ;
M: side-effect-model (model-changed) [ [ value>> ] [ quot>> ] bi* call( old -- ) ] keep t swap set-model ; M: side-effect-model (model-changed) [ [ value>> ] [ quot>> ] bi* call( old -- ) ] keep t swap set-model ;
: $> ( model quot -- side-effect-model ) side-effect-model new-mapped-model ; : $> ( model quot -- signal ) side-effect-model new-mapped-model ;
TUPLE: quot-model < mapped-model ; TUPLE: quot-model < mapped-model ;
M: quot-model (model-changed) nip [ quot>> call( -- b ) ] keep set-model ; M: quot-model (model-changed) nip [ quot>> call( -- b ) ] keep set-model ;
: <$ ( model quot -- quot-model ) quot-model new-mapped-model ; : <$ ( model quot -- signal ) quot-model new-mapped-model ;
TUPLE: action-value < basic-model parent ; TUPLE: action-value < basic-model parent ;
: <action-value> ( parent value -- model ) action-value new-model swap >>parent ; : <action-value> ( parent value -- model ) action-value new-model swap >>parent ;
@ -63,7 +63,7 @@ M: action-value model-activated dup parent>> dup activate-model model-changed ;
TUPLE: action < multi-model quot ; TUPLE: action < multi-model quot ;
M: action (model-changed) [ [ value>> ] [ quot>> ] bi* call( a -- b ) ] keep value>> M: action (model-changed) [ [ value>> ] [ quot>> ] bi* call( a -- b ) ] keep value>>
[ swap add-connection ] 2keep model-changed ; [ swap add-connection ] 2keep model-changed ;
: <action> ( model quot -- action ) [ 1array action <multi-model> ] dip >>quot dup f <action-value> >>value value>> ; : <action> ( model quot -- action-signal ) [ 1array action <multi-model> ] dip >>quot dup f <action-value> >>value value>> ;
TUPLE: | < multi-model ; TUPLE: | < multi-model ;
: <|> ( models -- product ) | <multi-model> ; : <|> ( models -- product ) | <multi-model> ;

View File

@ -1,46 +0,0 @@
USING: help.markup help.syntax models monads sequences
ui.gadgets.buttons ui.gadgets.tracks ;
IN: ui.frp
! Layout utilities
HELP: ,
{ $values { "uiitem" "a gadget or model" } }
{ $description "Used in a series of gadgets created by a box, accumulating the gadget" } ;
HELP: ->
{ $values { "uiitem" "a gadget or model" } { "model" model } }
{ $description "Like " { $link , } "but passes its model on for further use." } ;
HELP: <hbox>
{ $values { "gadgets" "a list of gadgets" } { "track" track } }
{ $syntax "[ gadget , gadget , ... ] <hbox>" }
{ $description "Creates an horizontal track containing the gadgets listed in the quotation" } ;
HELP: <vbox>
{ $values { "gadgets" "a list of gadgets" } { "track" track } }
{ $syntax "[ gadget , gadget , ... ] <hbox>" }
{ $description "Creates an vertical track containing the gadgets listed in the quotation" } ;
! Gadgets
HELP: <frp-button>
{ $values { "text" "the button's label" } { "button" button } }
{ $description "Creates an button whose model updates on clicks" } ;
HELP: <merge>
{ $values { "models" "a list of models" } { "model" basic-model } }
{ $description "Creates a model that merges the updates of others" } ;
HELP: <filter>
{ $values { "model" model } { "quot" "quotation with stack effect ( a b -- c )" } { "filter-model" filter-model } }
{ $description "Creates a model that uses the updates of another model when they satisfy a given predicate" } ;
HELP: <fold>
{ $values { "oldval" "starting value" } { "quot" "applied to update and previous values" } { "model" model } { "model'" model } }
{ $description "Similar to " { $link reduce } " but works on models, applying a quotation to the previous and new values at each update" } ;
HELP: <switch>
{ $values { "signal1" model } { "signal2" model } { "signal'" model } }
{ $description "Creates a model that starts with the behavior of model1 and switches to the behavior of model2 on its update" } ;
ARTICLE: { "frp" "instances" } "FRP Instances"
"Models are all functors, as " { $link fmap } " corresponds directly to the " { $link "models.arrow" } " vocabulary. "
"Also, a gadget is a monad. Binding recieves a model and creates a new gadget." ;