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