reorder things
This commit is contained in:
parent
5feaa00dae
commit
5defc8e74a
3 changed files with 8 additions and 24 deletions
|
@ -45,7 +45,10 @@ library
|
|||
-- , Affection.Actor
|
||||
-- , Affection.Animation
|
||||
, Affection.Util
|
||||
, Affection.MessageBus
|
||||
, Affection.MessageBus.Util
|
||||
, Affection.MessageBus.Class
|
||||
, Affection.MessageBus.Engine
|
||||
, Affection.MessageBus.Message
|
||||
default-extensions: OverloadedStrings
|
||||
|
||||
-- Modules included in this library but not exported.
|
||||
|
|
|
@ -41,7 +41,10 @@ import Affection.MouseInteractable as A
|
|||
-- import Affection.Actor as A
|
||||
-- import Affection.Animation as A
|
||||
import Affection.Util as A
|
||||
import Affection.MessageBus as A
|
||||
import Affection.MessageBus.Class as A
|
||||
import Affection.MessageBus.Message as A
|
||||
import Affection.MessageBus.Engine as A
|
||||
import Affection.MessageBus.Util as A
|
||||
|
||||
import Graphics.Rendering.OpenGL as GL (clear, flush, ClearBuffer(..))
|
||||
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
module Affection.MessageBus where
|
||||
|
||||
import Control.Concurrent.STM as STM
|
||||
|
||||
import Data.IORef
|
||||
|
||||
class Message msg where
|
||||
msgPayload :: msg -> Maybe a
|
||||
|
||||
type Channel msg = TChan msg
|
||||
|
||||
class Participant prt where
|
||||
partChannel :: (Message msg) => prt -> IORef (Channel msg)
|
||||
|
||||
partConnectChannel :: (Message msg) => prt -> (Channel msg) -> IO ()
|
||||
|
||||
partListen :: (Message msg) => prt -> IO msg
|
||||
|
||||
partBroadcast :: (Message msg) => prt -> msg -> IO ()
|
||||
|
||||
newBroadcastChannel :: IO (Channel msg)
|
||||
newBroadcastChannel = atomically $ newBroadcastTChan
|
Loading…
Reference in a new issue