[ghc-steering-committee] StableName guarantee (#163), recommendation: accept

Simon Marlow marlowsd at gmail.com
Mon Sep 10 07:13:21 UTC 2018


The proposer wants to change the implementation of StableNames, and noticed
that the existing implementation has the property that, for two StableNames
s1 and s2 that are currently live,

 hashStableName s1 == hashStableName s2 ==> s1 == s2

this property is not documented. As far as we know, there isn't any code in
the wild that relies on it. In fact, relying on it would be tricky due to
the requirement that s1 and s2 have to be live - as soon as a StableName
becomes unreachable from the GC's point of view, the index into the table
that is used to provide the result of hashStableName is reused.

The proposal is to remove this property. Well, a future refactoring of the
StableName implemnetation would actually remove the property, the proposer
wants the committee to consider whether the property in question is worth
keeping (and therefore documenting).

I think it's pretty clear that we don't want to document this property,
because in order to do so we would have to give a precise definition of
what "live" means, which is not possible. Furthermore, we don't know of any
use cases in the wild. So, let's accept the proposal.

Cheers
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20180910/2f3cfa75/attachment.html>


More information about the ghc-steering-committee mailing list