fix: make pretty printed structure instances hoverable (#7648)
This PR fixes a bug introduced in #7589, causing pretty printed structure instances to not be hoverable in the Infoview. This was caused by a choice node being introduced, since `{ $fields,* }` is ambiguous syntax.
This commit is contained in:
parent
d24dfa1031
commit
414ba28cef
1 changed files with 3 additions and 5 deletions
|
|
@ -671,11 +671,9 @@ def delabStructureInstance : Delab := do
|
|||
paramMap := paramMap.insert (← x.fvarId!.getUserName) param
|
||||
return paramMap
|
||||
let (_, fields) ← collectStructFields s.induct paramMap #[] {} s
|
||||
if ← withType <| getPPOption getPPStructureInstanceType then
|
||||
let tyStx ← withType delab
|
||||
`({ $fields,* : $tyStx })
|
||||
else
|
||||
`({ $fields,* })
|
||||
let tyStx? : Option Term ← withType do
|
||||
if ← getPPOption getPPStructureInstanceType then delab else pure none
|
||||
`({ $fields,* $[: $tyStx?]? })
|
||||
|
||||
|
||||
/-- State for `delabAppMatch` and helpers. -/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue