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:
patrick brisbin 2019-05-21 08:59:42 -04:00
parent 006fa6cb9e
commit 096049e0e3

View File

@ -213,7 +213,7 @@ sendBinaryDataE = wrapWSE WS.sendBinaryData
sendPing
:: (MonadIO m, WS.WebSocketsData a, MonadReader WS.Connection m)
=> a
-> WebSocketsT m ()
-> m ()
sendPing = wrapWS WS.sendPing
-- | Send a ping message to the client.
@ -242,7 +242,7 @@ sendDataMessageE x = do
sendClose
:: (MonadIO m, WS.WebSocketsData a, MonadReader WS.Connection m)
=> a
-> WebSocketsT m ()
-> m ()
sendClose = wrapWS WS.sendClose
-- | Send a close request to the client.