[Git][ghc/ghc][master] Fix documentation for traceWith and friends

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Mar 8 02:22:40 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
2aa07708 by MorrowM at 2023-03-07T21:22:22-05:00
Fix documentation for traceWith and friends

- - - - -


2 changed files:

- libraries/base/Debug/Trace.hs
- libraries/base/changelog.md


Changes:

=====================================
libraries/base/Debug/Trace.hs
=====================================
@@ -173,7 +173,7 @@ Like 'trace', but outputs the result of calling a function on the argument.
 hello
 ("hello","world")
 
- at since 4.17.0.0
+ at since 4.18.0.0
 -}
 traceWith :: (a -> String) -> a -> a
 traceWith f a = trace (f a) a
@@ -186,7 +186,7 @@ a 'String'.
 3
 [1,2,3]
 
- at since 4.17.0.0
+ at since 4.18.0.0
 -}
 traceShowWith :: Show b => (a -> b) -> a -> a
 traceShowWith f = traceWith (show . f)
@@ -303,7 +303,7 @@ traceEventIO msg =
 -- | Like 'traceEvent', but emits the result of calling a function on its
 -- argument.
 --
--- @since 4.17.0.0
+-- @since 4.18.0.0
 traceEventWith :: (a -> String) -> a -> a
 traceEventWith f a = traceEvent (f a) a
 


=====================================
libraries/base/changelog.md
=====================================
@@ -83,6 +83,9 @@
     * `InfoProv` now has additional `ipSrcFile` and `ipSrcSpan` fields. `ipLoc`
       is now a function computed from these fields.
     * The `whereFrom` function has been moved
+  * Add functions `traceWith`, `traceShowWith`, `traceEventWith` to
+    `Debug.Trace`, per
+    [CLC proposal #36](https://github.com/haskell/core-libraries-committee/issues/36).
 
 ## 4.17.0.0 *August 2022*
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2aa0770845631e4355f55694f49b3e4b66ecf751

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2aa0770845631e4355f55694f49b3e4b66ecf751
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/20230307/aca9687c/attachment-0001.html>


More information about the ghc-commits mailing list