How unique is a Unique?

Matthijs Kooijman matthijs at stdin.nl
Fri Jun 26 04:43:39 EDT 2009


Hi Simon,

> The thing to read is Section 4 of:
> 	http://research.microsoft.com/en-us/um/people/simonpj/papers/inlining/index.htm
> That tells you all about the InScopeSet etc.
From a first glance, it looks like you mean section 5 :-) I haven't read the
paper fully yet, it's in the printer now :-)

> I hope that helps.  If you are still stuck after reading that, ask again.
It seems like it will answer quite some questions (and its also looks like an
interesting read in itself, probably even useful to cite in my thesis :-)

However, one thing will probably not be answered there, since it is more of an
implementation issue: Is there any function that will guarantee all Uniques in
a CoreExpr will be completely unique? This is stronger than de-shadowing,
since I also want Uniques in completely different branches of the expression
to be different.

I need this, since I want to keep a global table with a mapping from a Unique
to some values (mostly related to naming). I might be able to pull this off
with some hard thinking and non-unique Uniques, but it would help a lot if I
didn't need to.

If there isn't, I'll probably write something up (shouldn't be too hard I
guess). Would there be any interest to include this in the GHC API? Or is the
GHC API limited to what GHC itself uses?

> Would you like to record the answers you find somewhere in the GHC
> Commentary? http://hackage.haskell.org/trac/ghc/wiki/Commentary
I'll see if I can write something coherent :-p. I think there might be quite a
lot more I could put up there, though as always I'd need to find the time :-)

Gr.

Matthijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20090626/72236e5e/attachment.bin


More information about the Glasgow-haskell-users mailing list