Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides support for writing handlers for JSON-RPC endpoints
type Mul = JsonRpcEndpoint "mul" (Int, Int) String Int mulHandler :: (Int, Int) -> Handler (Either (JsonRpcErr String) Int) mulHandler = _ server :: Application server = serve (Proxy @Mul) mulHandler
Documentation
module Servant.JsonRpc
Orphan instances
(KnownSymbol method, FromJSON p) => HasServer (JsonRpcNotification method p :: Type) context Source # | |
type ServerT (JsonRpcNotification method p) m :: Type # route :: Proxy (JsonRpcNotification method p) -> Context context -> Delayed env (Server (JsonRpcNotification method p)) -> Router env # hoistServerWithContext :: Proxy (JsonRpcNotification method p) -> Proxy context -> (forall x. m x -> n x) -> ServerT (JsonRpcNotification method p) m -> ServerT (JsonRpcNotification method p) n # | |
(KnownSymbol method, FromJSON p, ToJSON e, ToJSON r) => HasServer (JsonRpc method p e r :: Type) context Source # | |