Skip to content


Diagrams of Yampa switches

I handed in my thesis the other day. Here are the diagrams of all Yampa switches which hopefully are self-explaining. Note that each of them comes in 2 different flavors: immediate and delayed. In the end there is always a function (k) which does the actual switching (dashed line and white diamonds), thus switching can be interpreted as redirecting the inputs to the new signal function (a black-box because we only know the input and output types).

Legend

  • ? t: Yampa.Event carrying a type t
  • C-shaped arrow: continuation
  • box-shaped arrow: unbox from event

download fonts (CMU Classic Serif, CMU Typewriter Text)

switch

1
2
3
switch :: SF in (out, Event t)
       -> (t -> SF in out)
       -> SF in out

download Yampa_switch.svg

rSwitch

1
2
rSwitch :: SF in out
        -> SF (in, Event (SF in out)) out

download Yampa_rSwitch.svg

kSwitch

1
2
3
4
kSwitch :: SF in out
        -> SF (in, out) (Event t)
        -> (SF in out -> t -> SF in out)
        -> SF in out

download Yampa_kSwitch.svg

pSwitchB

1
2
3
4
5
pSwitchB :: Functor col
         => col (SF in out)
         -> SF (in, col out) (Event mng)
         -> (col (SF in out) -> mng -> SF in (col out))
         -> SF in (col out)

download Yampa_pSwitchB.svg

pSwitch

1
2
3
4
5
6
pSwitch :: Functor col
        => (forall sf. (in -> col sf -> col (ext, sf)))
        -> col (SF ext out)
        -> SF (in, col out) (Event mng)
        -> (col (SF ext out) -> mng -> SF in (col out))
        -> SF in (col out)

download Yampa_pSwitch.svg

rpSwitchB

1
2
3
4
5
rpSwitchB :: Functor col
          => col (SF in out)
          -> SF (in, Event ( col (SF in out)
                          -> col (SF in out)))
                (col out)

download Yampa_rpSwitchB.svg

rpSwitch

1
2
3
4
5
6
rpSwitch :: Functor col
         => (forall sf. (in -> col sf -> col (ext, sf)))
         -> col (SF ext out)
         -> SF (in, Event ( col (SF ext out)
                         -> col (SF ext out)))
               (col out)

download Yampa_rpSwitch.svg

Tagged with , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.