Commit a7461b4a authored by Ian Lynagh's avatar Ian Lynagh

Remove the haskell98 dep from more lib tests

parent d470a4ca
-- !!! Test getCPUTime
import IO
import CPUTime
import System.CPUTime
import System.IO
main :: IO ()
main = do
......
import System (exitWith, ExitCode(..))
import System.Exit (exitWith, ExitCode(..))
main = exitWith (ExitFailure 42)
import System (getProgName, getArgs)
import System.Environment (getProgName, getArgs)
main =
getProgName >>= \ argv0 ->
......
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
......
-- 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 ->
......
-- 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 ->
......
......@@ -5,7 +5,7 @@
module Main where
import Char
import Data.Char
lex' str = do
putStr ("lex " ++ str ++ " = ")
......
-- !!! tests for large character values in literals
import Char
import Data.Char
main = do
print (ord '\xffff')
print (ord '\o7777')
......
module Main(main) where
import Random
import System.Random
tstRnd rng = checkRange rng (genRnd 50 rng)
......
import Ratio
import Data.Ratio
-- !!! Test that (%) has the right fixity
main = print (2^3%5)
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