From: simonm Date: Thu, 4 Feb 1999 11:54:08 +0000 (+0000) Subject: [project @ 1999-02-04 11:54:08 by simonm] X-Git-Tag: Approximately_9120_patches~6612 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6037e956e9b37b1ef2221de04f2dfb72074d1729;p=ghc-hetmet.git [project @ 1999-02-04 11:54:08 by simonm] Don't go into an infinite loop for errors generated by hPutStr when outputing an error message. Use writeErrString__ to output all errors (this won't generate a Haskell exception). --- diff --git a/ghc/lib/std/PrelMain.lhs b/ghc/lib/std/PrelMain.lhs index 4581ea3..05aae47 100644 --- a/ghc/lib/std/PrelMain.lhs +++ b/ghc/lib/std/PrelMain.lhs @@ -35,10 +35,7 @@ real_handler :: Exception -> IO () real_handler ex = case ex of ErrorCall s -> reportError s - other -> hPutStr stderr (showsPrec 0 other "\n") >> - _ccall_ stg_exit (1::Int) - --- calls to 'error' are treated slightly differently... + other -> reportError (showsPrec 0 other "\n") reportError :: String -> IO () reportError str = do