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
|
||||
|
||||
-- | 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
|
||||
|
|
Loading…
Reference in a new issue