Cleaned the code again
This commit is contained in:
parent
59fd2ce561
commit
d1e7fa7956
|
@ -3,7 +3,6 @@
|
||||||
module Action where
|
module Action where
|
||||||
|
|
||||||
import Graphics.Vty.Input
|
import Graphics.Vty.Input
|
||||||
import Control.Applicative
|
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Linear.V2
|
import Linear.V2
|
||||||
|
|
||||||
|
@ -25,4 +24,4 @@ bindings =
|
||||||
]
|
]
|
||||||
|
|
||||||
eventToAction :: Event -> Action
|
eventToAction :: Event -> Action
|
||||||
eventToAction e = fromJust $ lookup e bindings <|> Just None
|
eventToAction e = fromMaybe None (lookup e bindings)
|
||||||
|
|
Loading…
Reference in New Issue