Commit 7345b69b authored by Iustin Pop's avatar Iustin Pop
Browse files

htools: adjust imports for newer compilers



While testing with ghc 7.2, I saw that some imports we are using are
very old (from ghc 6.8 time), even though current libraries are using
different names.

We fix this and bump minimum documented version to ghc 6.12, as I
don't have 6.10 to test anymore (possibly still works with that
version, but better safe - both Ubuntu Lucid and Debian Squeeze ship
with 6.12 nowadays).
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 0e82dcf9
......@@ -63,7 +63,7 @@ on bigger deployments (they give you automatic instance placement,
cluster balancing, etc.), then you need to have a Haskell compiler
installed. More specifically:
- `GHC <http://www.haskell.org/ghc/>`_ version 6.10 or higher
- `GHC <http://www.haskell.org/ghc/>`_ version 6.12 or higher
- or even better, `The Haskell Platform
<http://hackage.haskell.org/platform/>`_ which gives you a simple way
to bootstrap Haskell
......
......@@ -83,7 +83,7 @@ import qualified Data.Version
import System.Console.GetOpt
import System.IO
import System.Info
import System
import System.Exit
import Text.Printf (printf, hPrintf)
import qualified Ganeti.HTools.Version as Version(version)
......
......@@ -37,7 +37,7 @@ import Control.Monad
import Data.Maybe (isJust, fromJust)
import System.FilePath
import System.IO
import System
import System.Exit
import Text.Printf (hPrintf)
import qualified Ganeti.HTools.Luxi as Luxi
......
......@@ -35,7 +35,7 @@ import Data.List
import Control.Monad
import Text.JSON (JSObject, JSValue(JSArray),
makeObj, encodeStrict, decodeStrict, fromJSObject, showJSON)
import System (exitWith, ExitCode(..))
import System.Exit
import System.IO
import qualified Ganeti.HTools.Cluster as Cluster
......
......@@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
module Ganeti.HTools.Program.Hail (main) where
import Control.Monad
import System.Environment (getArgs)
import System.IO
import qualified System
import qualified Ganeti.HTools.Cluster as Cluster
......@@ -51,7 +51,7 @@ options =
-- | Main function.
main :: IO ()
main = do
cmd_args <- System.getArgs
cmd_args <- getArgs
(opts, args) <- parseOpts cmd_args "hail" options
let shownodes = optShowNodes opts
......
......@@ -31,11 +31,11 @@ import Control.Monad
import Data.List
import Data.Maybe (isJust, isNothing, fromJust)
import Data.IORef
import System (exitWith, ExitCode(..))
import System.Environment (getArgs)
import System.Exit
import System.IO
import System.Posix.Process
import System.Posix.Signals
import qualified System
import Text.Printf (printf, hPrintf)
......@@ -340,7 +340,7 @@ checkNeedRebalance opts ini_cv = do
-- | Main function.
main :: IO ()
main = do
cmd_args <- System.getArgs
cmd_args <- getArgs
(opts, args) <- parseOpts cmd_args "hbal" options
unless (null args) $ do
......
......@@ -27,10 +27,10 @@ module Ganeti.HTools.Program.Hscan (main) where
import Control.Monad
import Data.Maybe (isJust, fromJust, fromMaybe)
import System (exitWith, ExitCode(..))
import System.Environment (getArgs)
import System.Exit
import System.IO
import System.FilePath
import qualified System
import Text.Printf (printf)
......@@ -127,7 +127,7 @@ writeDataInner nlen name opts cdata fixdata = do
-- | Main function.
main :: IO ()
main = do
cmd_args <- System.getArgs
cmd_args <- getArgs
(opts, clusters) <- parseOpts cmd_args "hscan" options
let local = "LOCAL"
......
......@@ -30,9 +30,9 @@ import Data.Char (toUpper, isAlphaNum, toLower)
import Data.Function (on)
import Data.List
import Data.Ord (comparing)
import System (exitWith, ExitCode(..))
import System.Exit
import System.IO
import qualified System
import System.Environment (getArgs)
import Text.Printf (printf, hPrintf)
......@@ -383,7 +383,7 @@ runAllocation cdata stop_allocation actual_result spec mode opts = do
-- | Main function.
main :: IO ()
main = do
cmd_args <- System.getArgs
cmd_args <- getArgs
(opts, args) <- parseOpts cmd_args "hspace" options
unless (null args) $ do
......
......@@ -26,7 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
module Main (main) where
import Data.Char (toLower)
import System
import System.Environment
import System.Exit
import System.IO
import Ganeti.HTools.Utils
......
......@@ -28,11 +28,11 @@ module Main(main) where
import Data.Char
import Data.IORef
import Data.List
import Test.QuickCheck
import System.Console.GetOpt ()
import System.IO
import System.Environment (getArgs)
import System.Exit
import System (getArgs)
import System.IO
import Test.QuickCheck
import Text.Printf
import Ganeti.HTools.QC
......@@ -147,7 +147,7 @@ main :: IO ()
main = do
errs <- newIORef 0
let wrap = map (wrapTest errs)
cmd_args <- System.getArgs
cmd_args <- getArgs
(opts, args) <- parseOpts cmd_args "test" options
tests <- (if null args
then return allTests
......
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