From 6037e956e9b37b1ef2221de04f2dfb72074d1729 Mon Sep 17 00:00:00 2001
From: simonm <unknown>
Date: Thu, 4 Feb 1999 11:54:08 +0000
Subject: [PATCH] [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).

---
 ghc/lib/std/PrelMain.lhs | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/ghc/lib/std/PrelMain.lhs b/ghc/lib/std/PrelMain.lhs
index 4581ea3623f8..05aae478149f 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
-- 
GitLab