[project @ 1996-07-25 21:02:03 by partain]
[nofib.git] / GHC_ONLY / cg025 / Main.hs
1 --!!! test various I/O Requests
2 --
3 --
4 import IO
5 import System
6 import Trace
7
8 main = do
9 prog <- getProgName
10 hPutStr stderr (shows prog "\n")
11 args <- getArgs
12 hPutStr stderr (shows args "\n")
13 path <- getEnv "PATH"
14 hPutStr stderr (shows path "\n")
15 stdin_txt <- getContents
16 putStr stdin_txt
17 file_cts <- readFile (head args)
18 hPutStr stderr file_cts
19 trace "hello, trace" $
20 catch (getEnv "__WURBLE__" >> return ()) (\ e -> error "hello, error\n")