From edb2ea166d227ea7c4bf12b33016ee82ed73543d Mon Sep 17 00:00:00 2001
From: Andrea Rossato <andrea.rossato@ing.unitn.it>
Date: Wed, 11 Jul 2007 17:02:01 +0200
Subject: gettin' rid of Krzysztof's object-oriented attitude...;-)

darcs-hash:20070711150201-d6583-1d4d0c9677671416d80e83de9055bdc48c5dd4ed.gz
---
 Monitors/Batt.hs    | 2 +-
 Monitors/Common.hs  | 6 +++---
 Monitors/Cpu.hs     | 2 +-
 Monitors/Mem.hs     | 2 +-
 Monitors/Net.hs     | 2 +-
 Monitors/Swap.hs    | 2 +-
 Monitors/Weather.hs | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

(limited to 'Monitors')

diff --git a/Monitors/Batt.hs b/Monitors/Batt.hs
index fcc78fd..df288d8 100644
--- a/Monitors/Batt.hs
+++ b/Monitors/Batt.hs
@@ -20,7 +20,7 @@ import System.Posix.Files
 import Monitors.Common
 
 battConfig :: IO MConfig
-battConfig = newConfig
+battConfig = mkMConfig
        "Batt: <left>" -- template
        package        -- package
        ""             -- usage tail?
diff --git a/Monitors/Common.hs b/Monitors/Common.hs
index 390f383..306d46f 100644
--- a/Monitors/Common.hs
+++ b/Monitors/Common.hs
@@ -20,7 +20,7 @@ module Monitors.Common (
                        , Opts (..)
                        , setConfigValue
                        , getConfigValue
-                       , newConfig
+                       , mkMConfig
                        , runMonitor
                        , runM
                        , io
@@ -99,13 +99,13 @@ getConfigValue :: Selector a -> Monitor a
 getConfigValue s =
     sel s
 
-newConfig :: String
+mkMConfig :: String
           -> String
           -> String
           -> [OptDescr Opts]
           -> [String]
           -> IO MConfig
-newConfig tmpl pkg usg args exprts =
+mkMConfig tmpl pkg usg args exprts =
     do lc <- newIORef Nothing
        l <- newIORef 33
        nc <- newIORef Nothing
diff --git a/Monitors/Cpu.hs b/Monitors/Cpu.hs
index d629c14..456add0 100644
--- a/Monitors/Cpu.hs
+++ b/Monitors/Cpu.hs
@@ -18,7 +18,7 @@ import Monitors.Common
 import qualified Data.ByteString.Lazy.Char8 as B
 
 cpuConfig :: IO MConfig
-cpuConfig = newConfig
+cpuConfig = mkMConfig
        "Cpu: <total>"                           -- template
        package                                  -- package
        ""                                       -- usage tail?
diff --git a/Monitors/Mem.hs b/Monitors/Mem.hs
index 4fd6434..b65715d 100644
--- a/Monitors/Mem.hs
+++ b/Monitors/Mem.hs
@@ -17,7 +17,7 @@ module Monitors.Mem where
 import Monitors.Common
 
 memConfig :: IO MConfig
-memConfig = newConfig
+memConfig = mkMConfig
        "Mem: <usedratio>% (<cache>M)" -- template
        package                        -- package
        ""                             -- usage tail?
diff --git a/Monitors/Net.hs b/Monitors/Net.hs
index 646b15e..1582ee2 100644
--- a/Monitors/Net.hs
+++ b/Monitors/Net.hs
@@ -27,7 +27,7 @@ interval :: Int
 interval = 500000
 
 netConfig :: IO MConfig
-netConfig = newConfig
+netConfig = mkMConfig
     "<dev>: <rx>|<tx>"      -- template
     package                 -- package
     "dev"                   -- usage tail?
diff --git a/Monitors/Swap.hs b/Monitors/Swap.hs
index 6cfdbdd..e83b1e0 100644
--- a/Monitors/Swap.hs
+++ b/Monitors/Swap.hs
@@ -19,7 +19,7 @@ import Monitors.Common
 import qualified Data.ByteString.Lazy.Char8 as B
 
 swapConfig :: IO MConfig
-swapConfig = newConfig
+swapConfig = mkMConfig
         "Swap: <usedratio>"                    -- template
         package                                -- package
         ""                                     -- usage tail?
diff --git a/Monitors/Weather.hs b/Monitors/Weather.hs
index 885a9e2..8b3172e 100644
--- a/Monitors/Weather.hs
+++ b/Monitors/Weather.hs
@@ -24,7 +24,7 @@ import Text.ParserCombinators.Parsec
 
 
 weatherConfig :: IO MConfig
-weatherConfig = newConfig
+weatherConfig = mkMConfig
        "<station>: <tempC>C, rh <rh>% (<hour>)" -- template
        package                                  -- package
        "station ID"                             -- usage tail?
-- 
cgit v1.2.3