summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMax DeLiso <maxdeliso@gmail.com>2014-04-17 19:15:07 -0700
committerMax DeLiso <maxdeliso@gmail.com>2014-04-17 19:15:07 -0700
commit5fcba3734bfe97abd485e9ab5dcc3364d6517abe (patch)
tree636fce977816b57a955d9f0e22ea1892cfe02941
parentd8229abe21cae682a66a13efcbd66317519b0eb7 (diff)
downloadxmobar-5fcba3734bfe97abd485e9ab5dcc3364d6517abe.tar.gz
xmobar-5fcba3734bfe97abd485e9ab5dcc3364d6517abe.tar.bz2
fix build on old versions of ghc by qualifying import to avoid conflict
-rw-r--r--src/Plugins/Monitors/Weather.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Plugins/Monitors/Weather.hs b/src/Plugins/Monitors/Weather.hs
index f2cc131..dfc421e 100644
--- a/src/Plugins/Monitors/Weather.hs
+++ b/src/Plugins/Monitors/Weather.hs
@@ -16,7 +16,8 @@ module Plugins.Monitors.Weather where
import Plugins.Monitors.Common
-import Control.Exception (catch, IOException)
+import qualified Control.Exception as CE
+
import Network.HTTP
import Text.ParserCombinators.Parsec
@@ -133,8 +134,8 @@ stationUrl station = defUrl ++ station ++ ".TXT"
getData :: String -> IO String
getData station = do
let request = getRequest (stationUrl station)
- catch (simpleHTTP request >>= getResponseBody) errHandler
- where errHandler :: IOException -> IO String
+ CE.catch (simpleHTTP request >>= getResponseBody) errHandler
+ where errHandler :: CE.IOException -> IO String
errHandler _ = return "<Could not retrieve data>"
formatWeather :: [WeatherInfo] -> Monitor String
@@ -154,8 +155,8 @@ weatherReady :: [String] -> Monitor Bool
weatherReady str = do
let station = head str
request = headRequest (stationUrl station)
- io $ catch (simpleHTTP request >>= checkResult) errHandler
- where errHandler :: IOException -> IO Bool
+ io $ CE.catch (simpleHTTP request >>= checkResult) errHandler
+ where errHandler :: CE.IOException -> IO Bool
errHandler _ = return False
checkResult result = do
case result of