handleCallSpec :: forall a b s.
                  (Serializable a, Serializable b)
               => (s -> a -> Process (ProcessReply b s))
               -> Dispatcher s
handleCallSpec f s0
  = do (who,msg) <- expect :: Process (ProcessId, a)
       reply     <- f s0 msg
       case reply of
         NoReply s'    -> return s'
         ReplyMsg r s' -> do resp <- selfSign r
                             send who resp
                             return s'


handleCallSpec :: forall a b s.
                  (Serializable a, Serializable b)
               => (s -> a -> Process (ProcessReply b s))
               -> Dispatcher s
handleCallSpec f s0
  = do (who,msg) <- expect :: Process (ProcessId, a)
       reply     <- f s0 msg
       case reply of
         NoReply s'    -> return s'
         ReplyMsg r s' -> do resp <- selfSign r
                             send who resp
                             return s'


handleCallSpec f s0
  = do (who,msg) <- expect :: Process (ProcessId, a)
       reply     <- f s0 msg
       case reply of
         NoReply s'    -> return s'
         ReplyMsg r s' -> do resp <- selfSign r
                             send who resp
                             return s'

