Commit graph

2470 commits

Author SHA1 Message Date
Leonardo de Moura
d6ab3739ff refactor(frontends/lean/elaborator): move tactic executation code to tactic_evaluator 2017-01-04 08:42:59 -08:00
Leonardo de Moura
0319fd5728 refactor(frontends/lean/elaborator): move pos_string_for 2017-01-04 07:32:44 -08:00
Leonardo de Moura
d24577c57c fix(frontends/lean/tactic_notation): remove problematic code for get_begin_end_block_elements 2017-01-03 22:38:03 -08:00
Leonardo de Moura
e6f6c6bb3a fix(frontends/lean/tactic_notation): typo 2017-01-03 22:15:22 -08:00
Leonardo de Moura
493be76afe feat(frontends/lean/tactic_notation): add support for other tactic types
TODO: we still need to add support in the elaborator.
2017-01-03 22:11:45 -08:00
Leonardo de Moura
46a3aacc17 fix(frontends/lean): begin...end block scope 2017-01-03 21:01:14 -08:00
Leonardo de Moura
c904437d57 fix(frontends/lean/elaborator): crash when elaborating invalid structure instance 2017-01-03 11:04:14 -08:00
Leonardo de Moura
abb63cbfa6 fix(frontends/lean/elaborator): cactch app_exception when trying to create coercion
closes #1279
2017-01-03 09:03:00 -08:00
Leonardo de Moura
4db7c05fb8 feat(frontends/lean/elaborator): generalize try_monad_coercion 2017-01-01 14:50:01 -08:00
Leonardo de Moura
a44a975388 feat(library/type_context,frontends/lean/elaborator): add class_exception (for max depth reached), ignore them during coercion resolution (just add a trace message) 2017-01-01 08:51:09 -08:00
Leonardo de Moura
66bc3c796a feat(frontends/lean/elaborator): add extra coercion resolution rule for monads
We also removed the notation (♯tac) since it is not needed anymore.

@gebner, the comment at elaborator.cpp explains why you had to use the ♯
notation. The workaround is a little bit hackish, but I think it is
worth it. We will use monad lifts in many different places.
2016-12-31 13:50:15 -08:00
Leonardo de Moura
fd4fffea27 chore(frontends/lean/info_manager): cleanup old code 2016-12-30 18:59:15 -08:00
Leonardo de Moura
5f87ec3356 feat(library/tactic): allow user to write their own pretty printer for tactic states 2016-12-30 18:58:50 -08:00
Leonardo de Moura
5d825483c4 refactor(library/init/meta/interactive): tactic.interactive.types ==> interactive.types
Motivation: we will use auto-quotation for other tactic monads
2016-12-30 18:06:41 -08:00
Leonardo de Moura
9c069a3eda refactor(library/tactic/congruence): rename directory to smt 2016-12-30 13:15:19 -08:00
Leonardo de Moura
85b98f08e9 fix(frontends/lean): bad position at spurious 'end' token 2016-12-29 19:51:36 -08:00
Sebastian Ullrich
98398b16f3 feat(frontends/lean,shell): implement completing options 2016-12-27 21:41:02 -08:00
Sebastian Ullrich
daf839e0d5 feat(frontends/lean,shell/server): report current goal anywhere within begin-end/by 2016-12-27 10:07:34 -08:00
Sebastian Ullrich
5cb06ea912 perf(frontends/lean/parser): break at break_at_pos even if not on an interesting token 2016-12-27 10:07:34 -08:00
Sebastian Ullrich
47e7df9b27 perf(frontends/lean/definition_cmds): skip definition elaboration during reparsing 2016-12-27 10:07:34 -08:00
Sebastian Ullrich
8ccf28abf3 chore(*): remove old code 2016-12-27 10:07:34 -08:00
Sebastian Ullrich
c9a8c02fdc feat(emacs,frontends/lean/parser,shell/server): more accurate info command using server-side parsing 2016-12-27 10:07:34 -08:00
Leonardo de Moura
cf32e25f68 fix(frontends/lean/pp): pretty print pattern hints 2016-12-26 16:13:41 -08:00
Leonardo de Moura
6a5f6a84cd feat(library/tactic/congruence/hinst_lemma): add heuristic instantiation lemmas 2016-12-25 20:11:58 -08:00
Leonardo de Moura
7d1c48e673 fix(frontends/lean/definition_cmds): "elaboration time" for lemmas was not being reported when using profiler 2016-12-25 16:49:58 -08:00
Gabriel Ebner
15157bdf0b feat(frontends/lean/parser): keep going after failed imports 2016-12-23 10:53:47 +01:00
Leonardo de Moura
66c781cce6 fix(frontends/lean/pp): bug when pretty printing partially applied polymorphic zero 2016-12-22 16:37:47 -08:00
Leonardo de Moura
cc077554b5 fix(library/tactic/change_tactic): use id_locked in the change tactic to create checkpoint
closes #1260
2016-12-21 11:29:03 -08:00
Leonardo de Moura
408ebecc11 fix(frontends/lean/elaborator): missing enforce_type 2016-12-21 09:42:47 -08:00
Gabriel Ebner
0550d2a6ac refactor(library/module): import all modules in a single call 2016-12-20 10:15:19 -08:00
Gabriel Ebner
99fc13af98 refactor(library/module_mgr): cache olean imports as well 2016-12-20 10:15:19 -08:00
Gabriel Ebner
a26e2c9108 feat(library/module): intermediary data structure for environment modifications 2016-12-20 10:15:19 -08:00
Leonardo de Moura
ffc9c75824 fix(frontends/lean/parser): do not clear local universes when switching to tactic mode and/or quoting 2016-12-19 09:21:54 -08:00
Sebastian Ullrich
9a30a06321 fix(frontends/lean/elaborator): output full names for overloads 2016-12-18 23:49:11 -08:00
Sebastian Ullrich
00b8c2ca81 feat(frontends/lean/elaborator): save info on field of field expression 2016-12-18 23:48:50 -08:00
Leonardo de Moura
1cfef1c6d9 fix(frontends/lean/parser): save next_inst_idx in the parser snapshot
This fixes issues with anonymous instances in sections.
In Emacs, we would get spurious error messages such as:

   invalid parameter/variable declaration, '_inst_1' has already been declared

