import System ( ExitCode(..), exitWith )
import DATA_IOREF
import IO ( hPutStrLn, stderr )
+import DYNAMIC ( TyCon, mkTyCon, Typeable(..), mkTyConApp )
-- -----------------------------------------------------------------------------
-- NB Pretty.Doc not SDoc: we deal with the printing style (in ptic
-- whether to qualify an External Name) at the error occurrence
+-- So we can throw these things as exceptions
+errMsgTc :: TyCon
+errMsgTc = mkTyCon "ErrMsg"
+instance Typeable ErrMsg where
+ typeOf _ = mkTyConApp errMsgTc []
+
type WarnMsg = ErrMsg
-- A short (one-line) error message, with context to tell us whether