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

Add inference variable info in debug output #516

Open
basil-cow opened this issue Jun 11, 2020 · 0 comments
Open

Add inference variable info in debug output #516

basil-cow opened this issue Jun 11, 2020 · 0 comments

Comments

@basil-cow
Copy link
Contributor

basil-cow commented Jun 11, 2020

To print debug info that is not present in the internal representation of terms in chalk (struct and trait names, for example) we use a thread local storage, all info relevant to debug representation is stored there.
For example, when somebody tries to print a struct with id 1, Debug implementation for structs checks if debug info is present in the tls and if it is, finds the name of the struct with id 1 and prints it. If it is not, it just prints 1.
Currently, we don't store inference table in the tls, so when printing inference variables we can't know their universe or whether they are bound to a value or not.
(My) suggested solution is to have something like debug_ex_clause but for inference tables, but you are welcome to experiment with it 🙃 , there is surely a design space

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