From 096049e0e386143b6a5eaa6a65ec89ade62be5c5 Mon Sep 17 00:00:00 2001 From: patrick brisbin Date: Tue, 21 May 2019 08:59:42 -0400 Subject: [PATCH] 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. --- yesod-websockets/Yesod/WebSockets.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yesod-websockets/Yesod/WebSockets.hs b/yesod-websockets/Yesod/WebSockets.hs index 5a54c553..8512b0ba 100644 --- a/yesod-websockets/Yesod/WebSockets.hs +++ b/yesod-websockets/Yesod/WebSockets.hs @@ -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.