Leonardo de Moura
c694dbd600
fix(frontends/lean/elaborator): conflict between (: t :) and (::) notations
...
It was preventing us from using `(::)`
2017-03-12 09:29:42 -07:00
Leonardo de Moura
8d3c7e7180
fix(frontends/lean/builtin_exprs): fixes #1433
2017-03-07 16:21:12 -08:00
Leonardo de Moura
fa99861788
feat(frontends/lean/elaborator): add new ^. notation
...
see #1403
2017-03-05 20:12:49 -08:00
Sebastian Ullrich
5d68938a9c
feat(frontends/lean): expr literals ```(...)
2017-03-05 08:37:16 -08:00
Leonardo de Moura
552a185e6a
feat(frontends/lean): 'let' in 'do' blocks
2017-02-24 09:10:36 -08:00
Sebastian Ullrich
dfe1874365
refactor(frontends/lean/{parser,util}): extract quote functions
...
Also fixes ``f when f is private
2017-02-23 01:52:13 +01:00
Leonardo de Moura
74f7bc0473
feat(frontends/lean): improve notation for converting infix notation into functions
2017-02-17 23:11:22 -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
Leonardo de Moura
10c881266b
refactor(frontends/lean): add parse_lparen
2017-02-17 21:46:39 -08:00
Sebastian Ullrich
b9424975b3
refactor(init/meta): replace dynamically-checked quotes where possible
2017-02-17 19:59:57 -08: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
Sebastian Ullrich
339713091f
refactor(frontends/lean): simpler field notation info that also works with implicit parameters
2017-02-17 13:03:47 +01:00
Leonardo de Moura
c1c1cd417a
fix(frontends/lean/builtin_exprs): make sure we use internal names (i.e., names starting with _) when compiling do-blocks
...
@johoelzl This commit fixes the problem you reported at slack.
2017-02-15 22:45:59 -08:00
Leonardo de Moura
55aa2023f4
feat(frontends/lean): add support for monad_fail type class in 'do' blocks
2017-02-05 20:09:08 -08:00
Leonardo de Moura
3ef463ccc9
chore(frontends/lean/builtin_exprs): update error messages for do-blocks
2017-02-05 19:07:23 -08:00
Leonardo de Moura
4283fe9bb7
fix(frontends/lean/builtin_exprs): missing pattern when lhs is a constant constructor
2017-02-05 19:03:00 -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
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
77a9feaf70
refactor(frontends/lean): PType ==> Sort
...
see #1341
2017-01-30 11:54:00 -08:00
Leonardo de Moura
bf9f7560f7
feat(frontends/lean): (Type u) can't be a proposition
...
(Type u) is the old (Type (u+1))
(PType u) is the old (Type u)
Type* is the old (Type (_+1))
PType* is the old Type*
The stdlib can be compiled, but we still have > 70 broken tests
See discussion at #1341
2017-01-30 11:54:00 -08:00
Gabriel Ebner
5fdc737dfc
feat(library/tactic): store name of current declaration in tactic_state
2017-01-28 08:27:19 +01:00
Sebastian Ullrich
92ebaaa0f8
fix(frontends/lean/builtin_exprs): ite/dite prec should be lowest
2017-01-26 18:52:20 +01: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
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
46a3aacc17
fix(frontends/lean): begin...end block scope
2017-01-03 21:01:14 -08:00
Leonardo de Moura
9c069a3eda
refactor(library/tactic/congruence): rename directory to smt
2016-12-30 13:15:19 -08:00
Leonardo de Moura
6a5f6a84cd
feat(library/tactic/congruence/hinst_lemma): add heuristic instantiation lemmas
2016-12-25 20:11:58 -08:00
Sebastian Ullrich
00b8c2ca81
feat(frontends/lean/elaborator): save info on field of field expression
2016-12-18 23:48:50 -08:00
Leonardo de Moura
6577cc87a3
feat(library): add pre_monad
...
closes #1235
2016-12-08 12:48:55 -08:00
Leonardo de Moura
f02de7e380
feat(frontends/lean/builtin_exprs): curly braces after show/have enter interactive mode
2016-11-18 17:00:08 -08:00
Leonardo de Moura
b59c10118d
fix(*): memory leaks
2016-11-11 11:56:54 -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
9b84db083d
fix(frontends/lean): error localization bugs
2016-10-15 13:40:57 -07:00
Leonardo de Moura
837915f06b
fix(frontends/lean/builtin_exprs): bug when parsing in quoted names
2016-10-01 13:19:24 -07:00
Leonardo de Moura
7ab12ed57f
feat(library/init/algebra): improve transport_to_additive (copy attributes)
2016-10-01 12:55:17 -07:00
Leonardo de Moura
051b6bd026
feat(frontends/lean/tactic_notation): add notation for entering auto-quotation mode
2016-09-30 16:18:52 -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
bbf21b4e65
feat(frontends/lean/begin_end_block): auto-quote identifiers
2016-09-25 17:25:21 -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
93106a6b02
chore(frontends/lean/builtin_exprs): error message consistency
2016-09-23 10:08:22 -07:00
Leonardo de Moura
7ae778e925
feat(frontends/lean): generalize '~>' notation, and add alias '^.' for '~>'
2016-09-23 08:18:19 -07:00
Leonardo de Moura
b55a17614a
feat(frontends/lean): structure instances
2016-09-21 22:52:43 -07:00
Leonardo de Moura
c0ff9967af
feat(frontends/lean): add basic notation for collections
2016-09-21 16:20:57 -07:00
Leonardo de Moura
dde5f7ac70
feat(frontends/lean): add aliases such as: .1 for ~>1
2016-09-21 11:32:02 -07:00
Leonardo de Moura
b67216374c
feat(frontends/lean): projection notation
2016-09-21 11:14:41 -07:00
Leonardo de Moura
8657230435
chore(frontends/lean): new token for projections, and cleanup
2016-09-21 10:18:49 -07:00
Leonardo de Moura
318ef761d3
feat(frontends/lean): lambda+anonymous_constructor+match notation
2016-09-21 08:49:05 -07:00
Leonardo de Moura
335242e9f1
chore(frontends/lean): remove info_annotation module
2016-09-19 21:19:31 -07:00
Leonardo de Moura
09687f70af
chore(frontends/lean/builtin_exprs): fix compilation warning
2016-09-19 19:50:30 -07:00
Leonardo de Moura
2a069a4d2a
chore(frontends/lean): remove server and info_manager
2016-09-19 18:44:03 -07:00