diff options
10 files changed, 15 insertions, 13 deletions
diff --git a/testsuite/tests/ghc-regress/lib/CPUTime/CPUTime001.hs b/testsuite/tests/ghc-regress/lib/CPUTime/CPUTime001.hs index 807bbb7895..6c43c57ec5 100644 --- a/testsuite/tests/ghc-regress/lib/CPUTime/CPUTime001.hs +++ b/testsuite/tests/ghc-regress/lib/CPUTime/CPUTime001.hs @@ -1,7 +1,7 @@ -- !!! Test getCPUTime -import IO -import CPUTime +import System.CPUTime +import System.IO main :: IO () main = do diff --git a/testsuite/tests/ghc-regress/lib/System/exitWith001.hs b/testsuite/tests/ghc-regress/lib/System/exitWith001.hs index 69d2221743..38dc38a9d5 100644 --- a/testsuite/tests/ghc-regress/lib/System/exitWith001.hs +++ b/testsuite/tests/ghc-regress/lib/System/exitWith001.hs @@ -1,3 +1,3 @@ -import System (exitWith, ExitCode(..)) +import System.Exit (exitWith, ExitCode(..)) main = exitWith (ExitFailure 42) diff --git a/testsuite/tests/ghc-regress/lib/System/getArgs001.hs b/testsuite/tests/ghc-regress/lib/System/getArgs001.hs index 93fff71be5..4b8df9101b 100644 --- a/testsuite/tests/ghc-regress/lib/System/getArgs001.hs +++ b/testsuite/tests/ghc-regress/lib/System/getArgs001.hs @@ -1,4 +1,4 @@ -import System (getProgName, getArgs) +import System.Environment (getProgName, getArgs) main = getProgName >>= \ argv0 -> diff --git a/testsuite/tests/ghc-regress/lib/System/getEnv001.hs b/testsuite/tests/ghc-regress/lib/System/getEnv001.hs index a1a02a73cb..745f8eaa7f 100644 --- a/testsuite/tests/ghc-regress/lib/System/getEnv001.hs +++ b/testsuite/tests/ghc-regress/lib/System/getEnv001.hs @@ -1,12 +1,12 @@ -import System (getEnv) -import IO ( isDoesNotExistError ) +import System.Environment (getEnv) +import System.IO.Error (catchIOError, isDoesNotExistError) main :: IO () main = do term <- getEnv "PATH" putStrLn "Got $PATH" - fish <- getEnv "One fish, two fish, red fish, blue fish" `catch` getEnv_except + fish <- getEnv "One fish, two fish, red fish, blue fish" `catchIOError` getEnv_except putStrLn fish getEnv_except :: IOError -> IO String diff --git a/testsuite/tests/ghc-regress/lib/System/system001.hs b/testsuite/tests/ghc-regress/lib/System/system001.hs index f6a8b0d274..4237d526af 100644 --- a/testsuite/tests/ghc-regress/lib/System/system001.hs +++ b/testsuite/tests/ghc-regress/lib/System/system001.hs @@ -1,6 +1,7 @@ -- Not run on mingw, because of /dev/null use -import System (system, ExitCode(..), exitWith) +import System.Cmd (system) +import System.Exit (ExitCode(..), exitWith) main = system "cat dog 1>/dev/null 2>&1" >>= \ ec -> diff --git a/testsuite/tests/ghc-regress/lib/System/system001.stdout b/testsuite/tests/ghc-regress/lib/System/system001.stdout index f6a8b0d274..4237d526af 100644 --- a/testsuite/tests/ghc-regress/lib/System/system001.stdout +++ b/testsuite/tests/ghc-regress/lib/System/system001.stdout @@ -1,6 +1,7 @@ -- Not run on mingw, because of /dev/null use -import System (system, ExitCode(..), exitWith) +import System.Cmd (system) +import System.Exit (ExitCode(..), exitWith) main = system "cat dog 1>/dev/null 2>&1" >>= \ ec -> diff --git a/testsuite/tests/ghc-regress/lib/should_run/char001.hs b/testsuite/tests/ghc-regress/lib/should_run/char001.hs index 6127bd7df6..2fb0edce0f 100644 --- a/testsuite/tests/ghc-regress/lib/should_run/char001.hs +++ b/testsuite/tests/ghc-regress/lib/should_run/char001.hs @@ -5,7 +5,7 @@ module Main where -import Char +import Data.Char lex' str = do putStr ("lex " ++ str ++ " = ") diff --git a/testsuite/tests/ghc-regress/lib/should_run/char002.hs b/testsuite/tests/ghc-regress/lib/should_run/char002.hs index 9ed2d3daa7..60b8b03cda 100644 --- a/testsuite/tests/ghc-regress/lib/should_run/char002.hs +++ b/testsuite/tests/ghc-regress/lib/should_run/char002.hs @@ -1,5 +1,5 @@ -- !!! tests for large character values in literals -import Char +import Data.Char main = do print (ord '\xffff') print (ord '\o7777') diff --git a/testsuite/tests/ghc-regress/lib/should_run/rand001.hs b/testsuite/tests/ghc-regress/lib/should_run/rand001.hs index f514325829..3567ae0dd8 100644 --- a/testsuite/tests/ghc-regress/lib/should_run/rand001.hs +++ b/testsuite/tests/ghc-regress/lib/should_run/rand001.hs @@ -1,6 +1,6 @@ module Main(main) where -import Random +import System.Random tstRnd rng = checkRange rng (genRnd 50 rng) diff --git a/testsuite/tests/ghc-regress/lib/should_run/ratio001.hs b/testsuite/tests/ghc-regress/lib/should_run/ratio001.hs index 624fd6930d..4d65dfbccf 100644 --- a/testsuite/tests/ghc-regress/lib/should_run/ratio001.hs +++ b/testsuite/tests/ghc-regress/lib/should_run/ratio001.hs @@ -1,4 +1,4 @@ -import Ratio +import Data.Ratio -- !!! Test that (%) has the right fixity main = print (2^3%5) |