Exhaustiveness-checking warning loses module namespace upon reload #1797
Labels
bug
Something not working correctly
type-guards
UX
Issues related to the user experience (e.g., improved error messages)
Consider this program:
Currently, Cryptol deems
f'
to be inexhaustive (see #1796 for more on this, but this is a separate issue than what I am reporting here). If you load this module into Cryptol, then the warning is:Note that the warning message mentions
GuardOrder::f'
, which includes the module namespace (as expected). So far, so good.Now let's reload the program:
This time, the warning mentions
f'
, notGuardOrder::f'
. Somehow, the module namespace disappeared in the process of reloading the program!As a more extreme example, let's quit Cryptol:
And invoke Cryptol on it again:
Again, it mentions
GuardOrder::f'
—so far, so good. Now, without exiting the Cryptol REPL, let's modify the program to add another definition, which is also deemed inexhaustive:If we reload the REPL now, we get:
Note that the warning for the newly added definition mentions
GuardOrder::f''
, which does include a module namespace, but the warning for the old definition mentionsf'
, which does not include a module namespace! Very strange indeed.The text was updated successfully, but these errors were encountered: