show and reduce warnings
This commit is contained in:
parent
298ad4076b
commit
79cdc4934a
2 changed files with 5 additions and 5 deletions
|
@ -48,6 +48,7 @@ library
|
||||||
, UndecidableInstances
|
, UndecidableInstances
|
||||||
hs-source-dirs: src
|
hs-source-dirs: src
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
ghc-options: -Wall
|
||||||
-- Other library packages from which modules are imported.
|
-- Other library packages from which modules are imported.
|
||||||
build-depends: base >=4.9 && <4.10
|
build-depends: base >=4.9 && <4.10
|
||||||
, sdl2
|
, sdl2
|
||||||
|
|
|
@ -21,7 +21,6 @@ import System.Clock
|
||||||
|
|
||||||
import Control.Monad.Loops
|
import Control.Monad.Loops
|
||||||
import Control.Monad.State
|
import Control.Monad.State
|
||||||
import Control.Monad.Reader
|
|
||||||
import Control.Concurrent.MVar
|
import Control.Concurrent.MVar
|
||||||
|
|
||||||
import Affection.Render
|
import Affection.Render
|
||||||
|
@ -31,7 +30,7 @@ import Affection.Types as Types
|
||||||
withAffection
|
withAffection
|
||||||
:: AffectionConfig us -- ^ Configuration of the Game and its engine.
|
:: AffectionConfig us -- ^ Configuration of the Game and its engine.
|
||||||
-> IO ()
|
-> IO ()
|
||||||
withAffection conf@AffectionConfig{..} = do
|
withAffection AffectionConfig{..} = do
|
||||||
case initComponents of
|
case initComponents of
|
||||||
All ->
|
All ->
|
||||||
SDL.initializeAll
|
SDL.initializeAll
|
||||||
|
@ -40,16 +39,16 @@ withAffection conf@AffectionConfig{..} = do
|
||||||
G.gegl_init
|
G.gegl_init
|
||||||
execTime <- newMVar =<< getTime Monotonic
|
execTime <- newMVar =<< getTime Monotonic
|
||||||
window <- SDL.createWindow windowTitle windowConfig
|
window <- SDL.createWindow windowTitle windowConfig
|
||||||
oldSurf@(SDL.Surface ptr vect) <- SDL.getWindowSurface window
|
oldSurf@(SDL.Surface ptr _) <- SDL.getWindowSurface window
|
||||||
surface <- (\x -> return $ SDL.Surface x Nothing) =<<
|
surface <- (\x -> return $ SDL.Surface x Nothing) =<<
|
||||||
Raw.convertSurfaceFormat ptr Raw.SDL_PIXELFORMAT_ABGR8888 0
|
Raw.convertSurfaceFormat ptr (SDL.toNumber SDL.ABGR8888) 0
|
||||||
initContainer <- return . (\x -> AffectionData
|
initContainer <- return . (\x -> AffectionData
|
||||||
{ quitEvent = False
|
{ quitEvent = False
|
||||||
, userState = x
|
, userState = x
|
||||||
, drawWindow = window
|
, drawWindow = window
|
||||||
, drawSurface = surface
|
, drawSurface = surface
|
||||||
}) =<< loadState surface
|
}) =<< loadState surface
|
||||||
(res, nState) <- runStateT ( Types.runState $
|
(_, _) <- runStateT ( Types.runState $
|
||||||
whileM_ (do
|
whileM_ (do
|
||||||
current <- get
|
current <- get
|
||||||
return $ not $ Types.quitEvent current
|
return $ not $ Types.quitEvent current
|
||||||
|
|
Loading…
Reference in a new issue