Create a pointer with an associated finalizer
Constructors
FinalPtr (Ptr a)FinalForeign (ForeignPtr a)
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Modulebasement-0.0.16Haskell2010
A smaller ForeignPtr reimplementation that work in any prim monad.
Here be dragon.
Create a pointer with an associated finalizer
FinalPtr (Ptr a)FinalForeign (ForeignPtr a)Check if 2 final ptr points on the same memory bits
it stand to reason that provided a final ptr that is still being referenced and thus have the memory still valid, if 2 final ptrs have the same address, they should be the same final ptr
Cast a finalized pointer from type a to type b
create a new FinalPtr from a Pointer
Create a new FinalPtr from a ForeignPtr
Looks at the raw pointer inside a FinalPtr, making sure the
data pointed by the pointer is not finalized during the call to f
Unsafe version of withFinalPtr