From 1f71b604be836b2d2d0f386836205ed11ae4c23a Mon Sep 17 00:00:00 2001
From: Jan Beinke <git@janbeinke.com>
Date: Mon, 2 Mar 2020 05:39:03 +0100
Subject: [PATCH] Let tryMaybe catch SomeException instad of IOException

---
 src/QBar/Blocks/Utils.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/QBar/Blocks/Utils.hs b/src/QBar/Blocks/Utils.hs
index 59304f2..150f282 100644
--- a/src/QBar/Blocks/Utils.hs
+++ b/src/QBar/Blocks/Utils.hs
@@ -2,7 +2,7 @@
 
 module QBar.Blocks.Utils where
 
-import Control.Exception (IOException, catch)
+import Control.Exception (SomeException, catch)
 import qualified Data.Attoparsec.Text.Lazy as AT
 import qualified Data.Text.Lazy as T
 import qualified Data.Text.Lazy.IO as TIO
@@ -23,7 +23,7 @@ tryMaybe :: IO a -> IO (Maybe a)
 tryMaybe a = tryMaybe' (Just <$> a)
 
 tryMaybe' :: IO (Maybe a) -> IO (Maybe a)
-tryMaybe' a = catch a (\(_ :: IOException) -> return Nothing)
+tryMaybe' a = catch a $ \(_ :: SomeException) -> return Nothing
 
 parseFile :: FilePath -> AT.Parser a -> IO (Maybe a)
 parseFile path parser = tryMaybe' $ do
-- 
GitLab