2017-11-27 00:43:43 +00:00
|
|
|
{-# LANGUAGE MultiParamTypeClasses #-}
|
2017-11-27 22:30:11 +00:00
|
|
|
{-# LANGUAGE AllowAmbiguousTypes #-}
|
2017-11-26 21:26:41 +00:00
|
|
|
module Affection.MessageBus.Class where
|
|
|
|
|
|
|
|
import Affection.MessageBus.Message
|
2017-11-27 22:30:11 +00:00
|
|
|
import Affection.Types
|
2017-11-26 21:26:41 +00:00
|
|
|
|
2017-11-29 07:29:44 +00:00
|
|
|
class Participant prt m where
|
|
|
|
partChannel :: prt -> Channel m
|
2017-11-26 21:26:41 +00:00
|
|
|
|
2017-11-29 07:29:44 +00:00
|
|
|
partInit :: Affection sd m prt
|
2017-11-26 21:26:41 +00:00
|
|
|
|
2017-11-29 07:29:44 +00:00
|
|
|
partListen :: prt -> IO (Maybe m)
|
2017-11-26 21:26:41 +00:00
|
|
|
|
2017-11-29 07:29:44 +00:00
|
|
|
partEmit :: prt -> m -> IO ()
|