From: simonmar Date: Tue, 27 May 2003 14:15:40 +0000 (+0000) Subject: [project @ 2003-05-27 14:15:40 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~856 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=3fe27db88139e65f2a153c91b323cb43fd52185e [project @ 2003-05-27 14:15:40 by simonmar] Use ErrUtils.showPass for printing the '*** Core Linted...' message instead of rolling our own (also has the effect of sending this to stderr for consistency). Tidy up unused imports while I'm here. --- diff --git a/ghc/compiler/coreSyn/CoreLint.lhs b/ghc/compiler/coreSyn/CoreLint.lhs index 15146ec..7470294 100644 --- a/ghc/compiler/coreSyn/CoreLint.lhs +++ b/ghc/compiler/coreSyn/CoreLint.lhs @@ -12,8 +12,6 @@ module CoreLint ( #include "HsVersions.h" -import IO ( hPutStr, hPutStrLn, stdout ) - import CoreSyn import CoreFVs ( idFreeVars ) import CoreUtils ( findDefault, exprOkForSpeculation, coreBindsSize, mkPiType ) @@ -26,7 +24,7 @@ import VarSet import Subst ( substTyWith ) import Name ( getSrcLoc ) import PprCore -import ErrUtils ( doIfSet, dumpIfSet_core, ghcExit, Message, showPass, +import ErrUtils ( dumpIfSet_core, ghcExit, Message, showPass, addErrLocHdrLine ) import SrcLoc ( SrcLoc, noSrcLoc ) import Type ( Type, tyVarsOfType, eqType, @@ -40,9 +38,10 @@ import TyCon ( isPrimTyCon ) import BasicTypes ( RecFlag(..), isNonRec ) import CmdLineOpts import Maybe -import Util ( notNull ) import Outputable +import IO ( hPutStrLn, stderr ) + infixr 9 `thenL`, `seqL` \end{code} @@ -116,7 +115,7 @@ lintCoreBindings dflags whoDunnit binds lintCoreBindings dflags whoDunnit binds = case (initL (lint_binds binds)) of - Nothing -> done_lint + Nothing -> showPass dflags ("Core Linted result of " ++ whoDunnit) Just bad_news -> printDump (display bad_news) >> ghcExit 1 where @@ -130,9 +129,6 @@ lintCoreBindings dflags whoDunnit binds returnL () lint_bind (NonRec bndr rhs) = lintSingleBinding NonRecursive (bndr,rhs) - done_lint = doIfSet (verbosity dflags >= 2) - (hPutStr stdout ("*** Core Linted result of " ++ whoDunnit ++ "\n")) - display bad_news = vcat [ text ("*** Core Lint Errors: in result of " ++ whoDunnit ++ " ***"), bad_news,