ErrUtils: Ensure timing dumps are always output on one line
authorBen Gamari <ben@smart-cactus.org>
Wed, 22 Nov 2017 03:59:28 +0000 (22:59 -0500)
committerBen Gamari <ben@smart-cactus.org>
Wed, 22 Nov 2017 04:00:34 +0000 (23:00 -0500)
This output is supposed to be machine-readable; having random line-breaks
defeats this.

compiler/main/ErrUtils.hs

index 43eb925..13ff017 100644 (file)
@@ -646,6 +646,7 @@ withTiming getDFlags what force_result action
                            <+> text "megabytes")
 
                   liftIO $ dumpIfSet_dyn dflags Opt_D_dump_timings ""
+                      $ text $ showSDocOneLine dflags
                       $ hsep [ what <> colon
                              , text "alloc=" <> ppr alloc
                              , text "time=" <> doublePrec 3 time