| License | see libraries/ghc-prim/LICENSE |
|---|---|
| Maintainer | cvs-ghc@haskell.org |
| Stability | internal |
| Portability | non-portable (GHC Extensions) |
| Safe Haskell | Unsafe |
| Language | Haskell2010 |
GHC.Prim.PtrEq
Description
Comparing underlying pointers for equality.
Use GHC.Exts from the base package instead of importing this module directly.
Synopsis
- reallyUnsafePtrEquality :: a -> a -> Int#
- unsafePtrEquality# :: forall (a :: UnliftedType) (b :: UnliftedType). a -> b -> Int#
- sameArray# :: Array# a -> Array# a -> Int#
- sameMutableArray# :: MutableArray# s a -> MutableArray# s a -> Int#
- sameSmallArray# :: SmallArray# a -> SmallArray# a -> Int#
- sameSmallMutableArray# :: SmallMutableArray# s a -> SmallMutableArray# s a -> Int#
- sameByteArray# :: ByteArray# -> ByteArray# -> Int#
- sameMutableByteArray# :: MutableByteArray# s -> MutableByteArray# s -> Int#
- sameMutVar# :: MutVar# s a -> MutVar# s a -> Int#
- sameTVar# :: TVar# s a -> TVar# s a -> Int#
- sameMVar# :: MVar# s a -> MVar# s a -> Int#
- sameIOPort# :: IOPort# s a -> IOPort# s a -> Int#
- samePromptTag# :: PromptTag# a -> PromptTag# a -> Int#
- eqStableName# :: StableName# a -> StableName# b -> Int#
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#.
sameMutableArray# :: MutableArray# s a -> MutableArray# s a -> Int# Source #
Compare the underlying pointers of two mutable arrays.
sameSmallArray# :: SmallArray# a -> SmallArray# a -> Int# Source #
Compare the underlying pointers of two small arrays.
sameSmallMutableArray# :: 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# :: MutVar# s a -> MutVar# s a -> Int# Source #
Compare the underlying pointers of two MutVar#s.
sameIOPort# :: 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# :: StableName# a -> StableName# b -> Int# Source #
Compare two stable names for equality.