[project @ 2005-08-02 14:53:26 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / ErrUtils.lhs
index 12d3e43..50db73c 100644 (file)
@@ -39,7 +39,7 @@ import StaticFlags    ( opt_ErrorSpans )
 import System          ( ExitCode(..), exitWith )
 import DATA_IOREF
 import IO              ( hPutStrLn, stderr )
-import DYNAMIC         ( TyCon, mkTyCon, Typeable(..), mkTyConApp )
+import DYNAMIC
 
 
 -- -----------------------------------------------------------------------------
@@ -75,8 +75,13 @@ data ErrMsg = ErrMsg {
 -- So we can throw these things as exceptions
 errMsgTc :: TyCon
 errMsgTc = mkTyCon "ErrMsg"
+{-# NOINLINE errMsgTc #-}
 instance Typeable ErrMsg where
+#if __GLASGOW_HASKELL__ < 603
+  typeOf _ = mkAppTy errMsgTc []
+#else
   typeOf _ = mkTyConApp errMsgTc []
+#endif
 
 type WarnMsg = ErrMsg