Commit 24460269 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

Document mkWeak#

Reviewers: simonmar, austin

Reviewed By: simonmar

Subscribers: RyanGlScott, rwbarton, thomie

GHC Trac Issues: #10640, #13611

Differential Revision: https://phabricator.haskell.org/D3498
parent da792e47
......@@ -2382,6 +2382,11 @@ primtype Weak# b
primop MkWeakOp "mkWeak#" GenPrimOp
o -> b -> (State# RealWorld -> (# State# RealWorld, c #))
-> State# RealWorld -> (# State# RealWorld, Weak# b #)
{ {\tt mkWeak# k v finalizer s} creates a weak reference to value {\tt k},
with an associated reference to some value {\tt v}. If {\tt k} is still
alive then {\tt v} can be retrieved using {\tt deRefWeak#}. Note that
the type of {\tt k} must be represented by a pointer (i.e. of kind {\tt
TYPE 'LiftedRep} or {\tt TYPE 'UnliftedRep}). }
with
has_side_effects = True
out_of_line = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment