> I would like to have a comparison instruction that compares the internal
> reference of two objects.
> Let's call it "req".
>
> req :: a -> a -> Bool

By coincidence, I was just looking at GHC's documentation on stable names
and pointers, and it seems relevant here.

http://research.microsoft.com/users/t-simonm/ghc/Docs/latest/libraries/libs-
14.html

Something like this might do the job for you:

req a b = unsafePerformIO $ do
   a' <- makeStableName a
   b' <- makeStableName b
   return (a' == b')

--FC



Reply via email to