-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A MessagePack-RPC Implementation -- -- A MessagePack-RPC Implementation http://msgpack.org/ -- -- This is a fork of msgpack-haskell -- https://github.com/msgpack/msgpack-haskell, since the original -- author is unreachable. This fork incorporates a number of bugfixes and -- is actively being developed. @package network-msgpack-rpc @version 0.0.3 module Network.MessagePack.Server data Method m class Monad m => MethodType m f -- | Create a RPC method from a Haskell function toBody :: MethodType m f => String -> f -> [Object] -> m Object -- | MessagePack RPC method data MethodDocs MethodDocs :: [MethodVal] -> MethodVal -> MethodDocs [methodArgs] :: MethodDocs -> [MethodVal] [methodRetv] :: MethodDocs -> MethodVal data MethodVal MethodVal :: String -> String -> MethodVal [valName] :: MethodVal -> String [valType] :: MethodVal -> String newtype ServerT m a ServerT :: m a -> ServerT m a [runServerT] :: ServerT m a -> m a type Server = ServerT IO -- | Build a method method :: MethodType m f => String -> MethodDocs -> f -> Method m methodName :: Method m -> String methodDocs :: Method m -> MethodDocs -- | Start RPC server with a set of RPC methods. serve :: (MonadBaseControl IO m, MonadIO m, MonadCatch m) => Int -> [Method m] -> m () -- | Start RPC server with a set of RPC methods. runServer :: (MonadBaseControl IO m, MonadIO m, MonadCatch m) => Int -> [Method m] -> m () module Network.MessagePack.Client type Client a = ClientT IO a data ClientT m a execClient :: ByteString -> Int -> Client a -> IO a runClient :: ByteString -> Int -> Client a -> IO a -- | Call an RPC Method call :: RpcType a => String -> a -- | RPC error type data RpcError -- | Server error RemoteError :: Object -> RpcError -- | Result type mismatch ResultTypeError :: String -> Object -> RpcError -- | Protocol error ProtocolError :: String -> RpcError class RpcType r module Network.MessagePack.Interface data Returns r data Interface f interface :: String -> Doc f -> Interface f call :: RpcType (ClientType m f) => InterfaceM m f -> ClientType m f concrete :: Interface f -> InterfaceM m f method :: (MonadThrow m, MethodType m (ServerType m f), IsDocType f, IsReturnType m f) => Interface f -> HaskellType f -> Method m methodIO :: (MethodType m (ServerTypeIO m f), IsDocType f, IsReturnTypeIO m f) => Interface f -> HaskellTypeIO f -> Method m module Network.MessagePack.Rpc data Returns r method :: RpcService rpc => rpc -> Method (ServerMonad rpc) rpc :: RpcService rpc => rpc -> ClientType (ClientMonad rpc) (F rpc) docs :: RpcService rpc => rpc -> (String, Doc (F rpc)) stubs :: (RpcType (ClientType mc f), MethodType ms (ServerType ms f), IsReturnType ms f, IsDocType f, MonadThrow ms) => String -> Doc f -> HaskellType f -> RpcT mc ms f type Rpc f = RpcT IO IO f data RpcT mc ms f stubsIO :: (RpcType (ClientType mc f), MethodType ms (ServerTypeIO ms f), IsReturnTypeIO ms f, IsDocType f, MonadThrow ms) => String -> Doc f -> HaskellTypeIO f -> RpcIOT mc ms f type RpcIO f = RpcIOT IO IO f data RpcIOT mc ms f instance Network.MessagePack.Rpc.RpcService (Network.MessagePack.Rpc.RpcT mc ms f) instance Network.MessagePack.Rpc.RpcService (Network.MessagePack.Rpc.RpcIOT mc ms f)