get Affectionate class to work

This commit is contained in:
nek0 2020-05-04 05:17:44 +02:00
parent 13f67c6cd1
commit 786bfe1b21

View file

@ -3,6 +3,7 @@
{-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeApplications #-}
module Affection module Affection
( withAffection ( withAffection
, get , get
@ -38,7 +39,7 @@ import qualified Graphics.Rendering.OpenGL as GL (clear, flush, ClearBuffer(..))
-- | Main function which bootstraps everything else. -- | Main function which bootstraps everything else.
withAffection withAffection
:: (Affectionate us) :: forall us. (Affectionate us)
=> AffectionConfig us -- ^ Configuration of the Game and its engine. => AffectionConfig us -- ^ Configuration of the Game and its engine.
-> IO () -> IO ()
withAffection AffectionConfig{..} = do withAffection AffectionConfig{..} = do
@ -79,7 +80,7 @@ withAffection AffectionConfig{..} = do
-- get current time -- get current time
execTime <- getTime Monotonic execTime <- getTime Monotonic
liftIO $ logIO Debug "Loading initial data container" liftIO $ logIO Debug "Loading initial data container"
gameData <- loadState :: forall us. IO (Data us) gameData <- loadState @us
let initContainer = AffectionData let initContainer = AffectionData
{ drawWindows = windows { drawWindows = windows
, glContext = contexts , glContext = contexts