Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

MessagePack RPC for Haskell

License

NotificationsYou must be signed in to change notification settings

SX91/haskell-msgpackrpc

Repository files navigation

Build Status

haskell-msgpackrpc

MsgPack RPC implementation for Haskell (server side only, for now)

Example

{-#LANGUAGE NoImplicitPrelude #-}{-#LANGUAGE OverloadedStrings #-}importBasicPreludehiding (catch,finally,try)importControl.Monad.CatchimportqualifiedData.MapasMapimportNetwork.MsgpackRpc.Serverdefault (Text)-- This sums argumentssumMethod::Int->Int->RpcMethodTIOIntsumMethod a b=return$! a+ b-- This throws error to clienterrorMethod::RpcMethodTIOInterrorMethod= throwM$ rpcError".MyRpc.SomeCoolError" ("WAT!?"::Text)func::IO()func=dolet methodMap=Map.fromList            [              ("sum", rpcMethod sumMethod)            , ("error", rpcMethod errorMethod)            ]    serveRpc128 (serverSettings5252"*") methodMapmain::IO()main= func

About

MessagePack RPC for Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp