From 786bfe1b210587538d4e05b0303e341dbdfe96cd Mon Sep 17 00:00:00 2001 From: nek0 Date: Mon, 4 May 2020 05:17:44 +0200 Subject: [PATCH] get Affectionate class to work --- src/Affection.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Affection.hs b/src/Affection.hs index 7ad556e..bb44eac 100644 --- a/src/Affection.hs +++ b/src/Affection.hs @@ -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