Gabriel Ebner
b09fee680c
fix(frontends/lean/info_manager): only store holes once
2017-06-15 10:22:48 +02:00
Leonardo de Moura
3700bb4568
chore(library/tactic/hole_command,frontends/lean/interactive): fix style
2017-06-14 22:23:25 -07:00
Leonardo de Moura
7557a9e000
feat(shell/server,frontends/lean): add "hole_commands" server command
...
The new command returns the list of registered/applicable hole
commands.
2017-06-14 22:16:34 -07:00
Leonardo de Moura
7528e14e68
feat(frontends/lean,shell/server): "hole" command
2017-06-14 21:56:17 -07:00
Leonardo de Moura
55c8627f2c
feat(frontends/lean): {! ... !} takes a list of pre-terms
2017-06-13 22:19:17 -07:00
Leonardo de Moura
bb2c39b471
feat(frontends/lean): add hole notation {! ... !}
...
Holes {! ... !} are elaborated using `sorry`.
We report an error if their value is fixed by typing and/or
elaboration rules.
We store the tactic_state and the optional attribute in the
info_manager. The idea is to allow users to execute commands with
respect to the stored tactic state and optional attribute.
The optional attribute is a pre term.
We are planning to add commands such as:
- Check type of the given argument.
- Reduce the given argument.
- Synthesize the hole automatically, where the given argument encodes
hint to the synthesizer.
- Use the given argument to fill the hole.
2017-06-13 18:53:05 -07:00
Johannes Hölzl
1352d4a5b3
feat(src/frontents/lean): support for coinduction command in frontend
2017-06-12 20:42:48 -07:00
Leonardo de Moura
2a51fc4458
fix(frontends/lean): anonymous constructor and structure instances for private structures
2017-06-07 17:51:23 -07:00
Sebastian Ullrich
dd91630a83
feat(frontends/lean/user_notation): more error checking
2017-06-07 10:09:38 -07:00
Sebastian Ullrich
db08f3f139
fix(frontends/lean/user_notation): check for closedness before evaluating term
2017-06-07 10:09:38 -07:00
Sebastian Ullrich
01c430cd62
fix(frontends/lean/{parser_config,user_notation): persisting user notations
2017-06-07 10:09:38 -07:00
Sebastian Ullrich
56995348d3
hack(frontends/lean/parser): allow input to be substituted and use it to implement interpolating format macro
2017-06-07 10:09:38 -07:00
Sebastian Ullrich
c49f6f7873
refactor(frontends/lean/user_notation): use parser instead of tactic monad
2017-06-07 10:09:38 -07:00
Sebastian Ullrich
20ab8feeae
feat(init/meta/lean/parser): pexpr parser that does not use quoted mode
2017-06-07 10:09:38 -07:00
Sebastian Ullrich
18063fa9ba
feat(frontends/lean): user-defined notation parsers
2017-06-07 10:09:38 -07:00
Sebastian Ullrich
be6f2eada7
chore(*): typos
2017-06-07 10:09:38 -07:00
Sebastian Ullrich
283d8ade1a
fix(library/quote): use opaque macro for elaborated expr quotations
2017-06-07 10:00:17 -07:00
Leonardo de Moura
748eb856c3
fix(frontends/lean): fixes #1649
...
This issue is yet another reason for refactoring how parameters are
represented in Lean.
2017-06-06 21:33:24 -07:00
Gabriel Ebner
1e7e440951
fix(library/module_mgr): actually cancel invalidated tasks
2017-06-05 19:36:09 +02:00
Gabriel Ebner
d03b61635c
fix(frontends/lean/module_parser): end-of-file position
2017-06-05 09:08:38 +02:00
Leonardo de Moura
ca5439c698
feat(frontends/lean/tactic_notation): add support for tac ; [tac_1, ..., tac_n] notation in interactive tactic mode
...
closes #1634
This commit also changes the semantic of `tactic.focus [tac_1, ..., tac_n]`.
It now fails if the number of goals is not `n`.
Before it would only fail if there were more tactics than goals.
@Armael: See tests/lean/run/handthen.lean for examples of the new notation.
2017-06-02 11:38:04 -07:00
Leonardo de Moura
a8173c8194
feat(library/init): heterogeneous andthen type class, and tactic.seq_focus implementation
2017-06-02 10:38:27 -07:00
Leonardo de Moura
d7ab5cd8a1
feat(frontends/lean/tactic_notation): allow show keyword to be used as syntax sugar for the show_goal tactic
...
@kha @gebner I added the `show_goal` tactic for selecting arbitrary
subgoals. This feature is similar to the one available in Isabelle.
This commit allows us to use the `show` keyword as syntax sugar for
`show_goal`. The test `show_goal.lean` has a small example.
What do you think?
@Armael: you can use `show` to structure your proofs in tactic mode.
See `tests/lean/run/show_goal.lean` for a small example.
2017-06-01 18:52:54 -07:00
Sebastian Ullrich
09987df06e
fix(frontends/lean/structure_cmd): do not collect m_ctx_locals multiple times
2017-06-01 07:38:30 -07:00
Sebastian Ullrich
1977b5bfc9
refactor(frontends/lean/structure_cmd): also simplify collecting ctx levels
2017-06-01 07:38:30 -07:00
Sebastian Ullrich
25152bc80d
fix(frontends/lean/structure_cmd): use collect_implicit_locals to catch more context locals
...
Fixes #1623
2017-06-01 07:38:30 -07:00
Leonardo de Moura
e90bb65c7a
fix(frontends/lean/elaborator): make sure coercions from (reflected t) to expr fire when t contains metavariables that can be synthesized by type class resolution
2017-05-31 23:33:48 -07:00
Leonardo de Moura
56215b36e8
fix(*): [[fallthrough]] ==> /* fall-thru */
...
Older gcc compilers generate a warning when the attribute is used.
I found out that GCC 7 will not produce a warning if comments
such as /* fall-thru */ or /* FALLTHRU */ are used instead of the
attribute [[fallthrough]]
2017-05-31 21:18:47 -07:00
Leonardo de Moura
24048c4258
fix(*): gcc 7 weird uninitialized warnings
...
I think most of them are incorrect.
I didn't find a workaround for the one at json.hpp.
So, I just disabled this warning at server.cpp
2017-05-31 18:05:03 -07:00
Leonardo de Moura
603bbe5987
fix(*): gcc 7 linking errors
2017-05-31 16:35:09 -07:00
Leonardo de Moura
919cf420ea
fix(*): gcc 7 warnings
2017-05-31 16:35:09 -07:00
Gabriel Ebner
b1e417805e
fix(frontends/lean/scanner): do not treat 0xFF as end-of-file
...
Fixes #1624 . We just replace 0xFF by 0x00 when reading a new input
byte. This shows up as an unexpected token error.
2017-05-31 16:54:04 +02:00
Sebastian Ullrich
f820f3f97e
fix(frontends/lean/builtin_cmds): abort eval after error recovery and complain about unsynthesized mvars early
2017-05-31 16:05:47 +02:00
Sebastian Ullrich
4eab11ec3d
fix(frontends/lean/structure_cmd): even less error recovery
2017-05-30 19:02:25 +02:00
Gabriel Ebner
b14a248dcd
fix(frontends/lean/structure_cmd): segfault
2017-05-29 07:37:50 +02:00
Leonardo de Moura
4bdb2da1b6
fix(library/equations_compiler): improve pull_nested_rec_fn, and make sure it communicates local propositions to the well founded recursion module
...
The bin_tree and num_consts examples can now be encoded more naturally.
2017-05-26 10:45:39 -07:00
Leonardo de Moura
62c24f9bb5
chore(*): remove pos_num and num from stdlib
2017-05-25 18:24:16 -07:00
Sebastian Ullrich
491802409a
chore(*): remove unused macro_definition_cell::pp method
2017-05-24 09:51:23 +02:00
Leonardo de Moura
ca684102f6
refactor(library/tactic,frontends/lean): move tactic_evaluator to library/tactic
2017-05-23 15:30:31 -07:00
Leonardo de Moura
4fbb65d9f1
feat(frontends/lean,library/equations_compiler): store tactics for generating well founded relation and decreasing proofs
2017-05-23 15:00:29 -07:00
Gabriel Ebner
ce44566c7d
fix(frontends/lean/parser): do not skip command tokens after error recovery
2017-05-23 11:14:31 -07:00
Gabriel Ebner
47629e9da3
feat(frontends/lean): make most parser_errors recoverable
2017-05-23 11:14:31 -07:00
Gabriel Ebner
95300224aa
fix(frontends/lean/builtin_cmds): suppress unhelpful #check output
2017-05-23 11:14:31 -07:00
Gabriel Ebner
183bf63e26
fix(frontends/lean/parser): pass error-recovery flag from parser to elaborator
2017-05-23 11:14:31 -07:00
Gabriel Ebner
77a2311f09
fix(frontends/lean/elaborator): segfault
2017-05-23 11:14:31 -07:00
Gabriel Ebner
166c07e1fe
fix(frontends/lean/elaborator): do not leak _elab_u names
2017-05-23 11:14:31 -07:00
Gabriel Ebner
eea61a1991
fix(frontends/lean/definition_cmds): fix trace messages in proofs
2017-05-23 11:14:31 -07:00
Gabriel Ebner
d4b45abad6
fix(frontends/lean/elaborator): ground universe meta-variables in tactic terms
2017-05-23 11:14:30 -07:00
Gabriel Ebner
dd91ef3b22
fix(frontends/lean/elaborator): fix compilation with gcc
2017-05-23 11:14:30 -07:00
Gabriel Ebner
6b956ad658
fix(frontends/lean): prevent endless loops
2017-05-23 11:14:30 -07:00