You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 id1
and prints it. If it is not, it just prints1
.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 spaceThe text was updated successfully, but these errors were encountered: