Commit c6484f0b authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix 'unused X' warnings

This removes some unused functions and imports to cleanup the warnings.
parent 78694255
......@@ -71,10 +71,6 @@ size = IntMap.size
find :: Key -> Container a -> a
find k c = c IntMap.! k
-- | Locate a keyin the map returning a default value if not existing.
findWithDefault :: a -> Key -> Container a -> a
findWithDefault = IntMap.findWithDefault
-- | Add or update one element to the map.
add :: Key -> a -> Container a -> Container a
add k v c = IntMap.insert k v c
......@@ -95,14 +91,6 @@ keys = IntMap.keys
fromAssocList :: [(Key, a)] -> Container a
fromAssocList = IntMap.fromList
-- | Create a map from an association list with a combining function.
fromListWith :: (a -> a -> a) -> [(Key, a)] -> Container a
fromListWith = IntMap.fromListWith
-- | Fold over the values of the map.
fold :: (a -> b -> b) -> b -> Container a -> b
fold = IntMap.fold
-- | Add or update two elements of the map.
addTwo :: Key -> a -> Key -> a -> Container a -> Container a
addTwo k1 v1 k2 v2 c = add k1 v1 $ add k2 v2 c
......
......@@ -38,13 +38,9 @@ module Ganeti.HTools.Utils
import Data.List
import Control.Monad
import System
import System.IO
import qualified Text.JSON as J
import Text.Printf (printf)
import Ganeti.HTools.Types
import Debug.Trace
-- * Debug functions
......@@ -69,10 +65,6 @@ sepSplit sep s
where (x, xs) = break (== sep) s
ys = drop 1 xs
-- | Partial application of sepSplit to @'.'@
commaSplit :: String -> [String]
commaSplit = sepSplit ','
-- | Simple version of 'fst' for a triple
fst3 :: (a, b, c) -> a
fst3 (a, _, _) = a
......
......@@ -36,7 +36,6 @@ import qualified System
import Text.Printf (printf)
import qualified Ganeti.HTools.Container as Container
import qualified Ganeti.HTools.Cluster as Cluster
import qualified Ganeti.HTools.Node as Node
import qualified Ganeti.HTools.Instance as Instance
......
......@@ -27,7 +27,7 @@ module Main (main) where
import Data.List
import Data.Function
import Data.Maybe (isJust, fromJust, fromMaybe, isNothing)
import Data.Maybe (isJust, fromJust, isNothing)
import Monad
import System
import System.IO
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment