[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: Add changelog entry for specialised Enum Int64/Word64 instances

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Aug 14 06:01:40 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
c2acc2e4 by Jaro Reinders at 2023-08-14T02:01:35-04:00
Add changelog entry for specialised Enum Int64/Word64 instances

- - - - -
e5fa8d50 by cydparser at 2023-08-14T02:01:36-04:00
Fix -ddump-to-file and -ddump-timings interaction (#20316)

- - - - -
e7288c9b by cydparser at 2023-08-14T02:01:36-04:00
Update release notes (#20316)

- - - - -


4 changed files:

- compiler/GHC/Utils/Error.hs
- docs/users_guide/9.10.1-notes.rst
- libraries/base/changelog.md
- − testsuite/tests/driver/T20316.stderr


Changes:

=====================================
compiler/GHC/Utils/Error.hs
=====================================
@@ -414,7 +414,7 @@ withTiming' :: MonadIO m
             -> m a
 withTiming' logger what force_result prtimings action
   = if logVerbAtLeast logger 2 || logHasDumpFlag logger Opt_D_dump_timings
-    then do whenPrintTimings $
+    then do when printTimingsNotDumpToFile $ liftIO $
               logInfo logger $ withPprStyle defaultUserStyle $
                 text "***" <+> what <> colon
             let ctx = log_default_user_context (logFlags logger)
@@ -432,7 +432,7 @@ withTiming' logger what force_result prtimings action
             let alloc = alloc0 - alloc1
                 time = realToFrac (end - start) * 1e-9
 
-            when (logVerbAtLeast logger 2 && prtimings == PrintTimings)
+            when (logVerbAtLeast logger 2 && printTimingsNotDumpToFile)
                 $ liftIO $ logInfo logger $ withPprStyle defaultUserStyle
                     (text "!!!" <+> what <> colon <+> text "finished in"
                      <+> doublePrec 2 time
@@ -452,7 +452,16 @@ withTiming' logger what force_result prtimings action
             pure r
      else action
 
-    where whenPrintTimings = liftIO . when (prtimings == PrintTimings)
+    where whenPrintTimings =
+            liftIO . when printTimings
+
+          printTimings =
+            prtimings == PrintTimings
+
+          -- Avoid both printing to console and dumping to a file (#20316).
+          printTimingsNotDumpToFile =
+            printTimings
+            && not (log_dump_to_file (logFlags logger))
 
           recordAllocs alloc =
             liftIO $ traceMarkerIO $ "GHC:allocs:" ++ show alloc


=====================================
docs/users_guide/9.10.1-notes.rst
=====================================
@@ -48,6 +48,9 @@ Compiler
   <https://github.com/agda/agda>`_, the size of the build results was reduced by
   about 10% when these info tables were omitted.
 
+- Fixed a bug where compiling with both :ghc-flag:`-ddump-timings` and :ghc-flag:`-ddump-to-file` did not
+  suppress printing timings to the console. See :ghc-ticket:`20316`.
+
 GHCi
 ~~~~
 


=====================================
libraries/base/changelog.md
=====================================
@@ -2,6 +2,8 @@
 
 ## 4.20.0.0 *TBA*
   * Add a `RULE` to `Prelude.lookup`, allowing it to participate in list fusion ([CLC proposal #174](https://github.com/haskell/core-libraries-committee/issues/175))
+  * The `Enum Int64` and `Enum Word64` instances now use native operations on 32-bit platforms, increasing performance by up to 1.5x on i386 and up to 5.6x with the JavaScript backend. ([CLC proposal #187](https://github.com/haskell/core-libraries-committee/issues/187))
+
 
 ## 4.19.0.0 *TBA*
   * Add `{-# WARNING in "x-partial" #-}` to `Data.List.{head,tail}`.


=====================================
testsuite/tests/driver/T20316.stderr deleted
=====================================
@@ -1,6 +0,0 @@
-*** initializing unit database:
-*** Chasing dependencies:
-*** Parser [Main]:
-*** Renamer/typechecker [Main]:
-*** Desugar [Main]:
-*** CoreTidy [Main]:



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3c784ec1f305a494a1c7468a50fd1b8c36288982...e7288c9b3f0279644f8a387cdc6d9bb159ce282d

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3c784ec1f305a494a1c7468a50fd1b8c36288982...e7288c9b3f0279644f8a387cdc6d9bb159ce282d
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230814/81c6e6bd/attachment-0001.html>


More information about the ghc-commits mailing list