Commit graph

147 commits

Author SHA1 Message Date
Leonardo de Moura
bfc1a16c02 chore: adjust instance param order 2021-01-13 18:31:41 -08:00
Leonardo de Moura
84f78edb31 feat: store declaration ranges 2021-01-11 12:50:11 -08:00
Wojciech Nawrocki
1dd96bd004
fix: encode none optional JSON fields as missing
VSCode is unhappy otherwise
2021-01-02 14:13:22 -05:00
Sebastian Ullrich
4c3b247dee feat: server: report document symbol hierarchy 2020-12-31 15:00:59 +01:00
Sebastian Ullrich
00841033d8 chore: Hover.lean ~> LanguageFeatures.lean 2020-12-31 15:00:42 +01:00
Wojciech Nawrocki
19e395ded7 feat: begin work on mouse hovers in server 2020-12-31 10:45:58 +01:00
Wojciech Nawrocki
2333a3fbab fix: error responses in tests 2020-12-31 10:45:58 +01:00
Sebastian Ullrich
5fe2490156 refactor: use From/ToJson deriving handlers 2020-12-26 19:38:24 +01:00
Sebastian Ullrich
1f563695bb feat: From/ToJson derive handlers 2020-12-26 19:38:24 +01:00
Wojciech Nawrocki
a2760d0144 test: multi-process server 2020-12-26 13:22:47 +01:00
Sebastian Ullrich
06fb031803 feat: basic progress structures
Was too lazy to finish when I realized that I can't just start sending progress reports to the client...
2020-12-23 20:00:36 +01:00
Wojciech Nawrocki
7dabff382f feat: prepare for Ipc server testing 2020-12-23 20:00:36 +01:00
Wojciech Nawrocki
4c2e50d9e8 feat: encode/decode JSON null more permissively 2020-12-23 20:00:36 +01:00
Wojciech Nawrocki
f6b3fedcc6 fix: JSON printing 2020-12-23 20:00:36 +01:00
mhuisi
883c197830 chore: string formatting 2020-12-23 20:00:36 +01:00
mhuisi
377c3dc6fe feat: add WatchdogM wrapper for testing, collectDiagnostics and remove waitForRequests again after reconsideration 2020-12-23 20:00:36 +01:00
mhuisi
23371c5f82 feat: waitForDiagnostics & waitForResponses requests 2020-12-23 20:00:36 +01:00
mhuisi
80b87390e6 chore: trailing whitespace 2020-12-23 20:00:36 +01:00
mhuisi
563d4f3adc chore: complete rebase and add deriving commands 2020-12-23 20:00:36 +01:00
Marc Huisinga
0dca44da30 chore: ever so slightly improve watchdog doc 2020-12-23 20:00:36 +01:00
Marc Huisinga
8658577731 chore: refactor Watchdog 2020-12-23 20:00:36 +01:00
Marc Huisinga
6248e6329e chore: refactor jsonrpc and lsp handle functions and deal with fallout 2020-12-23 20:00:36 +01:00
Marc Huisinga
975b344278 chore: adjust to upstream 2020-12-23 20:00:36 +01:00
Marc Huisinga
614e981c19 chore: refactor with new where syntax and auto-quantification 2020-12-23 20:00:36 +01:00
Marc Huisinga
8c4becbdd3 chore: superficial refactoring 2020-12-23 20:00:36 +01:00
Marc Huisinga
c4d3f99969 chore: use MonadLift and autolifting 2020-12-23 20:00:36 +01:00
Marc Huisinga
5c07f20c3b chore: fix Less name 2020-12-23 20:00:36 +01:00
Wojciech Nawrocki
e0d2af1805 chore: move to new frontend 2020-12-23 20:00:36 +01:00
Marc Huisinga
382d0474c4 chore: remove dead code and fix some minor styling details 2020-12-23 20:00:36 +01:00
Marc Huisinga
fe9af6a602 chore: refactor old compiler bug hack fix 2020-12-23 20:00:36 +01:00
Marc Huisinga
1698c44d2c fix: some silly errors 2020-12-23 20:00:36 +01:00
Marc Huisinga
e420d101f9 feat: request cancellation 2020-12-23 20:00:36 +01:00
Marc Huisinga
ef878bc526 feat: error pending requests in watchdog on termination or crash 2020-12-23 20:00:36 +01:00
Marc Huisinga
c83499a54e feat: add pending requests tracking 2020-12-23 20:00:36 +01:00
Wojciech Nawrocki
cf3d6e8f5e feat: use MonadIO in LSP communication 2020-12-23 20:00:36 +01:00
mhuisi
8decfb6b1d feat: initial multiprocess watchdog arch 2020-12-23 20:00:36 +01:00
Leonardo de Moura
5f6e66a53f refactor: Repr
Modifications:
- Result type is `Format`
- It takes the context precedence like Haskell `Show`
2020-12-18 11:21:30 -08:00
Leonardo de Moura
15335efae2 refactor: move Format to Init package
We are going to use it to define `Repr` class.
2020-12-18 11:21:30 -08:00
Leonardo de Moura
67bcff3bc8 chore: use deriving DecidableEq 2020-12-17 17:48:23 -08:00
Leonardo de Moura
0d9694d836 chore: user deriving BEq 2020-12-13 16:30:07 -08:00
Leonardo de Moura
04a07c15b9 chore: use deriving Inhabited 2020-12-13 11:57:59 -08:00
Leonardo de Moura
3b6d65c3c3 chore: use deriving Inhabited 2020-12-13 10:09:20 -08:00
Leonardo de Moura
7a4b544b1c feat: improve application type mismatch error message
If the type error is at an implicit argument, we annotate
application with `pp.explicit := true`

