From c33aa67c3e8e2f9ba89c066afb8fe2d00dbbdef8 Mon Sep 17 00:00:00 2001 From: nek0 Date: Sun, 10 Dec 2017 16:10:09 +0100 Subject: [PATCH] remove message type variable --- src/Affection/Types.hs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Affection/Types.hs b/src/Affection/Types.hs index bb0b1e9..d5bff6b 100644 --- a/src/Affection/Types.hs +++ b/src/Affection/Types.hs @@ -54,7 +54,7 @@ import Foreign.Ptr (Ptr) import Affection.MessageBus.Message -- | Configuration for the aplication. needed at startup. -data AffectionConfig us msg = AffectionConfig +data AffectionConfig us = AffectionConfig { initComponents :: InitComponents -- ^ SDL components to initialize at startup , windowTitle :: T.Text @@ -65,13 +65,13 @@ data AffectionConfig us msg = AffectionConfig -- ^ size of the texture canvas , initScreenMode :: SDL.WindowMode -- ^ Window mode to start in - , preLoop :: Affection us msg () + , preLoop :: Affection us () -- ^ Actions to be performed, before loop starts - , eventLoop :: SDL.EventPayload -> Affection us msg () + , eventLoop :: SDL.EventPayload -> Affection us () -- ^ Main update function. Takes fractions of a second as input. - , updateLoop :: Double -> Affection us msg () + , updateLoop :: Double -> Affection us () -- ^ Main update function. Takes fractions of a second as input. - , drawLoop :: Affection us msg () + , drawLoop :: Affection us () -- ^ Function for updating graphics. , loadState :: IO us -- ^ Provide your own load function to create this data. @@ -103,7 +103,7 @@ data AffectionData us msg = AffectionData , deltaTime :: Double -- ^ Elapsed time in seconds since last tick , sysTime :: TimeSpec -- ^ System time (NOT the time on the clock) , pausedTime :: Bool -- ^ Should the update loop be executed? - , messageChannel :: Channel msg -- ^ The main broadcast channel to duplicate all others from + -- , messageChannel :: Channel msg -- ^ The main broadcast channel to duplicate all others from } -- -- | This datatype stores information about areas of a 'G.GeglBuffer' to be updated @@ -122,16 +122,16 @@ data AffectionData us msg = AffectionData -- | Inner 'StateT' monad for the update state -- type AffectionStateInner us m a = StateT (AffectionData us) m a -type AffectionStateInner us m a = StateT us m a +type AffectionStateInner us a = StateT us a -- | Affection's state monad -newtype AffectionState us m a = AffectionState - { runState :: AffectionStateInner us m a } +newtype AffectionState us a = AffectionState + { runState :: AffectionStateInner us a } deriving (Functor, Applicative, Monad, MonadIO, MonadState us) -instance MP.MonadParallel m => MP.MonadParallel (AffectionState us m) +instance MP.MonadParallel m => MP.MonadParallel (AffectionState us) -type Affection us msg a = AffectionState (AffectionData us msg) IO a +type Affection us a = AffectionState (AffectionData us) IO a -- -- | Inner 'StateT' monad of Affection -- type AffectionInner us od a = StateT (AffectionState us od) IO a