Copyright | (C) 2015, The University of Kansas |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Justin Dawson |
Stability | Alpha |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
- data RPC a
- method :: FromJSON a => Text -> Args -> RPC a
- notification :: Text -> Args -> RPC ()
- send :: Session -> RPC a -> IO a
- data Session
- weakSession :: (SendAPI :~> IO) -> Session
- strongSession :: (SendAPI :~> IO) -> Session
- applicativeSession :: (SendAPI :~> IO) -> Session
- data SendAPI :: * -> * where
- data Args where
JSON-RPC DSL
The JSON RPC remote monad
method :: FromJSON a => Text -> Args -> RPC a Source
Sets up a JSON-RPC method call with the function name and arguments
notification :: Text -> Args -> RPC () Source
Sets up a JSON-RPC notification call with the function name and arguments
Invoke the JSON RPC Remote Monad
send :: Session -> RPC a -> IO a Source
Send RPC Notifications and Methods by using the given session
weakSession :: (SendAPI :~> IO) -> Session Source
Takes a function that handles the sending of Async and Sync messages, and sends each Notification and Method one at a time
strongSession :: (SendAPI :~> IO) -> Session Source
Takes a function that handles the sending of Async and Sync messages, and bundles Notifications together terminated by an optional Method
applicativeSession :: (SendAPI :~> IO) -> Session Source
Takes a function that handles the sending of Async and Sync messages, and bundles together Notifications and Procedures that are used in Applicative calls
data SendAPI :: * -> * where Source
The client-side send function API. The user provides a way of dispatching this, to implement a client. An example of this using wreq is found in remote-json-client