Packages

The Phi Programming Language

Current section

Files

Jump to
phi lib Control Behaviour GenEvent Proxy.hm
Raw

lib/Control/Behaviour/GenEvent/Proxy.hm

-----------------------------------------------------------------------------
-- |
-- Module : Control.Behaviour.GenEvent.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 GenEvent Behaviour Proxy.
--
-----------------------------------------------------------------------------
module Control.Behaviour.GenEvent.Proxy where
import Control.Process (Process)
import Data.Unit (Unit)
-- | Module:init(InitArgs) -> Result
foreign import init :: forall a res. a -> Process res
-- | Module:handle_call(Request, State) -> Result
foreign import handle_call
:: forall req st res. req -> st -> Process res
-- | Module:handle_event(Event, State) -> Result
foreign import handle_event
:: forall e st res. e -> st -> Process res
-- | Module:handle_info(Info, State) -> Result
foreign import handle_info
:: forall info st res. info -> st -> Process res
-- | Module:terminate(Arg, State) -> term()
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