E.W.Ayers
2fe933cdf5
refactor: make SubExpr.Pos a definition
...
Instead of an abbreviation. It is easier to understand
Pos operations in terms of 'push' and 'pop' rather than
through arithmetic.
2022-06-17 17:47:51 -07:00
E.W.Ayers
13e286f545
doc: fix docstring for InteractiveGoal
2022-06-13 16:32:01 -07:00
E.W.Ayers
2edf02544e
chore: rm ExprWithCtx
...
We will make this a separate PR
2022-06-13 16:32:01 -07:00
E.W.Ayers
367bde3601
chore: revert "refactor: replace InfoWithCtx with ExprWithCtx"
...
This reverts commit db342793d53c986b8794084196552c33711f9091.
2022-06-13 16:32:01 -07:00
E.W.Ayers
f64cb95eca
refactor: replace InfoWithCtx with ExprWithCtx
...
This is potentially controversial. There are still some [todo]s that need sorting.
2022-06-13 16:32:01 -07:00
E.W.Ayers
3d561a3ab0
doc: add docstrings for interactive
2022-06-13 16:32:01 -07:00
E.W.Ayers
69facfbe8e
fix: remove Optional from InteractiveHypothesisBundle.fvarIds
2022-06-13 16:32:01 -07:00
E.W.Ayers
45e3c72be7
refactor: InteractiveHypothesis → InteractiveHypothesisBundle
2022-06-13 16:32:01 -07:00
Ed Ayers
5130da82a8
doc: src/Lean/Widget/InteractiveGoal.lean
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2022-06-13 16:32:01 -07:00
E.W.Ayers
cea53fc53e
fix: tests
...
Caused by a classic imperative programming bug oops
2022-06-13 16:32:01 -07:00
E.W.Ayers
f2a874ebaa
fix: handle inaccessible fvar names correctly
2022-06-13 16:32:01 -07:00
E.W.Ayers
675147dcfc
fix: make InteractiveHyp.fvarIds optional
...
This is for backwards compat.
2022-06-13 16:32:01 -07:00
E.W.Ayers
0f61d1dc59
refactor: key fields are now f/mvarid fields
2022-06-13 16:32:01 -07:00
E.W.Ayers
6e1c9653d9
feat: Add a key field to InteractiveGoal
...
This is used to uniquely identify InteractiveGoals and
InteractiveHypotheses. This makes it easier to do
contextual suggestions: eg the infoview can send a message
saying "the user clicked on subexpression 5 in hypothesis N in goal G"
where N and G are unique identifiers for a goal rather than pretty names
which may be non-unique or indices which may be difficult to compute
(eg in infoview there is a mode where hypotheses are reversed or filtered).
While adding these I also refactored the InteractiveGoal generating function.
I unwrapped a fold in to a for/in loop with mutating variables which is a
little easier to read.
2022-06-13 16:32:01 -07:00
Wojciech Nawrocki
351be06a21
feat: ppExprTagged RPC call
2022-06-13 16:32:01 -07:00
Leonardo de Moura
041827bed5
chore: unused variables
2022-06-07 17:54:10 -07:00
Sebastian Ullrich
ae7b895f7a
refactor: unname some unused variables
2022-06-07 16:37:45 -07:00
Sebastian Ullrich
a07e9df66e
fix: use goal prefix in plain goal response
2022-06-07 17:42:09 +02:00
E.W.Ayers
1785ab142e
refactor: move Lean.PrettyPrinter.Delaborator.SubExpr to Lean.SubExpr
...
This is because SubExpr has uses outside the Delaborator.
Closes #1183
2022-06-03 12:38:14 -07:00
Wojciech Nawrocki
737e872ee0
feat: set tagAppFns in explicit exprToInteractive
2022-05-31 00:07:56 +02:00
Wojciech Nawrocki
cd47c30e47
chore: review fixes
2022-05-31 00:07:56 +02:00
Wojciech Nawrocki
e555490ee2
feat: store subexpression positions
2022-05-31 00:07:56 +02:00
Wojciech Nawrocki
5cd4bd3552
refactor: auto-derive RpcEncoding
2022-05-12 13:22:37 -07:00
Wojciech Nawrocki
63b33424e1
feat: add Widget.Basic
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
72c4717055
chore: remove dead code
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
11e10459bb
refactor: move function to PrettyPrinter
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
81b1f1df6e
refactor: unify format functions
2022-05-12 08:38:09 -07:00
Sebastian Ullrich
ff6537be1b
fix: use consistent goal prefix everywhere
2022-05-09 17:49:00 +02:00
KaseQuark
5ebd6c28db
feat: change "⊢" in conv goals to "|"
2022-05-06 09:35:04 +02:00
Leonardo de Moura
fe00dd8f29
fix: missing sanitizeNames at msgToInteractiveAux
2022-05-02 07:35:12 -07:00
Leonardo de Moura
726b735c6d
fix: using invalid name generator at ContextInfo.runMetaM
...
Already used `MVarId`s were being "reused" potentially creating cyclic
metavar assignment. See issue #1031 for an example.
closes #1031
2022-04-15 18:42:34 -07:00
Leonardo de Moura
55989c25fc
chore: remove unnecessary args
2022-04-07 18:19:15 -07:00
Leonardo de Moura
de2e2447d2
chore: style
2022-04-07 17:35:05 -07:00
Leonardo de Moura
fa9b0f6c7e
feat: remove space before propositions with inaccessible names
2022-04-07 07:54:50 -07:00
Leonardo de Moura
95bd55bc21
chore: fix typo and remove unnecessary discriminant
2022-04-02 13:15:17 -07:00
Leonardo de Moura
12e2a79170
chore: fix codebase after removing auto pure
2022-02-03 18:08:14 -08:00
Wojciech Nawrocki
2d1cea0864
feat: inform server if widgets are available
2022-01-29 10:04:25 +01:00
Leonardo de Moura
bac91b9b5b
chore: remove arbitrary
2022-01-15 12:14:27 -08:00
Gabriel Ebner
546bb8f053
fix: widgets: do not highlight entire expression in popup
2021-12-21 21:54:51 +01:00
Leonardo de Moura
68bd55af32
chore: fix codebase
2021-12-10 13:12:09 -08:00
Leonardo de Moura
84f374702d
feat: add fields isInstance and isType to InteractiveHypothesis
...
see https://github.com/leanprover/vscode-lean4/issues/76
2021-12-10 09:08:55 -08:00
Sebastian Ullrich
80c3d88e3e
refactor: optimize critical import path
2021-12-06 08:05:24 -08:00
Gabriel Ebner
70ad1deb00
fix: catch error in msgToInteractiveDiagnostic
...
Otherwise, any error while pretty-printing would kill the server (file
worker).
2021-11-30 15:34:54 +01:00
Wojciech Nawrocki
e843fb7ca5
fix: widget messages
2021-10-17 10:01:23 +02:00
Wojciech Nawrocki
07f99eba73
fix: use local context from Info node in widgets
2021-10-04 21:09:44 +02:00
Wojciech Nawrocki
f454850c70
fix: actually specify opts-per-pos
2021-10-02 09:55:55 +02:00
Leonardo de Moura
445cc3085f
refactor: avoid Name, MVarId, and FVarId confusion
2021-09-07 19:06:50 -07:00
Leonardo de Moura
391366ef24
refactor: add annotation for displaying conv state
2021-09-02 15:52:11 -07:00
Leonardo de Moura
1a362bc212
feat: add support for displaying conv goal in interactive mode
2021-09-01 16:45:12 -07:00
Wojciech Nawrocki
0d35cf3bb8
feat: allow future additions to CodeWithInfos tags
2021-08-24 08:57:41 -07:00