This commit also adds a regression test for the problem.
2016-12-18 23:39:28 -08:00
Leonardo de Moura
d853136b82 chore(frontends/lean/builtin_cmds): leftover 2016-12-18 23:00:51 -08:00
Leonardo de Moura
f9ad1dbfc0 fix(frontends/lean/definition_cmds): bug at inline_new_defs
closes #1253
2016-12-15 20:32:06 -08:00
Leonardo de Moura
9119554835 feat(frontends/lean/structure_cmd): avoid unnecessary local_ref 2016-12-15 16:22:22 -08:00
Leonardo de Moura
6e57e70d04 fix(frontends/lean/pp): pretty print issue, and fix broken tests output
Remark: we do not allow user to access abstracted version anymore inside
of a section.
2016-12-15 15:42:54 -08:00
Leonardo de Moura
8bce559330 fix(frontends/lean/elaborator): another issue at resolve_names
see #1251
2016-12-15 15:11:24 -08:00
Leonardo de Moura
8b43314e23 feat(library/aliases,frontends/lean/parser): take local_ref's into account when defining new aliases; use get_local_ref at id_to_expr; use get_local_ref at resolve_local_name
see #1251
2016-12-15 14:10:44 -08:00
Leonardo de Moura
384cf04efd refactor(library/aliases,frontends/lean/local_ref_info): merge aliases and local_ref_info modules 2016-12-15 13:24:30 -08:00
Gabriel Ebner
d89512b6fc fix(util/task_queue): fix undefined behavior with null references 2016-12-15 09:48:57 -08:00
Gabriel Ebner
a972c13ce9 refactor(library/task_queue): move task queue to util 2016-12-12 10:01:34 -05:00
Gabriel Ebner
f584d11072 refactor(library/task_queue): do not hardcode friendship to mt_task_queue 2016-12-12 09:32:13 -05:00
Gabriel Ebner
8e0a5904d2 refactor(library/message_buffer): move info_manager out of scope_message_context 2016-12-12 08:23:15 -05:00
Leonardo de Moura
aba6f8b8a8 feat(frontends/lean/parser): add support for anonymous parameters
Example:

check λ _, 0
2016-12-10 11:07:58 -08:00
Leonardo de Moura
55401a95ec fix(frontends/lean/parser): scope in tactic mode 2016-12-10 09:39:13 -08:00
Gabriel Ebner
872082bdd9 chore(*): remove emacs autosave file 2016-12-10 08:42:20 -08:00