mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-15 19:06:06 +00:00
Use a Map instead of list of tuples for commInfo
It's a bit closer to a dictionary.
This commit is contained in:
parent
8de1a9e081
commit
321bdd95ff
@ -178,7 +178,7 @@ replyTo config _ _ CommInfoRequest{} replyHeader =
|
||||
return
|
||||
CommInfoReply
|
||||
{ header = replyHeader
|
||||
, commInfo = [] }
|
||||
, commInfo = mempty }
|
||||
|
||||
replyTo config _ interface ShutdownRequest { restartPending = pending } replyHeader = do
|
||||
liftIO $ writeChan (shellReplyChannel interface) $ ShutdownReply replyHeader pending
|
||||
|
@ -306,7 +306,7 @@ data Message =
|
||||
-- | A response to a CommInfoRequest.
|
||||
CommInfoReply
|
||||
{ header :: MessageHeader
|
||||
, commInfo :: [(String, String)] -- ^ A dictionary of the comms, indexed by uuids.
|
||||
, commInfo :: Map String String -- ^ A dictionary of the comms, indexed by uuids.
|
||||
}
|
||||
|
|
||||
-- | A request from a frontend to execute some code.
|
||||
|
@ -267,7 +267,7 @@ replyTo _ CommInfoRequest{} replyHeader state =
|
||||
return
|
||||
(state, CommInfoReply
|
||||
{ header = replyHeader
|
||||
, commInfo = []
|
||||
, commInfo = mempty
|
||||
})
|
||||
|
||||
-- Reply to a shutdown request by exiting the main thread. Before shutdown, reply to the request to
|
||||
|
Loading…
x
Reference in New Issue
Block a user