X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FErrUtils.lhs;h=c0d0e7108f92dde5e2f26950158e84b89721d468;hb=26741ec416bae2c502ef00a2ba0e79050a32cb67;hp=e50ded59a7c0d126b172387a56a99374f41a10bb;hpb=a77abe6a30ea2763cfa1c0ca83cdce9b7200ced2;p=ghc-hetmet.git diff --git a/ghc/compiler/main/ErrUtils.lhs b/ghc/compiler/main/ErrUtils.lhs index e50ded5..c0d0e71 100644 --- a/ghc/compiler/main/ErrUtils.lhs +++ b/ghc/compiler/main/ErrUtils.lhs @@ -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 ':'])