From e90c9c0850e4bbee6ceeba05d93b5671cb150e7f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 12 Sep 2007 09:09:49 +0200 Subject: Parse the temperature separately in Celcius and Fahrenheit. Parse the pressure in hPa. Generalize showWithColors to (Num a, Ord a) so it works for both Int's and Float's. Use an Int for temperature, pressure, and relative humidity. darcs-hash:20070912070949-740ef-0e79d57888c1519e1324d06b17fe2fa0d3d0fb2d.gz --- Plugins/Monitors/Common.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Plugins/Monitors/Common.hs') diff --git a/Plugins/Monitors/Common.hs b/Plugins/Monitors/Common.hs index 5177fb8..7887e14 100644 --- a/Plugins/Monitors/Common.hs +++ b/Plugins/Monitors/Common.hs @@ -265,7 +265,7 @@ setColor str s = Just c -> return $ "" ++ str ++ "" -showWithColors :: (Float -> String) -> Float -> Monitor String +showWithColors :: (Num a, Ord a) => (a -> String) -> a -> Monitor String showWithColors f x = do h <- getConfigValue high l <- getConfigValue low -- cgit v1.2.3