Commit graph

59 commits

Author SHA1 Message Date
Sebastian Ullrich
18063fa9ba feat(frontends/lean): user-defined notation parsers 2017-06-07 10:09:38 -07:00
Sebastian Ullrich
60a244e4f9 fix(frontends/lean,shell): fix file dependencies 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
803d3073ae feat(frontends/lean): add interactive.type_formatter attribute and use it to pretty print interactive tactics 2017-03-17 18:20:44 -07:00
Leonardo de Moura
71a7a7f466 feat(frontends/lean): add default field values 2017-01-22 21:25:49 -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
30cea2dceb fix(frontends/lean): auxiliary bind-application in do-notation was not allowing us to obtain type information for the monadic actions.
The new test exposes the problem.
2017-01-12 18:38:31 -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
Leonardo de Moura
93ccea11fc chore(frontends/lean): remove dead code
`abstract` can be implemented as a tactic on top of add_decl.
2016-11-04 12:36:12 -07:00
Leonardo de Moura
95ffdca3f7 feat(frontends/lean/decl_attributes): add 'default_priority' attribute 2016-10-01 13:27:08 -07:00
Leonardo de Moura
c8a720212b feat(frontends/lean): 'by' is now also using interactive mode syntax 2016-09-29 01:57:40 -07:00
Leonardo de Moura
97261fcc48 feat(frontends/lean): add very basic 'begin ... end' block support 2016-09-24 21:27:27 -07:00
Leonardo de Moura
2b570e1eae refactor(frontends/lean): remove old attributes 2016-09-21 14:22:17 -07:00
Leonardo de Moura
335242e9f1 chore(frontends/lean): remove info_annotation module 2016-09-19 21:19:31 -07:00
Leonardo de Moura
2a069a4d2a chore(frontends/lean): remove server and info_manager 2016-09-19 18:44:03 -07:00
Leonardo de Moura
f6aba503ff chore(frontends/lean): remove old elaborator 2016-09-19 17:10:28 -07:00
Daniel Selsam
52f87760d8 feat(src/library/inductive_compiler): support for nested inductive types 2016-09-16 12:50:59 -07:00
Leonardo de Moura
31de40ff4d refactor(frontends/lean): rename attribute [constructor] ==> [elab_with_expected_type] 2016-09-06 13:12:51 -07:00
Leonardo de Moura
2a912c2650 feat(frontends/lean, library): move constructor attribute to frontend
Now, it only affects the elaborator.
2016-09-05 09:34:45 -07:00
Leonardo de Moura
a74f02546b refactor(*): remove abbreviation command 2016-09-03 17:11:29 -07:00
Daniel Selsam
a9b01991c2 feat(frontends/lean/inductive_cmd): new frontend for the inductive cmd
Conflicts:
	src/frontends/lean/CMakeLists.txt
	src/frontends/lean/structure_cmd.h
2016-08-17 07:34:03 -07:00
Leonardo de Moura
e384b5c5f9 refactor(frontends/lean): move structure_instance to separate module 2016-08-16 14:56:09 -07:00
Daniel Selsam
8aebea558a feat(frontends/lean/inductive_cmds): scaffold for new inductive commands 2016-08-11 13:48:54 -07:00
Leonardo de Moura
371dd9d1e1 refactor(frontends/lean): move match-expr parser to different module 2016-08-08 09:05:22 -07:00
Leonardo de Moura
1e6b3614ab feat(frontends/lean): new pattern matching validation
@Kha, we now support variable/constant shadowing in patterns.
A constant may occur in a pattern if it is a constructor or tagged with
the new [pattern] attribute. In the standard library, I have tagged
'add', 'zero', 'one', 'bit0', 'bit1' and 'rfl' with this new attribute.
BTW, arbitrary constants and variables may occur nested in type ascriptions and
inaccessible terms.

Here is an example:

     meta_definition tactic_result_to_string {A : Type} : tactic_result A → string
     | (success a s)   := to_string a
     | (exception ⌞A⌟ e s) := "Exception: " ++ to_string (e ())

I had to use the inaccessible ⌞A⌟ in the example above, otherwise, we would be shadowing the parameter
{A : Type}, and we would get a type error.

