summaryrefslogtreecommitdiff
path: root/highway/Main.hs
diff options
context:
space:
mode:
authorHannes Schulze <haschu0103@outlook.de>2024-08-04 20:45:24 +0200
committerHannes Schulze <haschu0103@outlook.de>2024-08-04 20:45:24 +0200
commit049dfc4dc5341f6d0e0015dccbb54352351e9e14 (patch)
treea9d9e22dfea24c7513d2a07a51c27e8ca0573283 /highway/Main.hs
parent0e1add6fae63eb51c5f73caf4dd42838ec955a86 (diff)
wrap interfaces
Diffstat (limited to 'highway/Main.hs')
-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 ()