sendClose and sendPing act in m ()
The previous type signature was attempting to read the Connection off of the m in WebSocketsT m, rather than the WebSocketsT itself. This was likely a typo that happened to type-check. The types for these now align with the rest of the API, read the Connection off of WebSocketsT, and make no demands of the m other than MonadIO. Fixes #1599.
This commit is contained in:
parent
006fa6cb9e
commit
096049e0e3
@ -213,7 +213,7 @@ sendBinaryDataE = wrapWSE WS.sendBinaryData
|
|||||||
sendPing
|
sendPing
|
||||||
:: (MonadIO m, WS.WebSocketsData a, MonadReader WS.Connection m)
|
:: (MonadIO m, WS.WebSocketsData a, MonadReader WS.Connection m)
|
||||||
=> a
|
=> a
|
||||||
-> WebSocketsT m ()
|
-> m ()
|
||||||
sendPing = wrapWS WS.sendPing
|
sendPing = wrapWS WS.sendPing
|
||||||
|
|
||||||
-- | Send a ping message to the client.
|
-- | Send a ping message to the client.
|
||||||
@ -242,7 +242,7 @@ sendDataMessageE x = do
|
|||||||
sendClose
|
sendClose
|
||||||
:: (MonadIO m, WS.WebSocketsData a, MonadReader WS.Connection m)
|
:: (MonadIO m, WS.WebSocketsData a, MonadReader WS.Connection m)
|
||||||
=> a
|
=> a
|
||||||
-> WebSocketsT m ()
|
-> m ()
|
||||||
sendClose = wrapWS WS.sendClose
|
sendClose = wrapWS WS.sendClose
|
||||||
|
|
||||||
-- | Send a close request to the client.
|
-- | Send a close request to the client.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user