X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FsimplCore%2FSimplMonad.lhs;h=39fb7180bee5f3c02b104440ce4a1f688773e0a6;hb=f07f25fdbac2b885aea6aa62c0326840c85f7b59;hp=657b84b8d6a090f4c758431e1838aafb397cf1e5;hpb=15bef2b43ef7c90cb2a981a1a43b60bf878e64dc;p=ghc-hetmet.git diff --git a/compiler/simplCore/SimplMonad.lhs b/compiler/simplCore/SimplMonad.lhs index 657b84b..39fb718 100644 --- a/compiler/simplCore/SimplMonad.lhs +++ b/compiler/simplCore/SimplMonad.lhs @@ -8,7 +8,7 @@ module SimplMonad ( -- The monad SimplM, initSmpl, - getDOptsSmpl, getRules, getFamEnvs, + getDOptsSmpl, getSimplRules, getFamEnvs, -- Unique supply MonadUnique(..), newId, @@ -21,7 +21,7 @@ module SimplMonad ( -- Switch checker SwitchChecker, SwitchResult(..), getSimplIntSwitch, - isAmongSimpl, intSwitchSet, switchIsOn + isAmongSimpl, intSwitchSet, switchIsOn, allOffSwitchChecker ) where import Id ( Id, mkSysLocal ) @@ -130,8 +130,8 @@ instance MonadUnique SimplM where getDOptsSmpl :: SimplM DynFlags getDOptsSmpl = SM (\st_env us sc -> (st_flags st_env, us, sc)) -getRules :: SimplM RuleBase -getRules = SM (\st_env us sc -> (st_rules st_env, us, sc)) +getSimplRules :: SimplM RuleBase +getSimplRules = SM (\st_env us sc -> (st_rules st_env, us, sc)) getFamEnvs :: SimplM (FamInstEnv, FamInstEnv) getFamEnvs = SM (\st_env us sc -> (st_fams st_env, us, sc)) @@ -243,10 +243,10 @@ pprSimplCount VerySimplZero = ptext (sLit "Total ticks: ZERO!") pprSimplCount VerySimplNonZero = ptext (sLit "Total ticks: NON-ZERO!") pprSimplCount (SimplCount { ticks = tks, details = dts, log1 = l1, log2 = l2 }) = vcat [ptext (sLit "Total ticks: ") <+> int tks, - text "", + blankLine, pprTickCounts (fmToList dts), if verboseSimplStats then - vcat [text "", + vcat [blankLine, ptext (sLit "Log (most recent first)"), nest 4 (vcat (map ppr l1) $$ vcat (map ppr l2))] else empty @@ -419,6 +419,9 @@ data SwitchResult | SwString FastString -- nothing or a String | SwInt Int -- nothing or an Int +allOffSwitchChecker :: SwitchChecker +allOffSwitchChecker _ = SwBool False + isAmongSimpl :: [SimplifierSwitch] -> SimplifierSwitch -> SwitchResult isAmongSimpl on_switches -- Switches mentioned later occur *earlier* -- in the list; defaults right at the end.