HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulebasement-0.0.16Haskell2010

Basement.FinalPtr

A smaller ForeignPtr reimplementation that work in any prim monad.

Here be dragon.

  • 1 type
  • 8 values
  • Packagebasement-0.0.16
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceFinalPtr.hs
valuefinalPtrSameMemory :: FinalPtr a -> FinalPtr b -> Bool
#

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

valuewithFinalPtr :: PrimMonad prim => FinalPtr p -> (Ptr p -> prim a) -> prim a
#

Looks at the raw pointer inside a FinalPtr, making sure the data pointed by the pointer is not finalized during the call to f