From b7345a790e8026a2075ce636ac377d8f049b4b7c Mon Sep 17 00:00:00 2001 From: Thomas Dziedzic Date: Wed, 3 Oct 2012 06:51:21 -0700 Subject: [PATCH] Update usage of catch to catchIOError since catch has been removed from System.IO.Error in ghc 7.6.1 --- src/Plugins/Monitors/Bright.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Plugins/Monitors/Bright.hs b/src/Plugins/Monitors/Bright.hs index 499e5bc..b5ec4c0 100644 --- a/src/Plugins/Monitors/Bright.hs +++ b/src/Plugins/Monitors/Bright.hs @@ -20,6 +20,7 @@ import Data.Char import System.FilePath (()) import System.Posix.Files (fileExist) import System.Console.GetOpt +import System.IO.Error (catchIOError) data BrightOpts = BrightOpts { subDir :: String @@ -101,7 +102,7 @@ readBright files = maxVal <- grab $ (fMax files) return $ (currVal / maxVal) where - grab f = catch (fmap (read . B.unpack) $ B.readFile f)(\_ -> return 0) + grab f = catchIOError (fmap (read . B.unpack) $ B.readFile f)(\_ -> return 0) showHorizontalBar :: Float -> Monitor String -- 1.7.12.2