@@ -124,6 +124,7 @@ webSocket' url config onRawMessage = do
124124
125125#ifdef USE_TEMPLATE_HASKELL
126126makeLensesWith (lensRules & simpleLenses .~ True) ''WebSocketConfig
127+makeLensesWith (lensRules & simpleLenses .~ True) ''RawWebSocket
127128#else
128129
129130webSocketConfig_send :: Lens' (WebSocketConfig t a) (Event t [a])
@@ -138,4 +139,20 @@ webSocketConfig_reconnect :: Lens' (WebSocketConfig t a) Bool
138139webSocketConfig_reconnect f (WebSocketConfig x1 x2 x3) = (\y -> WebSocketConfig x1 x2 y) <$> f x3
139140{-# INLINE webSocketConfig_reconnect #-}
140141
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 #-}
145+
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 #-}
149+
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 #-}
153+
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 #-}
157+
141158#endif