Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to recover uninterned value from Id? #16

Open
mb64 opened this issue Feb 1, 2021 · 0 comments
Open

Possible to recover uninterned value from Id? #16

mb64 opened this issue Feb 1, 2021 · 0 comments

Comments

@mb64
Copy link
Contributor

mb64 commented Feb 1, 2021

I would like to only store integer Ids for interned identifiers, and then possibly recover the string from the Id for pretty-printing.

My use case for using the raw integer Id instead of Interned{String,Text} is to use negative ids for global variables/constants, and non-negative de Bruijn indices/levels for local variables. Since interned ids are always non-negative, I can use - internedId - 1 as an identifier for globals.

Is it be possible to retrieve an uninterned value from just the Id using this library? I haven't been able to figure out how.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant