import IO ( hPutStr, hPutStrLn, stdout )
-import CmdLineOpts ( DynFlags, dopt_D_show_passes, dopt_DoCoreLinting,
- opt_PprStyle_Debug )
import CoreSyn
import Rules ( RuleBase, pprRuleBase )
import CoreFVs ( idFreeVars, mustHaveLocalBinding )
isUnboxedTupleType,
hasMoreBoxityInfo
)
-import TyCon ( TyCon, isPrimTyCon, tyConDataCons )
+import TyCon ( isPrimTyCon )
import BasicTypes ( RecFlag(..), isNonRec )
+import CmdLineOpts
import Maybe
import Outputable
\begin{code}
beginPass :: DynFlags -> String -> IO ()
beginPass dflags pass_name
- | dopt_D_show_passes dflags
+ | dopt Opt_D_show_passes dflags
= hPutStrLn stdout ("*** " ++ pass_name)
| otherwise
= return ()
-- Report result size if required
-- This has the side effect of forcing the intermediate to be evaluated
- if dopt_D_show_passes dflags then
+ if dopt Opt_D_show_passes dflags then
hPutStrLn stdout (" Result size = " ++ show (coreBindsSize binds))
else
return ()
lintCoreBindings :: DynFlags -> String -> [CoreBind] -> IO ()
lintCoreBindings dflags whoDunnit binds
- | not (dopt_DoCoreLinting dflags)
+ | not (dopt Opt_DoCoreLinting dflags)
= return ()
lintCoreBindings dflags whoDunnit binds
returnL ()
lint_bind (NonRec bndr rhs) = lintSingleBinding NonRecursive (bndr,rhs)
- done_lint = doIfSet_dyn dflags dopt_D_show_passes
+ done_lint = doIfSet_dyn dflags Opt_D_show_passes
(hPutStr stdout ("*** Core Linted result of " ++ whoDunnit ++ "\n"))
warn warnings
= vcat [
-> (Maybe Message, Maybe Message) -- (Nothing,_) => OK
lintUnfolding dflags locn vars expr
- | not (dopt_DoCoreLinting dflags)
+ | not (dopt Opt_DoCoreLinting dflags)
= (Nothing, Nothing)
| otherwise