Leonardo de Moura
0869bbe558
fix: missig registerMVarErrorImplicitArgInfo for postponed instance mvars
2021-08-04 16:58:00 -07:00
Leonardo de Moura
61cdf93750
fix: missing registerMVarErrorImplicitArgInfo
2021-08-04 16:09:18 -07:00
Leonardo de Moura
4ca7345956
refactor: remove old workaround
2021-08-03 19:50:16 -07:00
Leonardo de Moura
4cd7e359df
feat: elaborate strict implicit binders
2021-08-03 19:40:44 -07:00
Leonardo de Moura
d864afae91
feat: private fields
...
closes #418
2021-08-02 20:20:21 -07:00
Leonardo de Moura
cfb7e27b87
fix: isStructure vs isStructureLike
2021-08-02 18:54:19 -07:00
Wojciech Nawrocki
03699cd5ba
feat: uniformly split idents
2021-07-19 09:55:37 +02:00
Wojciech Nawrocki
7aca461a35
fix: hovers on elabFieldName fields
2021-07-19 09:55:37 +02:00
Leonardo de Moura
7f986c62ba
refactor: add Arg.lean
2021-06-28 08:10:16 -07:00
Gabriel Ebner
960cfd9cae
feat: store expected type in info tree
2021-06-07 16:23:22 -07:00
Leonardo de Moura
3d829c825c
fix: Info nodes for overloaded notation/declarations
...
See new test to understand the problem that has been fixed.
2021-05-04 22:07:21 -07:00
Leonardo de Moura
f55561008c
fix: fixes #386
2021-04-11 20:57:39 -07:00
Leonardo de Moura
2694e7798a
refactor: add MonadBacktrack
...
The new class specifies an interface for saving and restoring the
backtrackable part of the state.
This commit also fixes a few issues.
- `commitWhen` at `LevelDefEq` was defining a checkpoint for
the `isDefEq` methods, and it affects how postponed universe
constraints are handled. However, the name suggests it is
similar to `commitWhenSome?`, and consequently it was used
in other places that had nothing to do with `isDefEq`.
So, I renamed it, and provided the generic `commitWhen` at the new
`MonadBacktrack.lean` file.
- We were restoring more state then needed in a few places.
For example, we were discarding all caches.
- At `SyntheticMVars.lean`, we were using the `Meta.commitWhenSome?`
method which does not restore the `Term.State`.
2021-04-11 19:10:41 -07:00
Leonardo de Moura
3ccd992dad
feat: elaborate auxiliary completion node
2021-04-05 19:07:39 -07:00
Leonardo de Moura
d6af843683
chore: remove completion auxiliary parser
2021-04-05 11:26:13 -07:00
Leonardo de Moura
e6dec2dd79
feat: don't allow whitespaces between . and field name
2021-04-05 07:11:14 -07:00
Leonardo de Moura
f2d81c7389
fix: position information for auto completion
...
We currently allow spaces between `.` and the "field" name, and this
was creating problems when auto-completing at `f (y.| a b)`
where `|` represents the cursor position
The `InfoTree` had a node for `y. a` and its tail position is after
the cursor position.
2021-04-04 11:25:52 -07:00
Leonardo de Moura
ac35b543bf
feat: add addional CompletionInfo
2021-04-03 11:17:51 -07:00
Leonardo de Moura
8c2ba16f74
feat: store expected type at DotCompletionInfo
2021-04-02 11:10:06 -07:00
Leonardo de Moura
c9f4359045
feat: add DotCompletionInfo
2021-04-01 23:31:38 -07:00
Leonardo de Moura
4044308090
chore: use double quoted names
2021-03-24 12:36:18 -07:00
Sebastian Ullrich
2180898192
fix: |>. must parse its arguments
...
... since we want it to have a low precedence, which now precludes it
from being used in function position
2021-03-22 16:33:37 +01:00
Leonardo de Moura
dd4fb3b71b
chore: improve error message
...
see #346
2021-03-16 20:42:38 -07:00
Leonardo de Moura
6d53202e0b
chore: fix typo
2021-03-16 19:07:35 -07:00
Leonardo de Moura
08f87752ee
fix: closes #346
2021-03-16 18:55:46 -07:00
Leonardo de Moura
97b2398972
chore: cleanup
2021-03-16 18:14:27 -07:00
Leonardo de Moura
be841a7cad
chore: throwError! => throwError, throwErrorAt! => throwErrorAt
...
@Kha I marked the corresponding methods as `protected`.
I currently can't stand `throw_error`, and I am optimistic about
server highlighting feature you are working on :)
2021-03-11 11:59:45 -08:00
Leonardo de Moura
164577d94e
chore: remove parser! and tparser!
...
The new macros are called "leading_parser` and `trailing_parser`.
cc @Kha
2021-03-11 09:36:58 -08:00
Leonardo de Moura
68143ca8ba
chore: trace[...]! ==> trace[...]
...
@Kha I think this one is a good change, there is no real reason for
using the `!` suffix here.
2021-03-10 18:44:43 -08:00
Leonardo de Moura
0c4d72c1d5
refactor: add implicitLambda argument
2021-03-08 15:21:32 -08:00
Leonardo de Moura
fc79b794ba
fix: missing error messages
...
Issue reported by @JasonGross
2021-03-05 17:20:04 -08:00
Leonardo de Moura
6e950ff216
chore: compilation time
2021-02-25 18:00:58 -08:00
Leonardo de Moura
f07b9926b1
feat: unfold coercions and coeFun, coeSort, coeM, liftCoeM
...
TODO: `coe`
2021-02-14 10:27:34 -08:00
Leonardo de Moura
f51328ff11
feat: custom elaborator for forIn
...
This commit also moves `elabBinRel` to `Extra.lean`
2021-02-05 18:01:58 -08:00
Leonardo de Moura
8c0346f00c
feat: improve binrel! macro
2021-02-05 13:28:57 -08:00
Sebastian Ullrich
941a68165a
fix: hover/definition for applications with only implicit arguments
2021-01-21 17:23:17 +01:00
Sebastian Ullrich
a9f96ace3e
chore: naming
2021-01-20 16:48:50 +01:00
Sebastian Ullrich
462e1d54a3
chore: replace uses of copyInfo with automatic position copying in syntax quotations
...
We could introduce a `copyPos` alternative, but turns out we don't need it right now
2021-01-20 16:48:50 +01:00
Leonardo de Moura
6df66bf0ac
feat: generalize observing
...
We can now "observe" any `TermElabM α` action.
2021-01-18 15:10:42 -08:00
Leonardo de Moura
0672247ce8
chore: make comments VS Code friendly
2021-01-15 13:53:37 -08:00
Wojciech Nawrocki
46e9d2533d
fix: resolving French-quoted field names
2021-01-15 13:29:22 -08:00
Leonardo de Moura
ae60360d7a
feat: add resolveName' which produces Syntax with position information for each field
2021-01-15 11:19:01 -08:00
Leonardo de Moura
25c9727a92
feat: add TermInfo for LVal
...
@Vtec234 Added the missing info.
Given
```lean
def f3 (s : Nat × Array (Array Nat)) : Array Nat :=
s.2[1].push s.1
```
We produce the following `InfoTree` for the body (originally at line 30)
```
Array.push (Array.getOp s.snd 1) s.fst : Array Nat @ ⟨30, 2⟩-⟨30, 17⟩
s : Nat × Array (Array Nat) @ ⟨30, 2⟩-⟨30, 3⟩
Prod.snd : {α β : Type} → α × β → β @ ⟨30, 4⟩-⟨30, 5⟩
Array.getOp : {α : Type} → [inst : Inhabited α] → Array α → Nat → α @ ⟨30, 5⟩-⟨30, 6⟩
1 : Nat @ ⟨30, 6⟩-⟨30, 7⟩
Array.push : {α : Type} → Array α → α → Array α @ ⟨30, 9⟩-⟨30, 13⟩
s.fst : Nat @ ⟨30, 14⟩-⟨30, 17⟩
s : Nat × Array (Array Nat) @ ⟨30, 14⟩-⟨30, 15⟩
Prod.fst : {α β : Type} → α × β → α @ ⟨30, 16⟩-⟨30, 17⟩
```
2021-01-14 12:19:21 -08:00
Leonardo de Moura
4d1097327c
feat: store ref syntax at LVal
2021-01-14 12:19:21 -08:00
Leonardo de Moura
84f78edb31
feat: store declaration ranges
2021-01-11 12:50:11 -08:00
Leonardo de Moura
51e2db9850
feat: elaborate binrel! macro
2020-12-29 16:37:43 -08:00
Leonardo de Moura
3b6d65c3c3
chore: use deriving Inhabited
2020-12-13 10:09:20 -08:00
Sebastian Ullrich
554d0b4d4c
chore: adapt stdlib to new antiquotation splices
2020-12-12 17:20:03 +01:00
Leonardo de Moura
71735faa33
fix: named argument that depends on missing explicit argument
2020-12-09 16:10:48 -08:00
Leonardo de Moura
702c258773
fix: index out of bounds
...
@Kha Please take a look at `Traverser` and check whether the
workaround is appropriate or not.
2020-12-08 11:44:10 -08:00