summaryrefslogtreecommitdiff
path: root/compiler/prelude/primops.txt.pp
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-03-06 14:31:12 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-03-06 14:31:12 +0000
commit78c491b13bd3afea76a8bb3f30d13e417c768941 (patch)
treee14ad4e8ab5774dbef717aa9515728b641aeda17 /compiler/prelude/primops.txt.pp
parenta1e3066e066f0f75da361f881b2f3198e0aada5f (diff)
downloadhaskell-78c491b13bd3afea76a8bb3f30d13e417c768941.tar.gz
add noDuplicate#
This primop ensures that the current computation is not being duplicated, by calling threadPaused(). The idea is to use it inside unsafePerformIO/unsafeInterleaveIO (see #986).
Diffstat (limited to 'compiler/prelude/primops.txt.pp')
-rw-r--r--compiler/prelude/primops.txt.pp5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp
index 10bcf37c10..7b006e1177 100644
--- a/compiler/prelude/primops.txt.pp
+++ b/compiler/prelude/primops.txt.pp
@@ -1532,6 +1532,11 @@ primop IsCurrentThreadBoundOp "isCurrentThreadBound#" GenPrimOp
with
out_of_line = True
+primop NoDuplicateOp "noDuplicate#" GenPrimOp
+ State# RealWorld -> State# RealWorld
+ with
+ out_of_line = True
+
------------------------------------------------------------------------
section "Weak pointers"
------------------------------------------------------------------------