From 534ee780d2b295ac67fab59f481245b9ed5f5bc2 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Wed, 15 Mar 2023 13:37:35 +1300 Subject: [PATCH] Typesystem/import fixes. --- src/Main.hs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 69eb955..bb72973 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -36,6 +36,9 @@ import Graphics.Layout (boxLayout) import SDL hiding (rotate) import Graphics.GL.Core32 +import Data.Function (fix) +import Control.Monad (unless) + import Data.Maybe (fromMaybe) import System.Environment (getArgs) @@ -143,12 +146,12 @@ main = do fix $ \loop -> do events <- fmap eventPayload <$> pollEvents - liftIO $ glClearColor 0 0 0 1 - liftIO $ glClear GL_COLOR_BUFFER_BIT + glClearColor 0 0 0 1 + glClear GL_COLOR_BUFFER_BIT - sz@(V2 dw dh) <- liftIO $ glGetDrawableSize w - liftIO $ glViewport 0 0 (fromIntegral dw) (fromIntegral dh) + sz@(V2 dw dh) <- glGetDrawableSize w + glViewport 0 0 (fromIntegral dw) (fromIntegral dh) - liftIO $ glSwapWindow w + glSwapWindow w unless (QuitEvent `elem` events) loop return () -- 2.30.2