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-27 00:43:43 +00:00
|
|
|
class (Message msg) => Participant prt msg where
|
2017-11-27 04:27:52 +00:00
|
|
|
partChannel :: prt -> Channel msg
|
2017-11-26 21:26:41 +00:00
|
|
|
|
2017-11-27 22:30:11 +00:00
|
|
|
partInit :: Affection sd msg prt
|
2017-11-26 21:26:41 +00:00
|
|
|
|
2017-11-27 04:27:52 +00:00
|
|
|
partListen :: prt -> IO (Maybe msg)
|
2017-11-26 21:26:41 +00:00
|
|
|
|
2017-11-27 01:18:23 +00:00
|
|
|
partEmit :: prt -> msg -> IO ()
|