Add stage2/ghci to ghc-api's import list.
[ghc-hetmet.git] / ghc / misc / examples / io / io005 / Main.hs
1 import System (system, ExitCode(..), exitWith)
2
3 main = 
4     system "cat dog 1>/dev/null 2>&1" >>= \ ec ->
5     case ec of
6         ExitSuccess   -> putStr "What?!?\n" >> fail (userError "dog succeeded")
7         ExitFailure _ ->
8             system "cat Main.hs 2>/dev/null" >>= \ ec ->
9             case ec of
10                 ExitSuccess   -> exitWith ExitSuccess
11                 ExitFailure _ -> putStr "What?!?\n" >> fail (userError "cat failed")