Repository navigation
Assorted delaborator fixes - #941
Merged
Merged
Conversation
leodemoura
self-requested a review
January 11, 2022 19:56
leodemoura
approved these changes
Jan 11, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was also confused by the error message in #939, where we print
@ [] (?m x), which is fairly cryptic syntax and doesn't even roundtrip.The reason for this is that the
setAppPPExplicitForExposingMVarsfunction adds metadata constructors to the application itself, the arguments, and the function symbol. ThedelabAppExplicitfunction then doesn't recognize the head symbol as a constant (because it is wrapped in an mdata constructor), and callsdelabwhich in turn callsdelabAppImplicitwhich helpfully prints@List.nilas[].This PR 1) makes delabAppExplicit recognize
mdata (const ...)as a head symbol, and 2) delaborates the constant@nilto@nil.The latter change might be a bit controversial, since we often use constants in messages to refer to the declaration name and not an elaboratable expression, e.g. TC traces print something like
m!"global instances {insts}", whereinsts : List Expris a list of constants. These declaration names now get an extra@. I think the@is important for expressions because otherwise you cannot distinguish@EqandEq, but maybe we should add an explicit way to include clickable constant names in messages.