ghc-prim-0.11.0: GHC primitives
Licensesee libraries/ghc-prim/LICENSE
Maintainerghc-devs@haskell.org
Stabilityinternal
Portabilitynon-portable (GHC Extensions)
Safe HaskellUnsafe
LanguageHaskell2010

GHC.Prim.PtrEq

Description

Comparing underlying pointers for equality.

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

Synopsis

Documentation

reallyUnsafePtrEquality :: a -> a -> Int# Source #

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 reallyUnsafePtrEquality#, which doesn't have such restrictions.

unsafePtrEquality# :: forall (a :: UnliftedType) (b :: UnliftedType). a -> b -> Int# Source #

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#.

sameArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). Array# a -> Array# a -> Int# Source #

Compare the underlying pointers of two arrays.

sameMutableArray# :: forall {l :: Levity} s (a :: TYPE ('BoxedRep l)). MutableArray# s a -> MutableArray# s a -> Int# Source #

Compare the underlying pointers of two mutable arrays.

sameSmallArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). SmallArray# a -> SmallArray# a -> Int# Source #

Compare the underlying pointers of two small arrays.

sameSmallMutableArray# :: forall {l :: Levity} s (a :: TYPE ('BoxedRep l)). SmallMutableArray# s a -> SmallMutableArray# s a -> Int# Source #

Compare the underlying pointers of two small mutable arrays.

sameByteArray# :: ByteArray# -> ByteArray# -> Int# Source #

Compare the pointers of two byte arrays.

sameMutableByteArray# :: MutableByteArray# s -> MutableByteArray# s -> Int# Source #

Compare the underlying pointers of two mutable byte arrays.

sameMutVar# :: forall {l :: Levity} s (a :: TYPE ('BoxedRep l)). MutVar# s a -> MutVar# s a -> Int# Source #

Compare the underlying pointers of two MutVar#s.

sameTVar# :: forall {l :: Levity} s (a :: TYPE ('BoxedRep l)). TVar# s a -> TVar# s a -> Int# Source #

Compare the underlying pointers of two TVar#s.

sameMVar# :: forall {l :: Levity} s (a :: TYPE ('BoxedRep l)). MVar# s a -> MVar# s a -> Int# Source #

Compare the underlying pointers of two MVar#s.

sameIOPort# :: forall {l :: Levity} s (a :: TYPE ('BoxedRep l)). IOPort# s a -> IOPort# s a -> Int# Source #

Compare the underlying pointers of two IOPort#s.

samePromptTag# :: PromptTag# a -> PromptTag# a -> Int# Source #

Compare the underlying pointers of two PromptTag#s.

eqStableName# :: forall {k :: Levity} {l :: Levity} (a :: TYPE ('BoxedRep k)) (b :: TYPE ('BoxedRep l)). StableName# a -> StableName# b -> Int# Source #

Compare two stable names for equality.