From 5dae6895c3308d9bc21f4d812c757bac6bacaa68 Mon Sep 17 00:00:00 2001 From: Jens Nolte <jens@nightmarestudio.de> Date: Sat, 29 Feb 2020 15:56:15 +0100 Subject: [PATCH] Use lens --- src/QBar/Core.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/QBar/Core.hs b/src/QBar/Core.hs index 74cb0cf..c87a697 100644 --- a/src/QBar/Core.hs +++ b/src/QBar/Core.hs @@ -150,8 +150,7 @@ hasEventHandler (Just (_, Just _)) = True hasEventHandler _ = False invalidateBlockState :: BlockState -> BlockState -invalidateBlockState Nothing = Nothing -invalidateBlockState (Just (output, eventHandler)) = Just (invalidateBlock output, eventHandler) +invalidateBlockState = (_Just . _1) %~ invalidateBlock runBarIO :: MonadIO m => Bar -> BarIO r -> m r -- GitLab