packages feed

websockets-simple 0.0.2.1 → 0.0.2.2

raw patch · 2 files changed

+11/−1 lines, 2 files

Files

src/Network/WebSockets/Simple.hs view
@@ -34,6 +34,16 @@   } deriving (Generic, Typeable)  +hoistWebSocketsApp :: (forall a. m a -> n a)+                   -> (forall a. n a -> m a)+                   -> WebSocketsApp send receive m+                   -> WebSocketsApp send receive n+hoistWebSocketsApp f coF WebSocketsApp{onOpen,onReceive} = WebSocketsApp+  { onOpen = \send -> f $ onOpen (coF . send)+  , onReceive = \send r -> f $ onReceive (coF . send) r+  }++ -- | This can throw a 'WebSocketSimpleError' when json parsing fails. However, do note: --   the 'onOpen' is called once, but is still forked when called. Likewise, the 'onReceive' --   function is called /every time/ a (parsable) response is received from the other party,
websockets-simple.cabal view
@@ -1,5 +1,5 @@ name:                websockets-simple-version:             0.0.2.1+version:             0.0.2.2 synopsis:            Simpler interface to the websockets api -- description: homepage:            https://github.com/athanclark/websockets-simple#readme