HORIZON HASKELLDocslts/ghc-10.0.x2b276322026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

Modulebasement-0.0.16Haskell2010

Basement.FinalPtr

A smaller ForeignPtr reimplementation that work in any prim monad.

Here be dragon.

Synopsis
  • Packagebasement-0.0.16
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceFinalPtr.hs

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