From 3e897e71c289dcfe6d1a039e6e048c82863006c0 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sat, 5 May 2012 21:34:02 +0200 Subject: Duplicate instance definition (github issue #45) --- src/Plugins/Monitors/CoreCommon.hs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Plugins/Monitors/CoreCommon.hs b/src/Plugins/Monitors/CoreCommon.hs index f866d31..a18697f 100644 --- a/src/Plugins/Monitors/CoreCommon.hs +++ b/src/Plugins/Monitors/CoreCommon.hs @@ -25,19 +25,10 @@ import Data.Maybe import Plugins.Monitors.Common import System.Directory -#ifdef GHC6 -import Control.Monad.Reader - -instance (Monad f, Applicative f) => Applicative (ReaderT r f) where - pure a = ReaderT $ const (pure a) - f <*> a = ReaderT $ \r -> - ((runReaderT f r) <*> (runReaderT a r)) -#endif - checkedDataRetrieval :: (Ord a, Num a) => String -> [String] -> Maybe (String, String -> Int) -> (Double -> a) -> (a -> String) -> Monitor String -checkedDataRetrieval msg path lbl trans fmt = liftM (maybe msg id) $ +checkedDataRetrieval msg path lbl trans fmt = liftM (fromMaybe msg) $ retrieveData path lbl trans fmt retrieveData :: (Ord a, Num a) -- cgit v1.2.3