diff options
Diffstat (limited to 'community/xmobar/0001-Update-usage-of-catch-to-catchIOError-since-catch-ha.patch')
-rw-r--r-- | community/xmobar/0001-Update-usage-of-catch-to-catchIOError-since-catch-ha.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/community/xmobar/0001-Update-usage-of-catch-to-catchIOError-since-catch-ha.patch b/community/xmobar/0001-Update-usage-of-catch-to-catchIOError-since-catch-ha.patch new file mode 100644 index 000000000..d4508c916 --- /dev/null +++ b/community/xmobar/0001-Update-usage-of-catch-to-catchIOError-since-catch-ha.patch @@ -0,0 +1,34 @@ +From b7345a790e8026a2075ce636ac377d8f049b4b7c Mon Sep 17 00:00:00 2001 +From: Thomas Dziedzic <gostrc@gmail.com> +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 + |