Commit graph

11393 commits

Author SHA1 Message Date
Gabriel Ebner
95068e4e79 feat(library/sorry): make sorry a macro 2017-02-05 14:01:03 +01:00
Gabriel Ebner
252931a470 feat(tests/lean/test_single): show unified diffs with color 2017-02-05 13:44:21 +01:00
Gabriel Ebner
98c2998a7b feat(frontends/lean/definition_cmds): make noncomputability check non-fatal 2017-02-05 13:42:52 +01:00
Leonardo de Moura
84188c5aa1 feat(frontends/lean/elaborator): add pattern validator in the elaborator
@johoelzl We now produce a better message for your example:

   inductive R : ℕ → Prop
   | pos : ∀p n, R (p + n)

   lemma R_id : ∀n, R n → R n
   | (.p + .n) (R.pos p n) := R.pos p n

The new error is:

file.lean:5:2: error: invalid function application in pattern, it cannot be reduced to a constructor (possible solution, mark term as inaccessible using '.( )')
  .p + .n
2017-02-04 19:00:20 -08:00
Leonardo de Moura
6f95f4668f fix(library/inductive_compiler/ginductive): constructors of mutually inductive datatypes were not being registered
Actually, the constructors of the first inductive datatype in a mutually
recursive definitions were being registered.
2017-02-04 18:51:17 -08:00
Leonardo de Moura
9869ed1026 feat(library/equations_compiler/util): make sure "inaccessible annotations" do not leak into the type of automatically generated equational lemmas 2017-02-04 17:19:42 -08:00
Leonardo de Moura
dbb36f5412 feat(library/type_context): improve offset trick in the unifier 2017-02-04 17:15:05 -08:00
Leonardo de Moura
5ed49982a2 refactor(library/tactic/unfold_tactic): add dunfold C++ function 2017-02-04 16:33:12 -08:00
Leonardo de Moura
6d9c9b3f9a feat(library/type_context): avoid auxiliary definitions introduced by the equation compiler from being used in the type class resolution procedure
This can only happen in meta definitions, but the user may be confused
by this behavior.
2017-02-04 15:56:54 -08:00
Leonardo de Moura
e4a27a2328 chore(tests/lean/interactive): fix test output 2017-02-04 15:53:01 -08:00
Rob Lewis
d18a47b588 feat(tactic): add tactic_format instances 2017-02-04 15:30:55 -08:00
Leonardo de Moura
45eb64add0 chore(tests/lean/run/listex3): we don't need the unit trick anymore 2017-02-04 13:55:51 -08:00
Leonardo de Moura
9e42f7ea30 test(tests/lean/run): add test for meta recursive definition wo recursive equation 2017-02-04 13:53:12 -08:00
Sebastian Ullrich
523a576bbe fix(emacs/lean-flycheck): typo 2017-02-04 13:50:22 -08:00
Gabriel Ebner
44a4b55c26 fix(emacs): keep transient marks in command hooks 2017-02-04 13:50:14 -08:00
Gabriel Ebner
d74a916c95 chore(.travis.yml): reduce ctest verbosity 2017-02-04 13:49:30 -08:00
Gabriel Ebner
69465d7b78 feat(.travis.yml): test library in trust level zero 2017-02-04 13:49:20 -08:00
Leonardo de Moura
dbf65e4c6b chore(frontends/lean/parser_state): style 2017-02-04 13:48:24 -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
160011b80e feat(frontends/lean/parser_state): parser_state API 2017-02-04 13:38:53 -08:00
Leonardo de Moura
36dc796f6c refactor(frontends/lean): add more parser_state methods 2017-02-04 11:37:26 -08:00
Leonardo de Moura
d7ab2bb196 feat(frontends/lean): add basic parser_state methods 2017-02-04 10:57:51 -08:00
Leonardo de Moura
abe0f1f386 feat(frontends/lean): new parser_state skeleton 2017-02-03 21:01:49 -08:00
Leonardo de Moura
91b68b6b90 chore(frontends/lean/parser): remove dead variable 2017-02-03 19:55:19 -08:00
Leonardo de Moura
01414cf21c feat(frontends/lean): add token class, and procedure for consuming the tokens 2017-02-03 18:11:06 -08:00
Leonardo de Moura
aff5a2dd37 fix(library/init/meta): bug introduced 9bee8ce36d 2017-02-03 17:01:46 -08:00
Leonardo de Moura
5d3b889684 fix(util/lean_path): fixes #1339 2017-02-03 15:19:48 -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
ab94e71e37 feat(library/type_context): do not fail on universe constraints of the form ?u =?= max ?u v
We solve them by creating a fresh metavariable ?w

         ?u := max ?w v

Remark: this is a precise solution.
2017-02-02 22:30:30 -08:00
Leonardo de Moura
b2968f450c fix(frontends/lean/elaborator): use expected type when elaborating application for the form (c^.fn a)
For example, the following definition did not work before this commit:

  protected meta def map {α β} (f : α → β) : lazy_tactic α → lazy_tactic β
  | t s := (t s)^.for (λ ⟨a, new_s⟩, (f a, new_s))
2017-02-02 19:56:50 -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
Sebastian Ullrich
1bcdbf38bd feat(emacs/lean-flycheck): Next Error: show all errors at current or next position 2017-02-01 18:48:45 -08:00
Sebastian Ullrich
c3a655fdae fix(emacs/lean-server): check if current buffer is still there when handling response 2017-02-01 18:48:45 -08:00
Sebastian Ullrich
6eded75702 fix(emacs/lean-flycheck): show running tasks when highlighting disabled or not in current file 2017-02-01 18:48:45 -08:00
Johannes Hölzl
36f8d0f0a0 chore(library/tactic/generalize_tactic): fix spelling in error message 2017-02-01 18:48:10 -08:00
Johannes Hölzl
3be8deb2d2 fix(library/tactic/generalize_tactic): instantiate mvars before calling kabstract 2017-02-01 18:48:10 -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
a9821f6437 fix(library/type_context): bug in revert method
We should not assume that the arguments at to_revert are sorted by idx.
This commit fixes the bug reported at:
https://groups.google.com/forum/#!topic/lean-user/x4Zwpou3le0
2017-02-01 10:51:24 -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
49a0d13c50 feat(library/init/coe): add coercion from A to (option A)
A little hack is used to make sure type class resolution will not enter
in an infinite loop.
2017-01-31 17:45:41 -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
2874a783e0 test(tests/lean/run/defaul_param3): more tests for default param values 2017-01-31 15:28:06 -08:00
Leonardo de Moura
be6ca7c244 feat(frontends/lean): allow default parameter values in constant decls 2017-01-31 15:19:47 -08:00
Leonardo de Moura
3a4ef00f66 feat(frontends/lean): allow constructor parameters to be declared before ':' 2017-01-31 15:11:39 -08:00
Leonardo de Moura
73c16f95b9 fix(CMakeLists): config 2017-01-31 11:14:12 -08:00
Gabriel Ebner
0f96809f7a fix(frontends/lean/parser): save noncomputable theory flag in snapshots 2017-01-31 11:05:11 -08:00
Leonardo de Moura
941ba6d96c chore(*): style 2017-01-31 11:04:21 -08:00
Gabriel Ebner
fb9b719a22 chore(checker/simple_pp): pretty-print changed Sort/Prop/Type 2017-01-31 10:20:56 +01:00
Gabriel Ebner
bc75c2423f feat(checker): only print axioms that are referenced by the specified theorems 2017-01-31 10:20:56 +01:00