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

GHC 9.14.1 · lts/ghc-9.14.x · b2f3bfd · 2026-10-11

Moduleghc-internal-9.1401.0Haskell2010

GHC.Internal.Prim.PtrEq

Comparing underlying pointers for equality.

Use GHC.Exts from the base package instead of importing this module directly.

  • 13 values
valuereallyUnsafePtrEquality :: a -> a -> Int#
#

Compare the underlying pointers of two values for equality.

Returns 1 if the pointers are equal and 0 otherwise.

The two values must be of the same type, of kind Type. See also GHC.Exts.reallyUnsafePtrEquality#, which doesn't have such restrictions.

valueunsafePtrEquality# :: a -> b -> Int#
#

Compare the underlying pointers of two unlifted values for equality.

This is less dangerous than reallyUnsafePtrEquality, since the arguments are guaranteed to be evaluated. This means there is no risk of accidentally comparing a thunk. It's however still more dangerous than e.g. sameArray#.