summaryrefslogtreecommitdiff
path: root/highway
diff options
context:
space:
mode:
Diffstat (limited to 'highway')
-rw-r--r--highway/Main.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/highway/Main.hs b/highway/Main.hs
index d387466..58049df 100644
--- a/highway/Main.hs
+++ b/highway/Main.hs
@@ -4,7 +4,7 @@ import Wayland.Server
import Lens.Micro.TH (makeLenses)
import Lens.Micro.Mtl ((%=), (<%=))
import Data.Data (Typeable)
-import Control.Monad (void)
+import Control.Monad (void, when)
import Control.Monad.Trans (liftIO)
import qualified Wayland.Protocols.Core.WLOutput as WLOutput
import qualified Data.Map as M
@@ -49,9 +49,9 @@ handleRequest r
sendEvent o $ WLOutput.EvGeometry geometry
sendEvent o $ WLOutput.EvDone
flushEvents
- | Just (ReqSIGINT) <- fromRequest r = do c <- interruptedCount <%= (+1)
+ | Just ReqSIGINT <- fromRequest r = do c <- interruptedCount <%= (+1)
liftIO $ putStrLn $ "Received SIGINT " ++ show c ++ "/3"
- if c >= 3 then requestTermination else pure ()
+ when (c >= 3) requestTermination
| otherwise = pure ()
main :: IO ()