Print Refs as short hashes in ambiguous hash error#6006
Conversation
|
How much work would it be to support distinguishing Honestly we should probably print the Edit: I'm guessing we don't have the cycle length everywhere we would want it though |
I dunno tbh, this is a side-quest so I just did something quick. |
I'd want it in all spots if the cycle length > 1 The problem is that when we parse it we don't know whether the version without .0 is ambiguous or not; but it would be kind of annoying if we had to add .0 on to everything when most definitions aren't cycles. Agree. re numbered args. Thanks for the patch! |
Overview
Old error message, which just uses Haskell Show instances for References, which isn't ideal because it doesn't show what you actually need to type.
New message, which shows the correct syntax as a shorthash.
Implementation approach and notes
Just swaps the output printer.
Interesting/controversial decisions
Nah
Test coverage
Tested manually
Loose ends
It would be nice if all the ambiguity errors were just numbered outputs, but it looks like we don't have a
returnEarlyNumberedor w/e so that's a slightly larger change, so I just did the quick thing for now.