Use a Map instead of list of tuples for commInfo

It's a bit closer to a dictionary.
This commit is contained in:
Libby Horacek 2016-10-03 20:13:15 -04:00 committed by Sumit Sahrawat
parent 8de1a9e081
commit 321bdd95ff
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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.

View File

@ -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