diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-02-23 15:14:49 -0500 |
---|---|---|
committer | Ben Gamari <ben@well-typed.com> | 2021-03-01 23:38:24 -0500 |
commit | 8f666ec1001717cad529bfb901c092fbdea71582 (patch) | |
tree | cbe0aff87a9ee53f5c2c0f0fd04e81a18e099b59 | |
parent | eff3bc62aa13a0af237a35795b9ede9ec6b6835c (diff) | |
download | haskell-wip/T19413.tar.gz |
base: Add reference to #19413 to Note [unsafePerformIO and strictness]wip/T19413
-rw-r--r-- | libraries/base/GHC/IO/Unsafe.hs | 2 |
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 |