Leonardo de Moura
e5cf12e2ad
refactor(frontends/lean/elaborator): cleanup interface
2016-08-10 08:20:10 -07:00
Leonardo de Moura
a0a72b5b82
refactor(frontends/lean): move local_context_adapter to separate folder
2016-08-10 07:52:38 -07:00
Leonardo de Moura
ac57fb9d2a
fix(frontends/lean/match_expr): nary match revision
2016-08-10 07:24:10 -07:00
Leonardo de Moura
6d21896cd5
chore(emacs/lean-syntax): highlight mutual_definition and mutual_inductive
2016-08-09 18:49:26 -07:00
Leonardo de Moura
f75de2e950
chore(library/definitional,frontends/lean): remove decreasing macro
2016-08-09 16:27:33 -07:00
Leonardo de Moura
2736ac48f4
fix(library/compiler/inliner): disable problematic optimization
2016-08-08 13:59:12 -07:00
Leonardo de Moura
53aa89f1e1
fix(frontends/lean/structure_cmd): generate code for automatically generated coercions
2016-08-08 13:58:34 -07:00
Leonardo de Moura
139c15878d
chore(frontends/lean/decl_cmds): change syntax for specifying custom well-founded relations
2016-08-08 13:30:09 -07:00
Sebastian Ullrich
82657b3b64
refactor(library/compiler/inliner, library): replace inline command with attribute
...
sed -Ei 's/inline (protected )?(meta_)?definition (\S+)/\1\2definition \3 [inline]/' library/**/*.lean
2016-08-08 12:45:22 -07:00
Sebastian Ullrich
c3ea0c1852
refactor(frontends/decl_cmds): simplify definition parsing logic
...
Also restrict syntax to `inline? (private|protected)? noncomputable?`
2016-08-08 12:44:37 -07:00
Leonardo de Moura
1602a53336
feat(frontends/lean): nary match
2016-08-08 10:04:58 -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
325d590bd0
fix(frontends/lean): add missing files
2016-08-08 08:16:31 -07:00
Leonardo de Moura
b9c62af37d
feat(frontends/lean/parser): remove unnecessary restriction
2016-08-07 11:40:39 -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
d36280f74f
refactor(frontends/lean): id_behavior
2016-08-07 08:07:24 -07:00
Leonardo de Moura
5eddff44ab
fix(frontends/lean/builtin_exprs): better error position
2016-08-06 13:43:09 -07:00
Leonardo de Moura
fb8ae7f411
chore(frontends/lean/parser): add comment
2016-08-06 13:24:10 -07:00
Leonardo de Moura
1041f6d9d8
feat(frontends/lean/structure_cmd): private structures
2016-08-06 00:03:06 -07:00
Leonardo de Moura
46570bd51d
fix(frontends/lean/structure_cmd): bug when generating alias for S.induction_on in the structure command
2016-08-05 23:13:39 -07:00
Leonardo de Moura
5c0a69657d
feat(frontends/lean/pp,library/local_context): nicer pp for fresh names
2016-08-05 19:06:26 -07:00
Leonardo de Moura
2899f909a6
feat(util/fresh_name): API for detecting whether a name was created using mk_fresh_name
2016-08-05 19:02:31 -07:00
Leonardo de Moura
276b47688f
feat(frontends/lean/elaborator): uvar => param at top-level
2016-08-05 18:24:37 -07:00
Leonardo de Moura
48f7731675
chore(frontends/lean/decl_attributes): fix 'make style' warnings
2016-08-05 17:25:37 -07:00
Leonardo de Moura
1dd93b34ad
chore(frontends/lean/print_cmd): compilation error on g++ 8.2
2016-08-05 17:22:16 -07:00
Leonardo de Moura
38524475c9
chore(library/attribute_manager): fix warning
2016-08-05 17:22:01 -07:00
Sebastian Ullrich
15595c0061
refactor(library/attribute_manager): delegate parameter parsing and printing to attribute class
2016-08-05 17:16:04 -07:00
Leonardo de Moura
b6420904f5
feat(frontends/lean): resolved quoted names
2016-08-05 17:04:36 -07:00
Leonardo de Moura
7bb6ccc089
refactor(library/init/meta): qexpr ==> pexpr
2016-08-05 17:04:36 -07:00
Leonardo de Moura
ef28ae5073
feat(library/vm/vm_format,library/tactic): use thunks unit->format when producing error messages
2016-08-04 19:19:09 -07:00
Leonardo de Moura
befe2d96e1
feat(frontends/lean/elaborator): chaining for anonymous constructors
2016-08-04 15:08:25 -07:00
Leonardo de Moura
8b05fba6ef
feat(frontends/lean/elaborator): propagate expected type to arguments when elaborating constructors
2016-08-04 14:07:15 -07:00
Leonardo de Moura
6a0d9dab40
feat(frontends/lean/elaborator): anonymous constructors
2016-08-04 13:03:49 -07:00
Leonardo de Moura
52b66a1573
chore(frontends/lean/pp, library/pp_options): pp.lazy_abstraction ==> pp.delayed_abstraction
2016-08-03 18:45:47 -07:00
Leonardo de Moura
e9d2d51760
fix(library/type_context): prevent assertion violation
2016-08-03 18:43:55 -07:00
Leonardo de Moura
b79a8ddd25
fix(library/attribute_manager): incorrect assertion
2016-08-03 18:26:09 -07:00
Leonardo de Moura
a7eb7edafb
fix(library/metavar_util): assertion violation
2016-08-03 18:20:59 -07:00
Daniel Selsam
70a1e53ba8
feat(simplifier/simp_lemmas): take arbitrary list of attributes and cache
2016-08-03 18:04:28 -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
971a5dae69
refactor(frontends/lean/inductive_cmd): replace old_type_checker_ptr with type_context
2016-08-03 17:29:09 -07:00
Leonardo de Moura
f4e1e92807
feat(frontends/lean/decl_cmds): use new elaborator for variable, parameter and constant commands
2016-08-03 17:10:45 -07:00
Leonardo de Moura
b6be493cef
feat(frontends/lean/util): elaborate priority/precedence expressions using the new elaborator
2016-08-03 17:01:34 -07:00
Leonardo de Moura
aeafe0293b
feat(frontends/lean/structure_cmd): use new elaborator to process the structure command
2016-08-03 16:56:41 -07:00
Leonardo de Moura
d473622352
refactor(frontends/lean/structure_cmd): remove unnecessary options
2016-08-03 15:48:58 -07:00
Leonardo de Moura
c32138db88
feat(library/type_context): add new trace msg
2016-08-03 15:32:04 -07:00
Leonardo de Moura
794382da01
feat(frontends/lean/elaborator): take care of foreign universe metavars in the sanitizer
2016-08-03 14:13:42 -07:00
Leonardo de Moura
e87b54988b
feat(frontends/lean/elaborator): minor cleanup
2016-08-03 13:25:49 -07:00
Leonardo de Moura
2c8e484aa3
feat(frontends/lean/elaborator): universe parameter name sanitizer
2016-08-03 13:13:44 -07:00
Leonardo de Moura
4e80094927
feat(frontends/lean/inductive_cmd): use new elaborator in the inductive command
2016-08-03 13:13:12 -07:00