remove message type variable
This commit is contained in:
parent
d6f80ed1f0
commit
c33aa67c3e
1 changed files with 11 additions and 11 deletions
|
@ -54,7 +54,7 @@ import Foreign.Ptr (Ptr)
|
||||||
import Affection.MessageBus.Message
|
import Affection.MessageBus.Message
|
||||||
|
|
||||||
-- | Configuration for the aplication. needed at startup.
|
-- | Configuration for the aplication. needed at startup.
|
||||||
data AffectionConfig us msg = AffectionConfig
|
data AffectionConfig us = AffectionConfig
|
||||||
{ initComponents :: InitComponents
|
{ initComponents :: InitComponents
|
||||||
-- ^ SDL components to initialize at startup
|
-- ^ SDL components to initialize at startup
|
||||||
, windowTitle :: T.Text
|
, windowTitle :: T.Text
|
||||||
|
@ -65,13 +65,13 @@ data AffectionConfig us msg = AffectionConfig
|
||||||
-- ^ size of the texture canvas
|
-- ^ size of the texture canvas
|
||||||
, initScreenMode :: SDL.WindowMode
|
, initScreenMode :: SDL.WindowMode
|
||||||
-- ^ Window mode to start in
|
-- ^ Window mode to start in
|
||||||
, preLoop :: Affection us msg ()
|
, preLoop :: Affection us ()
|
||||||
-- ^ Actions to be performed, before loop starts
|
-- ^ 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.
|
-- ^ 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.
|
-- ^ Main update function. Takes fractions of a second as input.
|
||||||
, drawLoop :: Affection us msg ()
|
, drawLoop :: Affection us ()
|
||||||
-- ^ Function for updating graphics.
|
-- ^ Function for updating graphics.
|
||||||
, loadState :: IO us
|
, loadState :: IO us
|
||||||
-- ^ Provide your own load function to create this data.
|
-- ^ 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
|
, deltaTime :: Double -- ^ Elapsed time in seconds since last tick
|
||||||
, sysTime :: TimeSpec -- ^ System time (NOT the time on the clock)
|
, sysTime :: TimeSpec -- ^ System time (NOT the time on the clock)
|
||||||
, pausedTime :: Bool -- ^ Should the update loop be executed?
|
, 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
|
-- -- | 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
|
-- | Inner 'StateT' monad for the update state
|
||||||
-- type AffectionStateInner us m a = StateT (AffectionData us) m a
|
-- 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
|
-- | Affection's state monad
|
||||||
newtype AffectionState us m a = AffectionState
|
newtype AffectionState us a = AffectionState
|
||||||
{ runState :: AffectionStateInner us m a }
|
{ runState :: AffectionStateInner us a }
|
||||||
deriving (Functor, Applicative, Monad, MonadIO, MonadState us)
|
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
|
-- -- | Inner 'StateT' monad of Affection
|
||||||
-- type AffectionInner us od a = StateT (AffectionState us od) IO a
|
-- type AffectionInner us od a = StateT (AffectionState us od) IO a
|
||||||
|
|
Loading…
Reference in a new issue