X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2FcoreSyn%2FCoreLint.lhs;h=fc25c9a27efa550f03f431a4a348a5a7db7af61c;hb=2f0d9b271c16303f1f7f97b35df721fbbebd1cae;hp=60ddc5cb9b10cd0f1f238711b557db7f405cbdbf;hpb=0aa7f2eed099a173f403de9386cf50cc313022ce;p=ghc-hetmet.git diff --git a/ghc/compiler/coreSyn/CoreLint.lhs b/ghc/compiler/coreSyn/CoreLint.lhs index 60ddc5c..fc25c9a 100644 --- a/ghc/compiler/coreSyn/CoreLint.lhs +++ b/ghc/compiler/coreSyn/CoreLint.lhs @@ -38,7 +38,8 @@ import Type ( Type, tyVarsOfType, coreEqType, getTvSubstEnv, getTvInScope ) import TyCon ( isPrimTyCon ) import BasicTypes ( RecFlag(..), Boxity(..), isNonRec ) -import CmdLineOpts +import StaticFlags ( opt_PprStyle_Debug ) +import DynFlags ( DynFlags, DynFlag(..), dopt ) import Outputable #ifdef DEBUG @@ -65,8 +66,8 @@ endPass dflags pass_name dump_flag binds = do -- Report result size if required -- This has the side effect of forcing the intermediate to be evaluated - debugTraceMsg dflags $ - " Result size = " ++ show (coreBindsSize binds) + debugTraceMsg dflags 2 $ + (text " Result size =" <+> int (coreBindsSize binds)) -- Report verbosely, if required dumpIfSet_core dflags dump_flag pass_name (pprCoreBindings binds) @@ -103,9 +104,9 @@ Outstanding issues: -- -- Things are *not* OK if: -- - -- * Unsaturated type app before specialisation has been done; + -- * Unsaturated type app before specialisation has been done; -- - -- * Oversaturated type app after specialisation (eta reduction + -- * Oversaturated type app after specialisation (eta reduction -- may well be happening...); \begin{code} @@ -119,7 +120,7 @@ lintCoreBindings dflags whoDunnit binds = case (initL (lint_binds binds)) of Nothing -> showPass dflags ("Core Linted result of " ++ whoDunnit) Just bad_news -> printDump (display bad_news) >> - ghcExit 1 + ghcExit dflags 1 where -- Put all the top-level binders in scope at the start -- This is because transformation rules can bring something