Leonardo de Moura
b05c4e09ed
feat(library/init/meta): add memoize field to simp_config and dsimp_config
...
We use `memoize := ff` when implementing `conv.interactive.for` and
`conv.interactive.find`.
2017-07-01 10:37:09 -07:00
Leonardo de Moura
f7fe2a775c
feat(library/init/meta/rewrite_tactic): improve rewrite tactic
...
`rewrite` tactic improvements
- Add support for `auto_param` and `opt_param`
- Order new goals using the same strategies available for `apply`
- Allow user to set configuration object in interactive mode.
@Armael This commit should address the issue you raised about the order
of new goals in the `rewrite` tactic.
See new test tests/lean/run/rw1.lean for examples.
2017-06-30 12:03:27 -07:00
Leonardo de Moura
fe51bebab3
refactor(library/init/meta/converter): new conv monad implementation
2017-06-29 16:37:22 -07:00
Mario Carneiro
47c3c0ba84
fix(tests/*): fix tests
2017-06-22 08:24:19 -07:00
Leonardo de Moura
51a28828d6
chore(tests/lean/interactive/info_tactic): fix test
2017-06-21 17:03:24 -07:00
Mario Carneiro
e6f3c5cc22
fix(tests/lean/interactive/mk_input): strip \r from input files (win)
2017-06-21 08:53:11 +02:00
Leonardo de Moura
2866607319
chore(tests): fix tests
2017-06-18 18:33:38 -07:00
Leonardo de Moura
fe774a25cf
chore(tests/lean/interactive): fix tests
2017-06-15 10:56:09 -07:00
Leonardo de Moura
5cb96c7fa3
feat(frontends/lean): add option for pretty printing metavars, sorry and delayed abstractions as holes
...
This option is false by default, but true when executing hole commands
2017-06-15 10:24:26 -07:00
Gabriel Ebner
028c31779d
fix(frontends/lean/interactive): revert hole end column
...
I have tested this change in both emacs and vscode, and replacements
work correctly.
This reverts commit 6c2a144950 .
2017-06-15 17:01:10 +02:00
Leonardo de Moura
6c2a144950
fix(frontends/lean/interactive): hole end column
2017-06-15 07:36:11 -07:00
Leonardo de Moura
ba25d4876e
feat(frontends/lean/info_manager): multi-line holes
2017-06-15 07:23:06 -07:00
Gabriel Ebner
a001e85d82
fix(frontends/lean/builtin_exprs): set hole position after final token
2017-06-15 11:35:43 +02:00
Leonardo de Moura
7557a9e000
feat(shell/server,frontends/lean): add "hole_commands" server command
...
The new command returns the list of registered/applicable hole
commands.
2017-06-14 22:16:34 -07:00
Sebastian Ullrich
a72687661b
fix(util/stackinfo): avoid and guard against negative overflow in g_stack_threshold computation
2017-06-07 13:22:11 +02:00
Jeremy Avigad
4592210e10
fix(tests/lean/*): fix and expand tests
2017-06-04 13:23:26 -07:00
Jeremy Avigad
650870fd0e
fix(tests/lean/interactive/*): fix tests
2017-06-04 13:23:26 -07:00
Jeremy Avigad
4160f23847
fix(library/init/meta/interactive): fix printing of description string for locations
2017-06-04 13:23:26 -07:00
Leonardo de Moura
ca5439c698
feat(frontends/lean/tactic_notation): add support for tac ; [tac_1, ..., tac_n] notation in interactive tactic mode
...
closes #1634
This commit also changes the semantic of `tactic.focus [tac_1, ..., tac_n]`.
It now fails if the number of goals is not `n`.
Before it would only fail if there were more tactics than goals.
@Armael: See tests/lean/run/handthen.lean for examples of the new notation.
2017-06-02 11:38:04 -07:00
Leonardo de Moura
d10a799b79
chore(tests/lean/interactive/complete_field): fix test
2017-05-27 10:18:44 -07:00
Gabriel Ebner
95300224aa
fix(frontends/lean/builtin_cmds): suppress unhelpful #check output
2017-05-23 11:14:31 -07:00
Gabriel Ebner
183bf63e26
fix(frontends/lean/parser): pass error-recovery flag from parser to elaborator
2017-05-23 11:14:31 -07:00
Gabriel Ebner
166c07e1fe
fix(frontends/lean/elaborator): do not leak _elab_u names
2017-05-23 11:14:31 -07:00
Gabriel Ebner
d27a0eff15
chore(tests): fix tests
2017-05-23 11:14:31 -07:00
Gabriel Ebner
99754188e6
feat(library/compiler/eta_expansion): also eta-expand expressions containing sorry
2017-05-23 11:14:31 -07:00
Gabriel Ebner
af63d4036b
chore(tests): update tests
2017-05-23 11:14:31 -07:00
Gabriel Ebner
89ad117be3
chore(tests): update tests with changes to error recovery
2017-05-23 11:14:30 -07:00
Gabriel Ebner
54114fd7bd
fix(frontends/lean/tactic_notation): do not clamp errors to the end of {} blocks
2017-05-23 07:28:34 +02:00
Leonardo de Moura
7d2ec25e81
fix(tests/lean/interactive/complete_field): fix tests
2017-05-16 14:50:15 -07:00
Leonardo de Moura
74550fbebc
feat(library/init/core): add notation for out_param
2017-05-01 13:52:17 -07:00
Leonardo de Moura
5cef84709f
refactor(library): avoid auxiliary definitions such as add/mul/le/etc
...
See Section "Other goodies" at
https://github.com/leanprover/lean/wiki/Refactoring-structures
This commit also improves the support for projections in the
unifier/matcher.
Now, we consider the extra case-split for projections.
Given a projection `proj`, and the constraint `proj s =?= proj t`, we need to try first `s =?= t` and if it fails, then try to reduce.
This is needed in the standard library because we now have constraints such as:
```
@has_le.le ?A ?s ?a ?b =?= @has_le.le nat nat.has_add x y
```
If we reduce the right hand side, we get the unsolvable constraint
```
@has_le.le ?A ?s ?a ?b =?= nat.le x y
```
Before this change, the constraint was `@le ?A ?s ?a ?b =?= @le nat nat.has_add x y`, and we already perform a case-split in this case.
Moreover, projections were eagerly reduced whenever possible.
The extra case-split generates a performance problem in several tests. For example `fib 8 = 34` was timing out.
I worked around this issue by performing the case-split only when the constraint contains meta-variables.
There are also minor issues. Example. `<` is notation for `has_lt.lt`, but `>` is for `gt`.
2017-05-01 08:52:19 -07:00
Gabriel Ebner
a7d58008ac
fix(frontends/lean/parser): show exception message in import errors
2017-04-27 16:04:18 -07:00
Sebastian Ullrich
e9a6c544af
refactor(frontends/lean/{elaborator,structure_cmd}): compile structure inheritance to nested fields
2017-04-24 19:35:15 +02:00
Sebastian Ullrich
6ab0a008f9
feat(frontends/lean/{builtin_cmds,interactive}): complete namespace/section after end
2017-04-23 11:26:31 -07:00
Sebastian Ullrich
a54514fead
feat(frontends/lean/print_cmd): complete identifiers after #print
2017-04-23 11:26:31 -07:00
Sebastian Ullrich
5b17c3cbd9
fix(frontends/lean/interactive): fall back to elaborator info when not an interactive tactic
...
Fixes #1530
2017-04-23 11:26:31 -07:00
Gabriel Ebner
01a7efc007
fix(library/module_mgr): do not crash on missing imports
...
Fixes #1506 .
2017-04-04 19:56:33 +02:00
Sebastian Ullrich
cd013f22c0
chore(*): replace "'^.' notation" with "field notation", pretty print using "."
2017-03-31 09:40:49 -07:00
Sebastian Ullrich
3c8e176fb0
fix(frontends/lean/interactive): fix info on new field notation
2017-03-31 09:40:49 -07:00
Gabriel Ebner
f9c1ceb717
fix(frontends/lean/scanner): correctly handle positions in empty files
2017-03-31 09:40:15 -07:00
Leonardo de Moura
71bf0bcc5d
fix(frontends/lean/builtin_exprs): fixes #1493
2017-03-27 17:57:13 -07:00
Leonardo de Moura
eea46610ea
fix(library/tactic/simplify): missing projection reduction, add proj := tt to simp
2017-03-27 17:38:40 -07:00
Leonardo de Moura
b09968a37b
feat(library/tactic/simplify): add beta := tt to simp
2017-03-27 17:38:31 -07:00
Sebastian Ullrich
68c1ff6219
feat(frontends/lean/builtin_exprs): use local field inference for info too
2017-03-27 14:01:38 -07:00
Gabriel Ebner
8c1136c1b6
fix(library/module_mgr): get_first_diff_pos: handle newlines correctly
2017-03-27 14:01:04 -07:00
Gabriel Ebner
2da9d72491
chore(tests/lean/interactive): fix test
2017-03-23 09:14:32 +01:00
Gabriel Ebner
a8ba78e20a
refactor(frontends/lean/tactic_notation): remove irtactic in favor of itactic
2017-03-23 09:07:08 +01:00
Gabriel Ebner
d90dda01b0
chore(*): fix tests
2017-03-23 09:03:43 +01:00
Gabriel Ebner
9dfd8e1018
fix(shell/server): fix field completion
2017-03-23 09:03:43 +01:00
Gabriel Ebner
ef0e113b4b
chore(tests): fix tests
2017-03-23 09:03:43 +01:00