The new validation is performed at to_pattern_fn (parser.cpp).
2016-08-07 11:31:11 -07:00
Leonardo de Moura
1ca15e9b42 chore(frontends/lean): remove obtain-expr dead code 2016-08-03 17:41:16 -07:00
Leonardo de Moura
594c7ca4c5 chore(frontends/lean/find_cmd): remove find_decl command 2016-08-03 17:32:47 -07:00
Leonardo de Moura
01283512a6 feat(frontends/lean/elaborator): add code for deciding which function application elaboration procedure should be used 2016-07-25 12:55:28 -07:00
Leonardo de Moura
54f68226f4 chore(frontends/lean): disable old tactic framework and blast 2016-04-25 16:22:15 -07:00
Leonardo de Moura
d88098f38d chore(frontends/lean): remove some of the tactic support 2016-04-25 15:26:56 -07:00
Leonardo de Moura
03809e7973 refactor(frontends/lean): elaborator_context 2016-04-05 16:19:06 -07:00
Leonardo de Moura
75549bafd7 refactor(frontends/lean/elaborator): rename elaborator to old_elaborator 2016-03-30 14:59:18 -07:00
Leonardo de Moura
9d0dfb8404 refactor(frontends/lean): remove calc_proof_elaborator 2016-03-03 17:22:45 -08:00
Leonardo de Moura
22f3efc5be remove(frontends/lean): begin_end pre-tactics
This was never used
2016-03-03 10:02:09 -08:00
Leonardo de Moura
e3a35ba4fd feat(frontends/lean): add 'with_attributes' tactical
closes #494
2015-12-13 18:27:44 -08:00
Leonardo de Moura
34b944a71e refactor(frontends/lean): remove broken 'migrate' command 2015-12-08 15:40:49 -08:00
Leonardo de Moura
8ee214f133 checkpoint: new numeral encoding 2015-11-08 14:04:55 -08:00
Leonardo de Moura
3d9b557cfd feat(frontends/lean): allow the user to mark subterms that should be automatically abstracted into new definitions
closes #484
2015-06-12 17:49:26 -07:00
Leonardo de Moura
ab58e538a4 feat(frontends/lean/elaborator): hide auxiliary 'match' hypothesis during elaboration 2015-05-25 15:24:56 -07:00
Leonardo de Moura
616f49c2e4 feat(frontends/lean): improved 'obtains' expression 2015-05-05 18:30:16 -07:00
Leonardo de Moura
a23118d357 feat(frontends/lean): add tactic_notation command
This addresses the first part of issue #461

We still need support for tactic definitions
2015-04-27 17:46:13 -07:00
Leonardo de Moura
53653c3526 fix(frontends/lean): pretty printing in sections with parameters
fix #530
2015-04-21 22:44:09 -07:00
Leonardo de Moura
9b577a7b3e feat(frontends/lean): add 'migrate' command 2015-03-14 21:48:00 -07:00
Leonardo de Moura
ded869b7e0 refactor(frontends/lean): move placeholder_elaborator to library/tactic 2014-12-19 15:23:22 -08:00
Leonardo de Moura
69750c50c6 refactor(frontends/lean): move pp_options to library 2014-12-19 15:00:05 -08:00
Leonardo de Moura
ac664505e6 refactor(library): move class management to library module 2014-12-09 21:38:55 -08:00
Leonardo de Moura
52334dca29 feat(frontends/lean): parse "decreasing" expressions 2014-12-04 15:11:23 -08:00
Leonardo de Moura
d81a6259e8 feat(frontends/lean/find_cmd): add options for controlling find_decl 2014-11-24 00:16:10 -08:00
Leonardo de Moura
fa405d7884 refactor(frontends/lean): combine info annotations in a single module 2014-11-04 18:01:20 -08:00
Leonardo de Moura
dc7ab17d2a feat(frontends/lean/calc_proof_elaborator): add 'elaborator.calc_assistant' option 2014-10-31 09:49:45 -07:00
Leonardo de Moura
79f73c44dc feat(frontends/lean/placeholder_elaborator): add 'elaborator.unique_class_instances' flag, closes #265
By default, it is false.
When it is true, class instance resolution generates an error if there
is more than one solution.
2014-10-30 14:21:24 -07:00