haskell json rpc library
Haskell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Network
examples
.gitignore
LICENSE
README.rst
Setup.hs
haskell-json-rpc.cabal

README.rst

Haskell implementation of json rpc.

examples:

import Network.JsonRpc (server, proxy, toMethod)

-- method exposed through rpc
add :: Int -> Int -> IO Int
add a b = return $ a + b

-- a server handler. ByteString -> IO ByteString
serv = server [("add", toMethod add)]

-- a proxy which call serv directly.
directProxy = proxy serv

-- client proxy of add method
add' :: Int -> Int -> IO Int
add' = directProxy "add"

main = add' 1 2 >>= print