diff --git a/src/Network/WebSockets/Simple.hs b/src/Network/WebSockets/Simple.hs
--- a/src/Network/WebSockets/Simple.hs
+++ b/src/Network/WebSockets/Simple.hs
@@ -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,
diff --git a/websockets-simple.cabal b/websockets-simple.cabal
--- a/websockets-simple.cabal
+++ b/websockets-simple.cabal
@@ -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
