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).
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