runSession :: Chan FromServerMessage -> SessionProcessor () -> SessionContext -> SessionState -> Session a -> IO (a, SessionState)
runSession chan preprocessor context state session = runReaderT (runStateT conduit state) context
where conduit = runConduit $ chanSource chan .| preprocessor .| runConduitParser (catchError session handler)
runSession :: Chan FromServerMessage -> SessionProcessor () -> SessionContext -> SessionState -> Session a -> IO (a, SessionState)
runSession chan preprocessor context state session = runReaderT (runStateT conduit state) context
where conduit = runConduit $ chanSource chan .| preprocessor .| runConduitParser (catchError session handler)