Safe Haskell | Safe-Inferred |
---|
The responder is the main event loop on the haskell side.
It receives msgs (described in Cmd.Msg) multiplexed through a set of channels which come from various sources: the UI event loop (in its own thread), a socket, the MIDI library, etc. The Msgs are then dispatched through Cmds to treat as they will, stopping when one returns Cmd.Done.
The responder then deals with the results of the Cmds: midi thru output is sent and the old state is diffed with the new state to produce Updates, which are given to Sync to sync the visible UI with the changes the Cmds made to the UI state.
Synopsis
- create_msg_reader :: (Midi.ReadMessage -> Midi.ReadMessage) -> TChan.TChan Midi.ReadMessage -> Socket.Socket -> TChan.TChan UiMsg.UiMsg -> TChan.TChan Msg.Msg -> IO.IO MsgReader
- responder :: StaticConfig.StaticConfig -> SaveGitT.User -> [Rect.Rect] -> Fltk.Channel -> MsgReader -> Interface.Interface -> Cmd.CmdT IO.IO Cmd.Status -> Repl.Session -> Loopback -> IO.IO ()
Documentation
create_msg_reader :: (Midi.ReadMessage -> Midi.ReadMessage) -> TChan.TChan Midi.ReadMessage -> Socket.Socket -> TChan.TChan UiMsg.UiMsg -> TChan.TChan Msg.Msg -> IO.IO MsgReader Source #
Create the MsgReader to pass to responder
.
responder :: StaticConfig.StaticConfig -> SaveGitT.User -> [Rect.Rect] -> Fltk.Channel -> MsgReader -> Interface.Interface -> Cmd.CmdT IO.IO Cmd.Status -> Repl.Session -> Loopback -> IO.IO () Source #