úÎ!*z(c) 2019-2021 Edward KmettBSD-2-Clause OR Apache-2.0Edward Kmett <ekmett@gmail.com> experimental non-portableNoneF_ weakMake an arbitrary  reference from a .=Provides a more general API than the crippled one offered by  to match the power of .weakFunctions like  but for s.Make an arbitrary  reference from an  and an optional finalizer.A specialised version of & where the key and value are the same.weakA specialised version of D where the value is actually a pair of the key and value passed to :  key val finalizer "a  key (key,val) finalizer :The advantage of this is that the key can be retrieved by  in addition to the value.(c) 2019-2021 Edward KmettBSD-2-Clause OR Apache-2.0Edward Kmett <ekmett@gmail.com> experimental non-portableNone^weakMake a  reference from a  . This attaches to the  down inside of the  F that holds onto the finalizers. This is safer than attaching to the   itself.!However: this does not work with   or   -based  .s, so make sure you know how you built your  .weakFunctions like   but for  s.A specialised version of 2, where the key and the value are the same object:  key finalizer =  key key finalizer weakFunctions like   but for  s.A specialised version of D where the value is actually a pair of the key and value passed to :   key val finalizer "a  key (key,val) finalizer < The advantage of this is that the key can be retrieved by  in addition to the value.    weak-0-inplaceSystem.Mem.Weak.IORefSystem.Mem.Weak.ForeignPtr Data.IORefIORef mkWeakIORefSystem.Mem.Weak mkWeakPtrForeign.ForeignPtr ForeignPtrGHC.ForeignPtrFinalPtr mkWeakIORef'mkWeakIORefPtrmkWeakIORefPairmkWeakForeignPtrmkWeakForeignPtrPtrmkWeakForeignPtrPairbaseGHC.WeakWeakmkWeak deRefWeakPlainPtr mkWeakPair