---!!! test various I/O Requests
+-- !!! test various I/O Requests
--
--
import IO
import System
-import IOBase (trace)
---import Trace ToDo: get this via GlaExts -- SOF
+import IOExts (trace)
+import RegexString
+import Maybe
main = do
prog <- getProgName
- hPutStr stderr (shows prog "\n")
+ let Just (name:_) = matchRegex (mkRegex ".*(cg025.bin)") prog
+ hPutStr stderr (shows name "\n")
args <- getArgs
hPutStr stderr (shows args "\n")
path <- getEnv "PATH"
- hPutStr stderr (shows path "\n")
+ hPutStr stderr ("GOT PATH\n")
stdin_txt <- getContents
putStr stdin_txt
file_cts <- readFile (head args)
hPutStr stderr file_cts
trace "hello, trace" $
- catch (getEnv "__WURBLE__" >> return ()) (\ e -> error "hello, error\n")
+ catch (getEnv "__WURBLE__" >> return ()) (\ e -> error "hello, error")