module ErrUtils (
Error(..), Warning(..), Message(..),
addErrLoc,
- addShortErrLocLine,
+ addShortErrLocLine, addShortWarnLocLine,
dontAddErrLoc,
pprBagOfErrors,
ghcExit
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 ':'])