X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FErrUtils.lhs;h=edf7a30c8265305fff1604656993b7d756ce3742;hp=e50ded59a7c0d126b172387a56a99374f41a10bb;hb=5cf27e8f1731c52fe63a5b9615f927484164c61b;hpb=68afb16743cafd5b7495771d359891c6dfc5a186 diff --git a/ghc/compiler/main/ErrUtils.lhs b/ghc/compiler/main/ErrUtils.lhs index e50ded5..edf7a30 100644 --- a/ghc/compiler/main/ErrUtils.lhs +++ b/ghc/compiler/main/ErrUtils.lhs @@ -9,7 +9,7 @@ module ErrUtils ( Error(..), Warning(..), Message(..), addErrLoc, - addShortErrLocLine, + addShortErrLocLine, addShortWarnLocLine, dontAddErrLoc, pprBagOfErrors, ghcExit @@ -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 ':'])