Given the type incorrect definition
```
def f {a b c : α} : a = c :=
  Eq.trans (a := a) (b := b = c)
```
We now generate the error
```
error: application type mismatch
  @Eq.trans α a (b = c)
argument
  b = c
has type
  Prop
but is expected to have type
  α
```
@Kha Note that we only enable `pp.explicit := true` for the relevant
application. That is, we set `pp.explicit := false` for each children.

Unfortunately, there is a corner case.
```
set_option pp.explicit true
def f {a b c : α} : a = c :=
  Eq.trans (a := a) (b := b = c)
```
produces the error
```
error: application type mismatch
  @Eq.trans α a (b = c)
argument
  @Eq α b c
has type
  Prop
but is expected to have type
  α
```
The reset `pp.explicit := false` overwrote the user option.
I think the simplest solution is the following
1- The delaborator saves the initial set of Options `Init`
2- When it finds a node annotated with a `pp` options, it only
consider the option if it is not set by `Init`.

What do you think?
2020-12-09 13:58:08 -08:00
Leonardo de Moura
5064115ff1 feat: trie for hierarchical names 2020-12-03 16:40:00 -08:00
Leonardo de Moura
9d304df757 feat: heterogeneous Append experiment
@Kha This one required a bunch of manual fixes. The main issue is that
before we added the string interpolation feature, we created
`MessageData`s using `++` and coercions. For example, given
`(e : Expr)`, we would write
```
let msg : MessageData := "type: " ++ e
```
and rely on the coercions `String -> MessageData` and
`Expr -> MessageData`, and the instance `Append MessageData`.
However, heterogeneous operators "block" the expected type propagation downwards.
This kind of code is obsolete now since we can write a more compact
version using string interpolation
```
let msg := m!"type: {e}"
```
2020-12-01 16:32:41 -08:00
Leonardo de Moura
baabfc13e0 chore: remove occurrences of Append.append 2020-12-01 15:44:03 -08:00
Leonardo de Moura
d734a2605b chore: adjust stdlib 2020-11-29 17:01:56 -08:00
Sebastian Ullrich
2a5c85d9e3 refactor: inline FormatMacro
@leodemoura: This was just a remnant of the initial frontend porting, correct?
2020-11-28 12:37:36 +01:00
Leonardo de Moura
0869f38de4 chore: update structure, class, inductive 2020-11-27 15:09:30 -08:00
Leonardo de Moura
d6f778bec4 refactor: arbitrary without explicit arguments
@Kha I was tired of writing `arbitrary _` :)
There 0 places in the stdlib where the type needs to be provided.
If in the future we need to specify the type we can use
`arbitrary (α := <type>)`
2020-11-25 09:07:38 -08:00