Daniel Fabian
a8914380dc
feat: add Ord and deriving instance for it.
...
For many data structures having an ordering is necessary. This one adds the `Ord` type class and a deriving handler for it. The ordering is based on order of constructors followed by lexicographical ordering within a constructor.
2021-04-03 21:27:26 -07:00
Leonardo de Moura
ab4ec76a25
chore: update stage0
2021-04-03 21:02:46 -07:00
Leonardo de Moura
0586fe3200
feat: activate auto completion
...
There are many pending TODO's, and issues with the error recovery code.
We also need a test suite.
2021-04-03 21:01:17 -07:00
Leonardo de Moura
9d12856432
feat: missing forM
2021-04-03 18:24:31 -07:00
Leonardo de Moura
750691bd5a
chore: fix tests
2021-04-03 18:24:03 -07:00
Leonardo de Moura
09ee8bddad
feat: tactic name completion
2021-04-03 15:45:44 -07:00
Leonardo de Moura
20f569c033
feat: set_option completion
2021-04-03 15:06:50 -07:00
Leonardo de Moura
0a94aaabc9
feat: use expected type to prioritize completion candidates
2021-04-03 14:12:42 -07:00
Leonardo de Moura
398bbcfce3
feat: save aditional information for id completion, and suppress implicit prefix when reporting completion types
2021-04-03 12:53:32 -07:00
Leonardo de Moura
a6a008ec5b
feat: use user provided name if available
2021-04-03 12:52:25 -07:00
Leonardo de Moura
ac35b543bf
feat: add addional CompletionInfo
2021-04-03 11:17:51 -07:00
Sebastian Ullrich
d0996fb945
chore: improve EOI error message
2021-04-03 11:56:26 +02:00
Sebastian Ullrich
46ec999a71
fix: don't leak thread-local stream objects
...
Fixes #245
2021-04-03 10:00:17 +02:00
Leonardo de Moura
ff1d27370c
feat: add CompletionInfo
2021-04-02 20:44:57 -07:00
Leonardo de Moura
f631bd8df9
test: inductive predicate example
2021-04-02 16:21:54 -07:00
Leonardo de Moura
8cd6b573d6
chore: update stage0
2021-04-02 16:21:54 -07:00
Leonardo de Moura
d26aa5e1ab
feat: black list other auxiliary constructions
2021-04-02 16:21:54 -07:00
Sebastian Ullrich
e20b2c359a
feat: server: show goal state after tactic if cursor not strictly before tactic
2021-04-03 00:23:46 +02:00
Sebastian Ullrich
ac9fee5854
test: add Lean 3-style interactive server tests
...
Fixes #376
2021-04-03 00:23:46 +02:00
Sebastian Ullrich
334320fd40
fix: lean --run
2021-04-03 00:23:46 +02:00
Sebastian Ullrich
8f67921221
feat: Json.setObjVal!
2021-04-03 00:23:46 +02:00
Sebastian Ullrich
8440097e87
chore: server: repr-print invalid header
2021-04-03 00:23:45 +02:00
Leonardo de Moura
90f2438cfd
chore: update stage0
2021-04-02 11:13:40 -07:00
Leonardo de Moura
ed4504929d
refactor: add Server/Completion.lean
...
Add environment extension for black listing declaritions for completion.
2021-04-02 11:10:06 -07:00
Leonardo de Moura
9815d626f5
feat: hide auxiliary constructions when generating completion candidates
2021-04-02 11:10:06 -07:00
Leonardo de Moura
bc44ad65ae
feat: only consider dot completion info occurring in the hover line
2021-04-02 11:10:06 -07:00
Leonardo de Moura
8c2ba16f74
feat: store expected type at DotCompletionInfo
2021-04-02 11:10:06 -07:00
Leonardo de Moura
a22d8dd924
fix: the code is reachable
2021-04-02 11:10:06 -07:00
Sebastian Ullrich
30062b8988
fix: nomatch with non-fvar terms
2021-04-02 16:04:47 +02:00
Leonardo de Moura
5e66f4c97c
feat: dot completion experiment
...
We still need to use the expected type, fix error recovery, etc. But it
is showing signs of life for very basic examples.
It is disabled for now.
2021-04-01 23:31:38 -07:00
Leonardo de Moura
c9f4359045
feat: add DotCompletionInfo
2021-04-01 23:31:38 -07:00
Leonardo de Moura
447e57ee99
chore: update-stage0
2021-04-01 23:31:38 -07:00
Leonardo de Moura
caae7952cd
feat: add helper parsers for auto-completion
2021-04-01 23:31:38 -07:00
Leonardo de Moura
8d00a06d97
feat: add helper functions for completion
2021-04-01 23:31:38 -07:00
Sebastian Ullrich
63b96f62e7
feat: server: auto completion skeleton
2021-04-01 18:26:17 +02:00
Sebastian Ullrich
b1d00d9984
fix: missing cmake dependency
2021-04-01 18:22:53 +02:00
Sebastian Ullrich
7bb3d10014
chore: ensure that a failing node parser creates at least one missing
2021-04-01 17:24:50 +02:00
Sebastian Ullrich
40bb034b51
fix: use pp.raw options when falling back to raw parser
2021-04-01 16:42:04 +02:00
Leonardo de Moura
2837873db5
fix: longestMatch error recovery
...
@kha When replacing an error with a longer one, we were keeping the
message for the longer error, but losing its node.
2021-03-31 20:09:36 -07:00
Leonardo de Moura
2fc775954c
fix: error recovery
...
@kha We have a few parsers that invoke `tokenFn`, and return error
depending of what is on the top of the stack (e.g., `ident`).
These parsers were not restoring the stack size when reporting errord,
and messing up the error recovery. We never notice the problem because
operators such as <|> restore the stack size, and we were not trying
to elaborate syntacticly incorrect terms.
2021-03-31 17:05:34 -07:00
Leonardo de Moura
92193e7d70
chore: fix tests
2021-03-31 17:05:34 -07:00
Leonardo de Moura
c35f96ac82
feat: avoid bizarre error message for definition without body
...
@kha This is a temporary hack to avoid a incomprehensible error
message. I will try to tweak the parser error recovery in another
commit.
2021-03-31 17:05:34 -07:00
Leonardo de Moura
ae4f3242d4
feat: handle Syntax.missing at TermElab
2021-03-31 17:05:34 -07:00
Leonardo de Moura
3846fa0432
feat: add evalUnknown
2021-03-31 17:05:34 -07:00
Leonardo de Moura
583afaab10
chore: indent syntax
2021-03-31 17:05:34 -07:00
Leonardo de Moura
7c2338546c
feat: add pp.rawOnError
...
@Kha after I enabled elaboration on syntactically incorrect terms, the
fallback is activated more often, and the raw term seems to have
little value for most users, and it is just scary.
Not sure whether the flag is a good idea, but it produces are more
user friendly output.
2021-03-31 17:05:34 -07:00
Leonardo de Moura
148594ca67
chore: use register_builtin_option
2021-03-31 17:05:34 -07:00
Leonardo de Moura
de024274fe
feat: elaborate syntactically incorrect commands
2021-03-31 17:05:34 -07:00
Sebastian Ullrich
ee55ac5508
chore: fix test
2021-03-31 21:24:28 +02:00
Leonardo de Moura
a5e1370c8c
doc: add example
2021-03-31 08:13:22 -07:00