summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-02-23 15:14:49 -0500
committerBen Gamari <ben@well-typed.com>2021-03-01 23:38:24 -0500
commit8f666ec1001717cad529bfb901c092fbdea71582 (patch)
treecbe0aff87a9ee53f5c2c0f0fd04e81a18e099b59
parenteff3bc62aa13a0af237a35795b9ede9ec6b6835c (diff)
downloadhaskell-wip/T19413.tar.gz
base: Add reference to #19413 to Note [unsafePerformIO and strictness]wip/T19413
-rw-r--r--libraries/base/GHC/IO/Unsafe.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/base/GHC/IO/Unsafe.hs b/libraries/base/GHC/IO/Unsafe.hs
index 9dfaaa1e2f..5284dcf887 100644
--- a/libraries/base/GHC/IO/Unsafe.hs
+++ b/libraries/base/GHC/IO/Unsafe.hs
@@ -40,7 +40,7 @@ Consider this sub-expression (from tests/lib/should_run/memo002)
It's super-important that the `let r = f x` is lazy. If the demand
analyser sees that `r` is sure to be demanded, it'll use call-by-value
for (f x), that will try to lock the already-locked table => deadlock.
-See #19181.
+See #19181 and #19413.
Now `r` doesn't look strict, because it's wrapped in a `return`.
But if we were to define unsafePerformIO like this