Instead of RBAnyVtyEvent and RBAnyKey, we might want to try nesting keys.
So we'd have
data RBEvent a where
RBVtyEvent :: RBEvent (DMap RBVtyEvent Identity)
RBKey :: RBEvent (DMap RBKey Identity)
...
Then, given an ev :: EventSelector RBEvent, we can subscribe to 'any vty event' with select ev RBVtyEvent, and 'any key' with select ev RBKey. To further refine the vty/key events, we fan the result of the 'any vty event' or 'any key event', and select a specific event or keypress.
Instead of
RBAnyVtyEvent
andRBAnyKey
, we might want to try nesting keys.So we'd have
Then, given an
ev :: EventSelector RBEvent
, we can subscribe to 'any vty event' withselect ev RBVtyEvent
, and 'any key' withselect ev RBKey
. To further refine the vty/key events, wefan
the result of the 'any vty event' or 'any key event', andselect
a specific event or keypress.Is this extra layer of fanning burdensome?