The type of fork# is over general
When working eta-expansion and reduction, found that fork#
had a weaker strictness signature than it should have. In particular, it didn't record that it applies its argument exactly once. Moreover, it has a very strange type:
primop ForkOp "fork#" GenPrimOp
a -> State# RealWorld -> (# State# RealWorld, ThreadId# #)
with
has_side_effects = True
out_of_line = True
It should look like this:
primop ForkOp "fork#" GenPrimOp
(State# RealWorld -> (# State# RealWorld, a #))
-> State# RealWorld -> (# State# RealWorld, ThreadId# #)
with
has_side_effects = True
out_of_line = True
strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd
, topDmd ] topDiv }
Patch coming.