-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | a remote procedure call framework
--
-- A library and framework for making remote procedure calls in haskell
-- easy and typesafe.
--
-- See http://github.com/mmirman/rpc-framework for more
-- information.
@package rpc-framework
@version 0.1.0.0
module Network.Remote.RPC.Internal.MultiServer
data ServiceID
LocNumber :: Integer -> ServiceID
LocName :: String -> ServiceID
type Handlers m = Map ServiceID (Handle -> AIO m ())
type State m = MVar (Handlers m, Integer)
newtype AIO m a
AIO :: (ReaderT (State m) m a) -> AIO m a
send :: (Show a, MonadIO m) => Handle -> a -> m ()
recv :: (Read a, MonadIO m) => Handle -> m a
startServer :: (Forkable m, Monad m, MonadIO m) => Integer -> AIO m a -> m a
safeFind :: (Ord k, Show k) => Map k a -> k -> a
getHandlers :: Monad m => AIO m (State m)
addService :: (Monad m, MonadIO m) => (Handle -> AIO m ()) -> AIO m ServiceID
addServiceByName :: (Monad m, MonadIO m) => String -> (Handle -> AIO m ()) -> AIO m ServiceID
connectToService :: MonadIO m => String -> Integer -> ServiceID -> m Handle
class (Functor m, Monad m, MonadIO m, Forkable m) => Servable m
instance [incoherent] Forkable m => Forkable (AIO m)
instance [incoherent] MonadIO m => MonadIO (AIO m)
instance [incoherent] Functor m => Functor (AIO m)
instance [incoherent] Monad m => Monad (AIO m)
instance [incoherent] Show ServiceID
instance [incoherent] Read ServiceID
instance [incoherent] Ord ServiceID
instance [incoherent] Eq ServiceID
instance [incoherent] Servable m => Servable (AIO m)
instance [incoherent] Servable IO
instance [incoherent] Monad m => MonadReader (State m) (AIO m)
instance [incoherent] MonadTrans AIO
module Network.Remote.RPC.Internal.Runtime
data WIO w m a
world :: (Servable m, Host w) => WIO w m w
realRemoteCall :: RPC a a' m w => a -> String -> a'
makeService :: Service a m w => a -> String -> WIO w m ()
class Host a
getLocation :: Host a => a -> String
getPort :: Host a => a -> Integer
getValue :: Host a => a
class Servable m => Sendable m a a' | a' -> a, a m -> a', a a' -> m
data Ref a a'
-- | Lift a computation from the IO monad.
liftIO :: MonadIO m => forall a. IO a -> m a
-- | runServer runs a name server and doesn't return
runServer :: (Servable m, Host w) => WIO w m () -> m ()
-- | runServerBG runs a name server on a background thread and does
-- return
runServerBG :: Host w => WIO w IO () -> IO ThreadId
instance [incoherent] Read (Ref a a')
instance [incoherent] Show (Ref a a')
instance [incoherent] Forkable m => Forkable (WIO w m)
instance [incoherent] MonadIO m => MonadIO (WIO w m)
instance [incoherent] Functor m => Functor (WIO w m)
instance [incoherent] Monad m => Monad (WIO w m)
instance [incoherent] (Sendable m a' a, Service b m w) => Service (a -> b) m w
instance [incoherent] (Host w, Servable m, Sendable m a a') => Service (WIO w m a) m w
instance [incoherent] (Sendable m a' a, RPC b b' m w') => RPC (a -> b) (a' -> b') m w'
instance [incoherent] (Sendable m' a a', Host w, Host w', Servable m, Servable m') => RPC (WIO w m a) (WIO w' m' a') m' w'
instance [incoherent] (Sendable m a' a, Sendable m b b') => Sendable m (a -> b) (a' -> WIO w m b')
instance [incoherent] (Read a, Show a', a ~ a', Servable m) => Sendable m a a'
instance [incoherent] MonadTrans (WIO w)
instance [incoherent] Servable m => Servable (WIO w m)
module Network.Remote.RPC.Internal.Templates
build :: Q [Dec] -> Q [Dec]
rpcCall :: Name -> Q Exp
makeHost :: String -> String -> Integer -> Q [Dec]
makeServices :: [Name] -> Q Exp
autoService :: Name -> Q Exp
instance [incoherent] MonadIO Q
module Network.Remote.RPC