- | not flag = return ()
- | otherwise = printDump dump
- where
- dump = vcat [text "",
- line <+> text hdr <+> line,
- doc,
- text ""]
- line = text (take 20 (repeat '='))
+ | not flag = return ()
+ | otherwise = printDump (dump hdr doc)
+
+dumpIfSet_core :: DynFlags -> DynFlag -> String -> SDoc -> IO ()
+dumpIfSet_core dflags flag hdr doc
+ | dopt flag dflags
+ || verbosity dflags >= 4
+ || dopt Opt_D_verbose_core2core dflags = printDump (dump hdr doc)
+ | otherwise = return ()
+
+dumpIfSet_dyn :: DynFlags -> DynFlag -> String -> SDoc -> IO ()
+dumpIfSet_dyn dflags flag hdr doc
+ | dopt flag dflags || verbosity dflags >= 4 = printDump (dump hdr doc)
+ | otherwise = return ()
+
+dump hdr doc
+ = vcat [text "",
+ line <+> text hdr <+> line,
+ doc,
+ text ""]
+ where
+ line = text (take 20 (repeat '='))