@@ -124,6 +124,7 @@ webSocket' url config onRawMessage = do
125#ifdef USE_TEMPLATE_HASKELL
125#ifdef USE_TEMPLATE_HASKELL
126makeLensesWith (lensRules & simpleLenses .~ True) ''WebSocketConfig
126makeLensesWith (lensRules & simpleLenses .~ True) ''WebSocketConfig
127+makeLensesWith (lensRules & simpleLenses .~ True) ''RawWebSocket
129webSocketConfig_send :: Lens' (WebSocketConfig t a) (Event t [a])
130webSocketConfig_send :: Lens' (WebSocketConfig t a) (Event t [a])
@@ -138,4 +139,20 @@ webSocketConfig_reconnect :: Lens' (WebSocketConfig t a) Bool
138webSocketConfig_reconnect f (WebSocketConfig x1 x2 x3) = (\y -> WebSocketConfig x1 x2 y) <$> f x3
139webSocketConfig_reconnect f (WebSocketConfig x1 x2 x3) = (\y -> WebSocketConfig x1 x2 y) <$> f x3
139{-# INLINE webSocketConfig_reconnect #-}
140{-# INLINE webSocketConfig_reconnect #-}
142+webSocket_recv :: Lens' (RawWebSocket t a) (Event t a)
143+webSocket_recv f (WebSocket x1 x2 x3 x4) = (\y -> WebSocket y x2 x3 x4) <$> f x1
144+{-# INLINE webSocket_recv #-}
146+webSocket_open :: Lens' (RawWebSocket t a) (Event t ())
147+webSocket_open f (WebSocket x1 x2 x3 x4) = (\y -> WebSocket x1 y x3 x4) <$> f x2
148+{-# INLINE webSocket_open #-}
150+webSocket_error :: Lens' (RawWebSocket t a) (Event t ())
151+webSocket_error f (WebSocket x1 x2 x3 x4) = (\y -> WebSocket x1 x2 y x4) <$> f x3
152+{-# INLINE webSocket_error #-}
154+webSocket_close :: Lens' (RawWebSocket t a) (Event t (Bool, Word, Text))
155+webSocket_close f (WebSocket x1 x2 x3 x4) = (\y -> WebSocket x1 x2 x3 y) <$> f x4
156+{-# INLINE webSocket_close #-}