eta reductions
This commit is contained in:
parent
f12e62d938
commit
295c4b333c
4 changed files with 7 additions and 5 deletions
|
@ -110,8 +110,10 @@ pre = do
|
||||||
exitOnQ :: KeyboardMessage -> Affection StateData ()
|
exitOnQ :: KeyboardMessage -> Affection StateData ()
|
||||||
exitOnQ (MsgKeyboardEvent _ _ _ _ sym) =
|
exitOnQ (MsgKeyboardEvent _ _ _ _ sym) =
|
||||||
case SDL.keysymKeycode sym of
|
case SDL.keysymKeycode sym of
|
||||||
SDL.KeycodeQ -> quit
|
SDL.KeycodeQ -> do
|
||||||
otherwise -> return ()
|
liftIO $ logIO Debug "Yo dog I heard..."
|
||||||
|
quit
|
||||||
|
_ -> return ()
|
||||||
|
|
||||||
handle :: [SDL.EventPayload] -> Affection StateData ()
|
handle :: [SDL.EventPayload] -> Affection StateData ()
|
||||||
handle es = do
|
handle es = do
|
||||||
|
|
|
@ -17,7 +17,7 @@ consumeSDLKeyboardEvents
|
||||||
=> ak
|
=> ak
|
||||||
-> [SDL.EventPayload]
|
-> [SDL.EventPayload]
|
||||||
-> Affection us [SDL.EventPayload]
|
-> Affection us [SDL.EventPayload]
|
||||||
consumeSDLKeyboardEvents ak eps = doConsume eps
|
consumeSDLKeyboardEvents ak = doConsume
|
||||||
where
|
where
|
||||||
doConsume [] = return []
|
doConsume [] = return []
|
||||||
doConsume (e:es) = do
|
doConsume (e:es) = do
|
||||||
|
|
|
@ -19,7 +19,7 @@ consumeSDLMouseEvents
|
||||||
=> am
|
=> am
|
||||||
-> [SDL.EventPayload]
|
-> [SDL.EventPayload]
|
||||||
-> Affection us [SDL.EventPayload]
|
-> Affection us [SDL.EventPayload]
|
||||||
consumeSDLMouseEvents am eps = doConsume eps
|
consumeSDLMouseEvents am = doConsume
|
||||||
where
|
where
|
||||||
doConsume [] = return []
|
doConsume [] = return []
|
||||||
doConsume (e:es) = do
|
doConsume (e:es) = do
|
||||||
|
|
|
@ -18,7 +18,7 @@ consumeSDLWindowEvents
|
||||||
=> aw
|
=> aw
|
||||||
-> [SDL.EventPayload]
|
-> [SDL.EventPayload]
|
||||||
-> Affection us [SDL.EventPayload]
|
-> Affection us [SDL.EventPayload]
|
||||||
consumeSDLWindowEvents aw eps = doConsume eps
|
consumeSDLWindowEvents aw = doConsume
|
||||||
where
|
where
|
||||||
doConsume [] = return []
|
doConsume [] = return []
|
||||||
doConsume (e:es) = do
|
doConsume (e:es) = do
|
||||||
|
|
Loading…
Reference in a new issue