summaryrefslogtreecommitdiff
path: root/compiler/GHC/Builtin
diff options
context:
space:
mode:
authorRyan Scott <rscott@galois.com>2021-06-22 11:50:33 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-06-28 16:58:03 -0400
commita7f9670e899bcbc87276446a1aac2304cade2b2f (patch)
treee7a644ce9ebe9d4e54955188d136117a58fc2628 /compiler/GHC/Builtin
parent755cb2b0c161d306497b7581b984f62ca23bca15 (diff)
downloadhaskell-a7f9670e899bcbc87276446a1aac2304cade2b2f.tar.gz
Fix type and strictness signature of forkOn#
This is a follow-up to #19992, which fixes the type and strictness signature for `fork#`. The `forkOn#` primop also needs analogous changes, which this patch accomplishes.
Diffstat (limited to 'compiler/GHC/Builtin')
-rw-r--r--compiler/GHC/Builtin/primops.txt.pp6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/GHC/Builtin/primops.txt.pp b/compiler/GHC/Builtin/primops.txt.pp
index 672b831ac7..2512612b5b 100644
--- a/compiler/GHC/Builtin/primops.txt.pp
+++ b/compiler/GHC/Builtin/primops.txt.pp
@@ -2783,10 +2783,14 @@ primop ForkOp "fork#" GenPrimOp
, topDmd ] topDiv }
primop ForkOnOp "forkOn#" GenPrimOp
- Int# -> a -> State# RealWorld -> (# State# RealWorld, ThreadId# #)
+ Int# -> (State# RealWorld -> (# State# RealWorld, a #))
+ -> State# RealWorld -> (# State# RealWorld, ThreadId# #)
with
has_side_effects = True
out_of_line = True
+ strictness = { \ _arity -> mkClosedDmdSig [ topDmd
+ , lazyApply1Dmd
+ , topDmd ] topDiv }
primop KillThreadOp "killThread#" GenPrimOp
ThreadId# -> a -> State# RealWorld -> State# RealWorld