
| > But is the reverse true? That is, can we be sure that two pointer-
| distinct stable name objects contain different indices?
|
| I believe so, yes. Each stable name table entry has a pointer to the
| linked stable name object. Calling makeStableName# checks whether the
| passed pointer already has a stable name, and, if so, returns the linked
| stable name object.
Actually I'm confused. Currently we have
data StableName a = StableName (StableName# a)
I believe (but there is no documentation to state) that the (StableName# a)
* Has kind (TYPE UnliftedRep)
* Is the index of the entry in the Stable Name Table
But if it's the index, why isn't it an IntRep? UnliftedRep is for pointers?
Moreover eqStableName# :: StableName# a -> StableName# b -> Bool
is directly implemented in the code generator (StgCmmPrim) by an equality
comparison.
If these things are correct, it would be great to write them down in a Note.
And if they are right, I'm now lost about what you question is. Equality is
/already/ implemented by direct equality comparison, no?
Simon
| -----Original Message-----
| From: David Feuer