From 5fcba3734bfe97abd485e9ab5dcc3364d6517abe Mon Sep 17 00:00:00 2001 From: Max DeLiso Date: Thu, 17 Apr 2014 19:15:07 -0700 Subject: fix build on old versions of ghc by qualifying import to avoid conflict --- src/Plugins/Monitors/Weather.hs | 11 ++++++----- 1 file 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 "" 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 -- cgit v1.2.3