[project @ 1996-06-26 10:26:00 by partain]
[ghc-hetmet.git] / ghc / compiler / main / ErrUtils.lhs
index e50ded5..c0d0e71 100644 (file)
@@ -7,15 +7,15 @@
 #include "HsVersions.h"
 
 module ErrUtils (
-       Error(..), Warning(..), Message(..),
+       SYN_IE(Error), SYN_IE(Warning), SYN_IE(Message),
        addErrLoc,
-       addShortErrLocLine,
+       addShortErrLocLine, addShortWarnLocLine,
        dontAddErrLoc,
        pprBagOfErrors,
        ghcExit
     ) where
 
-import Ubiq{-uitous-}
+IMP_Ubiq(){-uitous-}
 
 import Bag             ( bagToList )
 import PprStyle                ( PprStyle(..) )
@@ -35,11 +35,16 @@ addErrLoc locn title rest_of_err_msg sty
                       ppChar ':'])
         4 (rest_of_err_msg sty)
 
-addShortErrLocLine :: SrcLoc -> Error -> Error
+addShortErrLocLine, addShortWarnLocLine :: SrcLoc -> Error -> Error
+
 addShortErrLocLine locn rest_of_err_msg sty
   = ppHang (ppBeside (ppr PprForUser locn) (ppChar ':'))
         4 (rest_of_err_msg sty)
 
+addShortWarnLocLine locn rest_of_err_msg sty
+  = ppHang (ppBeside (ppr PprForUser locn) (ppPStr SLIT(":warning:")))
+        4 (rest_of_err_msg sty)
+
 dontAddErrLoc :: String -> Error -> Error
 dontAddErrLoc title rest_of_err_msg sty
   = ppHang (ppBesides [ppStr title, ppChar ':'])