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
Leonardo de Moura
94e2d0b313
feat: simp theorems for && and ||
2021-03-31 08:12:24 -07:00
Leonardo de Moura
9d45ea6721
feat: try to improve dependent pattern matching failure error message
2021-03-30 23:40:11 -07:00
Daniel Fabian
93bb94bfea
test: update playground for Hashable
...
due to new code generation, adjust the playground code
2021-03-30 13:36:52 -07:00
Daniel Fabian
42c172eeec
feat: simplify Hashable implementation, allowing mutual recursive calls
...
change the generated to code recursively call the fields of recursive
and mutually recursive types. Currently, this can emit `partial`
functions due to lacking structural recursion. The code is prepared,
however, for the full implementation and can be trivially turned into
code generating non-`partial` functions
2021-03-30 13:36:52 -07:00
Daniel Fabian
ed75005422
feat: make proofs Hashable
...
change the `Hashable` class from taking a hash function of `Type u` to taking a
hash function from `Sort u`. This allows to implement `Hashable` for
propositions, which in turn is needed for inductives carrying proofs
2021-03-30 13:36:52 -07:00
Daniel Fabian
fee3390dd1
feat: add Hashable deriving
...
add support for the `Hashable` deriving by combining structural
hashes over fields
2021-03-30 13:36:52 -07:00
Leonardo de Moura
687ce2fe67
chore: update stage0
2021-03-30 13:32:06 -07:00
Leonardo de Moura
9f9529467e
chore: document recent modifications
2021-03-30 13:29:23 -07:00
Leonardo de Moura
b3a665118a
feat: add isAtomicDiscr?
2021-03-30 13:09:56 -07:00
Leonardo de Moura
4ec6804667
fix: issue at expandMatchAlts
2021-03-30 12:55:59 -07:00
Leonardo de Moura
19e0a84817
fix: make the match behavior more uniform
2021-03-30 12:19:31 -07:00
Sebastian Ullrich
7391e0ef92
fix: "unknown goal" on tactics nested in terms
2021-03-30 14:09:39 +02:00
Sebastian Ullrich
ac8f0526f6
feat: report goals from multiple info states
2021-03-30 11:38:34 +02:00
Sebastian Ullrich
06df67313c
refactor: goalsAt?
2021-03-30 11:27:42 +02:00
Leonardo de Moura
3db5b7e4ca
chore: remove dead code
2021-03-29 20:37:49 -07:00
Leonardo de Moura
f7d055830b
feat: save TacticInfo at ;
2021-03-29 20:31:48 -07:00
Leonardo de Moura
745cff41db
feat: (try to) improve InfoTree.goalsAt? (yet another heuristic)
2021-03-29 19:30:00 -07:00
Leonardo de Moura
f75d9f50a6
feat: (try to) improve InfoTree.goalsAt?
2021-03-29 18:43:33 -07:00
Leonardo de Moura
913669f081
chore: add InfoTree.findInfo?
2021-03-29 17:08:47 -07:00
Leonardo de Moura
efe67453ac
chore: add Repr Lean.SourceInfo
2021-03-29 16:55:56 -07:00
Leonardo de Moura
564d0fe1cd
chore: add getHeadPos?
2021-03-29 16:55:29 -07:00
Leonardo de Moura
558ed3da90
fix: missing argument
...
cc @Kha
2021-03-29 16:55:10 -07:00
Leonardo de Moura
002f96adc1
test: discriminant refinement
2021-03-28 19:06:06 -07:00
Sebastian Ullrich
0dfefb7b78
fix: lean4-mode: inaccessibles highlighting
2021-03-28 17:56:28 +02:00
Sebastian Ullrich
9e3b8caa4b
feat: lean4-mode: show "goals accomplished"
2021-03-28 17:40:37 +02:00
Leonardo de Moura
f8adb449fe
fix: doc
2021-03-27 19:48:25 -07:00
Leonardo de Moura
c0407c7032
chore: update stage0
2021-03-27 19:44:33 -07:00
Leonardo de Moura
41539a7725
fix: leftovers in the local context when applying induction
2021-03-27 19:42:22 -07:00
Leonardo de Moura
566fad77d4
chore: helper methods
2021-03-27 18:48:03 -07:00
Leonardo de Moura
08d865b475
chore: remove unnecessary generalizing
2021-03-27 15:03:13 -07:00
Leonardo de Moura
aa753898c6
chore: update stage0
2021-03-27 15:00:39 -07:00
Leonardo de Moura
b32b542a85
chore: fix mkForbiddenSet
2021-03-27 14:59:05 -07:00
Leonardo de Moura
2e5a9d9c99
chor: fix import
2021-03-27 14:34:44 -07:00