diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-02-23 15:14:49 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-04 23:15:13 -0500 |
commit | f191fce702c4bfe251067807a8ad1aa1de7550b1 (patch) | |
tree | 11d290f6d9b256a5bb568c9896faa72f02c0c6b7 | |
parent | c6ec7f4868cd7b22869f559de23acd3245639c68 (diff) | |
download | haskell-f191fce702c4bfe251067807a8ad1aa1de7550b1.tar.gz |
base: Add reference to #19413 to Note [unsafePerformIO and strictness]
-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 |