Re: Stable name equality

2018-08-21 Thread David Feuer
On Tue, Aug 21, 2018, 4:32 AM Simon Peyton Jones wrote: > That's explained in the paper. A StableName# is a pointer to a stable name > object in the heap that *contains* an index into the stable name table. > Basically, the garbage collector needs to know whether a stable name is > alive or not,

RE: Stable name equality

2018-08-21 Thread Simon Peyton Jones via ghc-devs
l.com Subject: Re: Stable name equality On Tue, Aug 21, 2018, 3:39 AM Simon Peyton Jones mailto:simo...@microsoft.com>> wrote: Actually I'm confused. Currently we have data StableName a = StableName (StableName# a) I believe (but there is no documentation to state) that the (Stabl

Re: Stable name equality

2018-08-21 Thread David Feuer
On Tue, Aug 21, 2018, 3:39 AM Simon Peyton Jones wrote: > > 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 entr

RE: Stable name equality

2018-08-21 Thread Simon Peyton Jones via ghc-devs
6 | To: ghc-devs@haskell.org; Simon Peyton Jones | Cc: David Feuer ; marlo...@gmail.com | Subject: Re: Stable name equality | | On Monday, August 20, 2018 11:56:44 AM EDT Simon Peyton Jones via ghc- | devs wrote: | > I defer to SimonM but IIRC each stable name corresponds to an entry in |

Re: Stable name equality

2018-08-21 Thread David Feuer
I had another thought. If we want, I believe we can make the stable name mechanism considerably more compact by giving up on a flat array representation for the stable name table. The flat representation means that enlarging the table moves all its entries. Suppose we instead choose some shallow tr

Re: Stable name equality

2018-08-20 Thread David Feuer
On Monday, August 20, 2018 11:56:44 AM EDT Simon Peyton Jones via ghc-devs wrote: > I defer to SimonM but IIRC each stable name corresponds to an entry in the > stable-name table; the index in the table is the “stable” thing in a stable > name. So I bet that comparison compares these indices. >

RE: Stable name equality

2018-08-20 Thread Simon Peyton Jones via ghc-devs
table. But is the reverse true? That is, can we be sure that two pointer-distinct stable name objects contain different indices? Simon From: ghc-devs On Behalf Of David Feuer Sent: 19 August 2018 18:53 To: ghc-devs Subject: Stable name equality eqStableName# is not currently defined as

Stable name equality

2018-08-19 Thread David Feuer
eqStableName# is not currently defined as pointer equality. Is there some reason for this? My understanding is that there is a one-to-one correspondence between stable name objects and active stable name table entries, so pointer equality should be sufficient. Am I missing something? __