Improve printing for -ddump-deriv
[ghc-hetmet.git] / compiler / main / ErrUtils.lhs
index 15b142b..d0a8a86 100644 (file)
@@ -22,7 +22,7 @@ module ErrUtils (
         mkDumpDoc, dumpSDoc,
 
        --  * Messages during compilation
-       putMsg,
+        putMsg, putMsgWith,
        errorMsg,
        fatalErrorMsg,
        compilationProgressMsg,
@@ -275,6 +275,12 @@ ifVerbose dflags val act
 putMsg :: DynFlags -> Message -> IO ()
 putMsg dflags msg = log_action dflags SevInfo noSrcSpan defaultUserStyle msg
 
+putMsgWith :: DynFlags -> PrintUnqualified -> Message -> IO ()
+putMsgWith dflags print_unqual msg
+  = log_action dflags SevInfo noSrcSpan sty msg
+  where
+    sty = mkUserStyle print_unqual AllTheWay
+
 errorMsg :: DynFlags -> Message -> IO ()
 errorMsg dflags msg = log_action dflags SevError noSrcSpan defaultErrStyle msg