lean4-htt/src/Lean/Widget
Wojciech Nawrocki 856a9b5153 fix: treat pretty-printed names as strings
I initially expected `Name`s to always faithfully represent internal data, in particular that a name with macro scopes would have a form such as  ```foo._@.Module._hyg.1``, and that tombstones would only appear in types that represent pretty-printed output such as as `String` or `Format`. However, that is not what happens. We have `sanitizeNames` which rewrites the `userName` field of local hypotheses to be `Name.str .anonymous "blah✝"`.

Then in the server code, we put these into `names : Array Name`e. This works fine for displaying in the infoview, but if we try to deserialize an `InteractiveHypothesisBundle` inside an RPC method for widget purposes, the `FromJson Name` instance blows up in `String.toName`.

I think my preferred solution is to, rather than 'fix' `String.toName` to accept these names with tombstones, stop pretending that they are actual `Name`s and re-type `InteractiveHypothesisBundle.names : Array String`. This should be a backwards-compatible change w.r.t. infoview code as the JSON representation is a string in either case. It is not backwards compatible w.r.t. meta code that uses this field.
2023-10-11 09:51:14 +02:00
..
Basic.lean feat: make go-to-definition on a typeclass projection application go to the instance(s) (#1767) 2023-01-19 09:10:01 +00:00
Diff.lean feat: add context and term data to goals 2023-01-13 17:13:02 -08:00
InteractiveCode.lean fix: respect pp.raw in interactive .ofGoal 2023-03-30 17:19:35 -07:00
InteractiveDiagnostic.lean feat: adjust message range on unexpected token error 2023-09-12 11:42:24 +02:00
InteractiveGoal.lean fix: treat pretty-printed names as strings 2023-10-11 09:51:14 +02:00
TaggedText.lean chore: use new comment syntax 2022-09-14 08:26:17 -07:00
UserWidget.lean fix: spacing and indentation fixes 2023-05-28 18:48:36 -07:00