Leonardo de Moura
c0e6314f14
fix(library/init/meta,library/tactic/elaborate): bad error position when to_expr is used outside of interactive mode
2017-02-09 18:44:50 -08:00
Leonardo de Moura
c8bbb34e2a
feat(frontends/lean): add auto_param gadget
2017-02-09 15:49:10 -08:00
Leonardo de Moura
5e397795cf
fix(library/init/meta): focus tactic
...
This commit also add the interactive tactic 'focus'
2017-02-09 10:02:19 -08:00
Leonardo de Moura
3d603ec28e
feat(kernel,library,frontends/lean,api): remove global universe levels from kernel and APIs
2017-02-08 17:41:44 -08:00
Leonardo de Moura
32e6442d0a
feat(frontends/lean): no global universes in the frontend
2017-02-08 17:23:04 -08:00
Leonardo de Moura
c5dc8e651a
chore(library/init/meta): cleanup
2017-02-08 15:33:25 -08:00
Leonardo de Moura
54f7bf9391
fix(frontends/lean, library/tactic): remove redundant error messages, and fix position of error messages
...
Summary:
We minimize the number of "'sorry' used warning messages". We also
re-target the error to the main declaration. Example: foo._main ==> foo
We do not report for auxiliary declarations such as "_example" and
"foo.equations._eqn_1"
Get rid of the redundant error message "error : failed" for tactics.
We added "silent failures" in the tactic framework.
We do not store line/col information for tactics nested in notation
declarations. Before this commit, we would have tactics such
as (tactic.save_info line col) nested inside of notation declarations.
2017-02-07 20:25:28 -08:00
Leonardo de Moura
e06d6aa6d4
feat(frontends/lean/elaborator): relax condition on match-convoy
2017-02-07 16:11:43 -08:00
Leonardo de Moura
96ccb148b1
feat(library/init/meta/simp_tactic): add top_down simplifier combinator
2017-02-06 20:06:13 -08:00
Leonardo de Moura
a28d6a94fd
feat(library/init/meta): add any_goals tactic
2017-02-06 16:23:29 -08:00
Leonardo de Moura
ae06844f57
chore(library/init/meta): remove unnecessarily '| failed' annotations
...
tactic and smt_tactic are instaces of monad_fail
2017-02-05 20:12:42 -08:00
Leonardo de Moura
8b662d19ac
feat(library/init/category/monad_fail): add monad_fail type class
2017-02-05 18:46:29 -08:00
Leonardo de Moura
797b26f402
fix(frontends/lean/tactic_notation): trace messages in nested blocks were not being displayed in the correct place
2017-02-05 18:20:10 -08:00
Leonardo de Moura
30a1876fc8
feat(library/init/meta): add add_aux_decl and abstract tactics
2017-02-05 16:00:47 -08:00
Leonardo de Moura
1eb771f5a1
chore(library/init/meta/async_tactic): missing copyright
2017-02-05 14:47:43 -08:00
Gabriel Ebner
95068e4e79
feat(library/sorry): make sorry a macro
2017-02-05 14:01:03 +01:00
Rob Lewis
d18a47b588
feat(tactic): add tactic_format instances
2017-02-04 15:30:55 -08:00
Leonardo de Moura
b28ed2453e
feat(frontends/lean/definition_cmds): allow meta recursive definitions without recursive equations
2017-02-04 13:44:05 -08:00
Leonardo de Moura
aff5a2dd37
fix(library/init/meta): bug introduced 9bee8ce36d
2017-02-03 17:01:46 -08:00
Leonardo de Moura
2640d3085b
fix(library/init/meta/interactive): name resolution problems in parametric sections
2017-02-03 14:04:59 -08:00
Leonardo de Moura
9bee8ce36d
fix(frontends/lean/elaborator): thunk gadget should not be considered in patterns
...
The new test demonstrates the problem.
2017-02-02 17:28:03 -08:00
Leonardo de Moura
bb9a0c79f4
feat(frontends/lean/builtin_exprs): better syntax for quoted terms with type ascription
2017-02-01 12:49:38 -08:00
Leonardo de Moura
6e7929252f
feat(frontends/lean, library/init): add 'thunk' gadget
...
We can now write
trace "hello" t
instead of
trace "hello" (fun _, t)
2017-01-31 18:41:59 -08:00
Leonardo de Moura
7cc31835e4
refactor(library/init/meta/fun_info): cleanup fun_info API
2017-01-31 18:01:54 -08:00
Leonardo de Moura
920e845b84
refactor(library/init/meta/congr_lemma): cleanup congr_lemma API
2017-01-31 16:46:13 -08:00
Leonardo de Moura
5da8b205b9
feat(library/type_context, frontends/lean/elaborator): type classes with output parameters
2017-01-30 18:32:54 -08:00
Leonardo de Moura
bf9f7560f7
feat(frontends/lean): (Type u) can't be a proposition
...
(Type u) is the old (Type (u+1))
(PType u) is the old (Type u)
Type* is the old (Type (_+1))
PType* is the old Type*
The stdlib can be compiled, but we still have > 70 broken tests
See discussion at #1341
2017-01-30 11:54:00 -08:00
Gabriel Ebner
3804722b91
fix(init/meta/decl_cmds): avoid blocking
2017-01-28 08:27:23 +01:00
Gabriel Ebner
e839080834
feat(init/meta/async_tactic): add tactic to prove subgoals in a different task
2017-01-28 08:27:23 +01:00
Gabriel Ebner
952f444710
feat(init/meta/task): allow task creation from VM
2017-01-28 08:27:23 +01:00
Gabriel Ebner
5fdc737dfc
feat(library/tactic): store name of current declaration in tactic_state
2017-01-28 08:27:19 +01:00
Leonardo de Moura
b1d097e63a
feat(library/init/meta): add 'delta' tactic for applying delta reduction
...
closes #1331
2017-01-26 19:04:07 -08:00
Leonardo de Moura
552ca66e9e
feat(library/init/meta/pexpr): expose low level function mk_placeholder
2017-01-25 15:32:50 -08:00
Leonardo de Moura
258fb522d3
feat(library/tactic/smt): add generation heuristic to control matching loops
2017-01-24 22:46:45 -08:00
Leonardo de Moura
ac6bfce01c
feat(library/tactic/smt/congruence_closure): improve propagation for beta reduction in the congruence closure module
2017-01-24 12:09:37 -08:00
Leonardo de Moura
6d12de6339
refactor(library/init/meta/smt): use default value for config structures
2017-01-23 14:18:06 -08:00
Leonardo de Moura
778d5382f6
refactor(library/init/meta/simp_tactic): use default field values at simplify_config
2017-01-23 10:22:48 -08:00
Leonardo de Moura
4b11afcb46
feat(library/init/meta/interactive): add doc strings
2017-01-22 16:41:27 -08:00
Leonardo de Moura
3516773644
chore(library/init): minor fixes
2017-01-22 14:20:48 -08:00
Leonardo de Moura
ac1db6a199
feat(library/init/meta/interactive): add some doc strings
2017-01-22 12:45:39 -08:00
Leonardo de Moura
b913ba3336
feat(library/init/meta): add type information for the arguments of the smt tactics: ematch_using and add_lemmas
2017-01-22 12:12:31 -08:00
Leonardo de Moura
a61cf4d08b
feat(library/init/meta/interactive): show type information for simp, dsimp arguments
2017-01-22 12:05:51 -08:00
Leonardo de Moura
cce88c6190
refactor(frontends/lean): interactive tactic support
...
After this commit, new interactice tactic classes can be added without
writing C++ code (see example: tests/lean/run/my_tac_class.lean).
The tactic_evaluator was simplified, and all the complexity has been
moved to tactic_notation, and lean code.
We can now inspect the intermediate states produced by the rewrite
tactic.
The function (@scope_trace _ line col thunk) can be used to position trace
messages produced by thunk. If line/col are not provided (i.e., we
just write (scope_trace thunk)), then line/col are filled with the
position of this term by the elaborator.
We can visualize the intermediate tactic states inside nested blocks
such as (try { ... })
The new infrastructure can be used to implement custom tactic_state
pretty printers.
2017-01-21 22:38:47 -08:00
Leonardo de Moura
7a6b9e193c
feat(library/vm, frontends/lean/info_manager): add thread safe vm_obj wrapper, and use it to store arbitrary vm thunks in the info_manager
2017-01-21 22:38:33 -08:00
Leonardo de Moura
4de71cadfa
feat(library/init/meta): expose additional app_builder tactics
2017-01-20 20:27:07 -08:00
Leonardo de Moura
4e6ad1d34d
fix(library/init/meta/contradiction_tactic): make sure contradiction uses whnf for constructor-eq-constructor case
2017-01-20 18:42:27 -08:00
Leonardo de Moura
e8e483534b
chore(library/init/meta/decl_cmds): remove unused parameter
2017-01-18 19:44:16 -08:00
Leonardo de Moura
0795acaf6a
refactor(library/init/algebra): new transport from multiplicative to additive
...
The motivation is to avoid the problems produced by the "declare as
structure and then tag as class idiom" described in the file ring.lean.
2017-01-18 19:39:53 -08:00
Leonardo de Moura
d0a578c3db
feat(library/init/meta/environment): add is_projection
2017-01-18 18:12:08 -08:00
Leonardo de Moura
0ad053f0f1
feat(library/init/meta/decl_cmds): add command for copying type and value using replacement
2017-01-18 17:52:11 -08:00