Sebastian Ullrich
95b317fa64
refactor(frontends/lean): do not hard code commands accepting attributes & modifiers
2017-06-19 11:09:26 -07:00
Leonardo de Moura
bf0d785888
feat(library/messages, frontends/lean): optional end position for messages
...
We need this information to be able to fix issues with the transient
message boxes feature (#1667 ).
2017-06-15 10:47:58 -07:00
Sebastian Ullrich
56995348d3
hack(frontends/lean/parser): allow input to be substituted and use it to implement interpolating format macro
2017-06-07 10:09:38 -07:00
Leonardo de Moura
748eb856c3
fix(frontends/lean): fixes #1649
...
This issue is yet another reason for refactoring how parameters are
represented in Lean.
2017-06-06 21:33:24 -07:00
Gabriel Ebner
ce44566c7d
fix(frontends/lean/parser): do not skip command tokens after error recovery
2017-05-23 11:14:31 -07:00
Gabriel Ebner
345cd1bc2a
feat(frontends/lean/parser): error recovery in interactive tactics
2017-05-23 11:14:30 -07:00
Gabriel Ebner
00ac867ddf
feat(frontends/lean/elaborator,library/sorry): suppress error message that mention synthetic sorrys
2017-05-23 11:14:30 -07:00
Gabriel Ebner
1468461c47
feat(frontends/lean): recover from many parser errors
2017-05-23 11:14:30 -07:00
Sebastian Ullrich
669c4130b1
fix(frontends/lean/builtin_expr): no field notation after @/@@
2017-03-31 09:40:49 -07:00
Sebastian Ullrich
b92af074c0
feat(kernel/pos_info_provider): add save_pos_info
...
Allows the elaborator to contribute new info locations
2017-03-31 09:40:48 -07:00
Leonardo de Moura
ad859817b1
feat(frontends/lean): allow local decls to shadow namespaces
2017-03-29 16:09:45 -07:00
Leonardo de Moura
6183c7676e
feat(frontends/lean): use . for field access
2017-03-28 15:29:54 -07:00
Leonardo de Moura
cefe1dd294
chore(frontends/lean/parser): update comments
2017-03-28 12:10:11 -07:00
Leonardo de Moura
07c29c0779
chore(library/abstract_parser,frontends/lean/parser): remove dead code
2017-03-28 11:51:50 -07:00
Gabriel Ebner
318910f99b
refactor(frontends/lean/parser): store snapshots in a lazy async list
2017-03-27 14:00:53 -07:00
Gabriel Ebner
5f872912e0
refactor(shell/lean): set exit status 1 iff at least one error was reported
2017-03-23 08:57:56 +01:00
Gabriel Ebner
595cbb8fe9
refactor(*): task<T>, log_tree, cancellation_token
2017-03-23 08:57:52 +01:00
Sebastian Ullrich
524a381f22
refactor(lean/tactic_notation): better goal info tweak on ,
2017-03-22 07:54:12 -07:00
Sebastian Ullrich
2394f1faa5
fix(frontends/lean/util): do not fall back to current position
2017-03-06 11:02:51 -08:00
Sebastian Ullrich
5d68938a9c
feat(frontends/lean): expr literals ```(...)
2017-03-05 08:37:16 -08:00
Leonardo de Moura
077176b82f
feat(frontends/lean): add Haskell-like for converting infix notation into functions
...
Examples:
qsort (<) [20, 5, 10, 3, 2, 14, 1]
foldl (+) 0 [1, 2, 3]
2017-02-17 22:51:50 -08:00
Sebastian Ullrich
9d8c84713c
refactor(*): reduce exception context info from expr to pos_info
2017-02-17 13:45:57 +01:00
Sebastian Ullrich
d15591a2d8
feat(library,frontends/lean): expose parser to Lean and use for parsing tactic parameters
2017-02-17 13:45:56 +01:00
Leonardo de Moura
6334ff24eb
fix(frontends/lean/tactic_notation): erase position information quoted terms occurring inside `[...]
...
See new test for understanding the problem.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2017-02-09 19:06:56 -08:00
Leonardo de Moura
aa5eea6416
feat(frontends/lean): add scope management to parser_state, remove unnecessary undef_ids
2017-02-08 11:58:14 -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
Gabriel Ebner
95068e4e79
feat(library/sorry): make sorry a macro
2017-02-05 14:01:03 +01: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
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
Gabriel Ebner
0f96809f7a
fix(frontends/lean/parser): save noncomputable theory flag in snapshots
2017-01-31 11:05:11 -08:00
Leonardo de Moura
4d3ff955d3
feat(frontends/lean): nicer syntax for default parameter values
...
See #1340
2017-01-30 15:54:26 -08: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
a6f120b5e7
fix(frontends/lean/parser): uninitialized variable
2017-01-21 22:38:33 -08:00
Leonardo de Moura
c52be7e8c5
feat(frontends/lean,shell): autocompletion for ^.
...
@kha, I added autocompletion for ^. I try to elaborate the expression
before ^. using the local context provided by the parser.
The autocompletion only works if the type for the expression before ^. can be
inferred. This is a big limitation because this information cannot be
obtained in many cases. Here are examples that do not work:
meta def proof_for (e : expr) : smt_tactic expr :=
do cc ← to_cc_state, cc^.proof_for e
--^ does not work here
If we annotate cc with its type, it works:
meta def proof_for (e : expr) : smt_tactic expr :=
do cc : cc_state ← to_cc_state, cc^.proof_for e
--^ works
We don't have typing information on the equation lhs at
autocompletion time. So, the following will not work
private meta def mk_smt_goals_for (cfg : smt_config)
: list expr → list smt_goal → list expr → tactic (list smt_goal × list expr)
| [] sr tr := return (sr^.reverse, tr^.reverse)
--^ does not work since
| (tg::tgs) sr tr := ...
2017-01-17 19:27:59 -08:00
Sebastian Ullrich
484bb67d44
fix(frontends/lean/tactic_notation): report state after tactic execution on ,
2017-01-17 16:38:00 -08:00
Gabriel Ebner
1a6629ce3b
feat(frontends/lean/parser): keep list of tasks that have to succeed
2017-01-17 15:31:17 -08:00
Gabriel Ebner
db81e4b5b8
feat(frontends/lean/parser): gracefully handle scanner exceptions in imports
2017-01-11 23:49:44 -08:00
Sebastian Ullrich
cc3126e944
feat(frontends/lean,library/scoped_ext,shell): complete namespaces
2017-01-10 12:25:33 +01:00
Sebastian Ullrich
b04df04120
feat(frontends/lean): rework and simplify completion parsing, enabling completion of empty prefixes
2017-01-10 12:25:33 +01:00
Leonardo de Moura
93c8e69313
chore(frontends/lean, library): cleanup anonymous instance management
2017-01-06 14:37:44 -08:00
Sebastian Ullrich
26e2aeec7a
feat(frontends/lean,shell): complete attributes
2017-01-06 14:02:31 -08:00
Sebastian Ullrich
2816d3a036
feat(frontends/lean,shell): complete interactive tactics
2017-01-06 14:02:31 -08:00
Sebastian Ullrich
7040844f9a
feat(frontends/lean/parser,shell): complete imports
2017-01-06 14:02:31 -08:00
Leonardo de Moura
85b98f08e9
fix(frontends/lean): bad position at spurious 'end' token
2016-12-29 19:51:36 -08:00
Sebastian Ullrich
98398b16f3
feat(frontends/lean,shell): implement completing options
2016-12-27 21:41:02 -08:00