Packages

The Phi Programming Language

Current section

Files

Jump to
phi priv Control Behaviour GenServer Proxy.phi
Raw

priv/Control/Behaviour/GenServer/Proxy.phi

-----------------------------------------------------------------------------
-- |
-- Module : Control.Behaviour.GenServer.Proxy
-- Copyright : (c) 2020-2021 EMQ Technologies Co., Ltd.
-- License : BSD-style (see the LICENSE file)
--
-- Maintainer : Feng Lee, feng@emqx.io
-- Yang M, yangm@emqx.io
-- Stability : experimental
-- Portability : portable
--
-- The Proxy for GenServer Behaviour.
--
-----------------------------------------------------------------------------
module Control.Behaviour.GenServer.Proxy where
import Control.Process (Process)
import Data.Unit (Unit)
import Control.Behaviour.GenTypes
-- | Module:init(Args) -> Result
foreign import init :: forall a res. a -> Process res
-- | Module:handle_call(Request, From, State) -> Result
foreign import handle_call
:: forall req st res. req -> From -> st -> Process res
-- | Module:handle_cast(Request, State) -> Result
foreign import handle_cast
:: forall req st res. req -> st -> Process res
-- | Module:handle_continue(Continue, State) -> Result
foreign import handle_continue
:: forall req st res. req -> st -> Process res
-- | Module:handle_info(Info, State) -> Result
foreign import handle_info
:: forall info st res. info -> st -> Process res
-- | Module:terminate(Reason, State) -> Result
foreign import terminate :: forall r st. r -> st -> Process ()
-- Module:code_change(OldVsn, State, Extra) -> Result
foreign import code_change
:: forall vsn st ex res. vsn -> st -> ex -> Process res