Readme for rpc-framework-2.0.0.1

rpc-framework

This is a framework for remote procedure calls in haskell.

Features

    putStrLn :: IO_World w => WIO w a
    installTextBox :: JS_World w => WIO w ()
    foo :: (Sendable a1 ,..., Sendable aN, Sendable b, Host w) => a1 -> ... -> aN -> WIO w b
    instance (Serializable a) => Sendable a a
    instance (Sendable a' a, Sendable b b') => Sendable (a -> b) (a' -> IO b')

Usage

    $(makeHost "WorldName" "host_location" #portNumber)
    main = runServer $(makeServices [ 'nameOfService1, ... , 'nameOfServiceN])
    main = runServer $(autoService 'HostName)
    module First where
    services = $(autoService 'HostName)

    module Second where
    services = $(autoService 'HostName)

    module Main where
    import qualified First as F
    import qualified Second as S
    main = runServer $ F.services >> S.services
    addServer :: Integer -> WIO Server (Integer -> Integer)
    addServer t = do
        Server <- world
	return (t +)

    getRemoteAdd = $(rpcCall 'addServer)
    ...
    ghci> :t getRemoteAdd
    getRemoteAdd  :: Host w => Integer -> WIO w (Integer -> Integer)

Examples