Leonardo de Moura
995f71cf4e
feat(library/init/lean/elaborator/preterm): add setPos
2019-08-13 14:32:14 -07:00
Leonardo de Moura
19960ba781
chore(stage0): update
2019-08-13 13:24:31 -07:00
Leonardo de Moura
e16288136b
fix(library/init/lean/elaborator/basic): logErrorAndThrow should not log error twice
2019-08-13 13:24:00 -07:00
Leonardo de Moura
ad1a2b3251
feat(library/init/lean/elaborator/preterm): add toLevel
...
Convert `Syntax` into "pre" universe level term used in Lean3
2019-08-13 13:06:48 -07:00
Leonardo de Moura
9735b979eb
feat(library/init/lean/elaborator/command): add #preterm command for testing toPreTerm
2019-08-13 09:52:15 -07:00
Leonardo de Moura
94c88e1333
chore(stage0): update
2019-08-13 09:01:23 -07:00
Leonardo de Moura
0ff4334c9f
feat(library/init/lean/elaborator): add preterm.lean
2019-08-13 09:00:05 -07:00
Leonardo de Moura
ae7167d626
fix(library/equations_compiler): equation compiler bug reported by @dselsam on Zulip
...
@kha @dselsam: I added a small repro for the bug reported by Daniel on
Zulip. The current fix is not polished at all since we will replace
the equation compiler with one implemented in Lean. The bug is once
again on the code that handle nested `match`-expressions containing
recursive calls. We had problems in this module before, and the
current compilation strategy using auxiliary `*._match_<id>` functions
is also very inconvenient for users. They are often puzzled when they
see these auxiliary functions appearing in proof goals after unfolding
and/or simplification. They usually don't know what to do with these
auxiliary definitions, and have no idea how they were defined and what
they correspond to if the function has several nested
`match`-expression. Right now, the best option is to use `#print
<fun-name>._match_<id>` which is far from ideal.
@kha: @dselsam and I discussed an alternative approach where we do not
create the auxiliary definitions, annotate the generated `cases_on`
applications with meta-data indicating they correspond to a nested
match, and modify the pretty printer to display these annotated
`cases_on` applications using the `match` syntax. With these
modifications, the behavior will be similar to the one in Coq where
complex `match`-expressions are reduced to atomic ones. The only
difference is that we represent these "atomic" `match`-expressions
using `cases_on` applications.
This commit uses a simpler version of this approach where we do not
create auxiliary `*._match_<id>` functions, and more importantly do
not use the dreadful `pull_nested_rec_fn` code.
2019-08-12 19:20:26 -07:00
Leonardo de Moura
cb5a6a5a2f
feat(library/init/lean/elaborator/resolvename): add preresolveNames for setting Syntax.ident presolved field
2019-08-11 16:08:31 -07:00
Leonardo de Moura
cea1fa3036
feat(library/init/lean/elaborator/command): display position information at #resolve_name
2019-08-11 15:59:10 -07:00
Leonardo de Moura
4fe9c30d6f
fix(library/init/lean/elaborator/resolvename): use eraseDups
2019-08-11 15:50:17 -07:00
Leonardo de Moura
1ae2186484
fix(library/init/lean/elaborator/alias): avoid duplicates
2019-08-11 15:48:27 -07:00
Leonardo de Moura
3dad81daee
feat(library/init/lean/elaborator): add resolvename.lean
2019-08-11 15:37:37 -07:00
Leonardo de Moura
7195244b04
feat(library/init/data/array/qsort): ensure qsort terminates even for bad lt relations
2019-08-10 22:10:14 -07:00
Leonardo de Moura
64adc4c798
feat(library/metavar_context): use MetavarContext implemented in Lean
2019-08-10 08:03:13 -07:00
Sebastian Ullrich
5379636a94
chore(tests/bench): fix benchmarks
2019-08-10 12:52:42 +02:00
Leonardo de Moura
7d4c7ce1d3
chore(library/init/lean/metavarcontext): fix typo
2019-08-09 22:13:12 -07:00
Leonardo de Moura
aeae37eb81
feat(library/init/lean/metavarcontext): missing functions
2019-08-09 21:04:34 -07:00
Leonardo de Moura
99d4b33559
feat(library/metavar_context): metavar_decl as Lean object
2019-08-09 20:38:59 -07:00
Leonardo de Moura
5dd3b67a75
feat(library/metavar_context): delayed_assignment as Lean object
2019-08-09 20:30:52 -07:00
Leonardo de Moura
d924aab766
feat(library/init/lean/metavarcontext): export functions to C++
2019-08-09 20:09:11 -07:00
Leonardo de Moura
d1671ffcea
chore(library): remove dead code
2019-08-09 16:08:51 -07:00
Leonardo de Moura
f8199bb540
fix(library/playground/patch): updateArgs => modifyArgs
2019-08-09 16:05:29 -07:00
Leonardo de Moura
54312cfa51
feat(library/init/lean/metavarcontext): add basic functions
2019-08-09 11:26:51 -07:00
Leonardo de Moura
92da659ec7
feat(library/init/data/persistenthashmap/basic): add PersistentHashMap.contains
2019-08-09 11:25:01 -07:00
Leonardo de Moura
b8cd88a827
chore(library/init): delete dead files
2019-08-09 10:35:38 -07:00
Leonardo de Moura
dfa9ca5dc5
chore(library/init/lean/compiler/ir/basic): style
2019-08-09 10:19:35 -07:00
Leonardo de Moura
d00019f57e
chore(library/init): fix whitspaces before =>
2019-08-09 09:13:49 -07:00
Leonardo de Moura
4d913370a7
chore(library/init): eliminate whitespaces using another patch script
2019-08-09 09:01:39 -07:00
Leonardo de Moura
245d476845
fix(script/patch): apply changes
2019-08-09 08:52:49 -07:00
Leonardo de Moura
48f72b9b34
chore(library/init/lean/syntax): helper functions
2019-08-09 08:52:49 -07:00
Sebastian Ullrich
de5c7cbff0
fix(shell/CMakeLists): bin_lean_stage0 should not be part of the default target as it conflicts with bin_lean
...
/cc @leodemoura
2019-08-09 16:43:19 +02:00
Leonardo de Moura
4aed3e51b5
chore(stage0): update
2019-08-09 07:40:54 -07:00
Sebastian Ullrich
5b296cbb33
chore(tests/lean/ll_infer_type_bug): fix partial file manually
2019-08-09 11:11:34 +02:00
Sebastian Ullrich
3ed67138d5
chore(*): update equation syntax in files and old parser
...
for f in ../../**/*.lean; do echo $f; ./patch.lean.out $f > tmp && cat tmp > $f; done
2019-08-09 11:11:34 +02:00
Sebastian Ullrich
8f55517d8c
chore(tests/lean/run/coroutine): abbreviate abbreviation
2019-08-09 11:11:34 +02:00
Sebastian Ullrich
934054b8d0
chore(tests/lean/trust0/basic): use nomatch
2019-08-09 11:11:34 +02:00
Leonardo de Moura
d889230211
chore(tests/compiler/termparsertest1): fix test
2019-08-08 21:02:23 -07:00
Leonardo de Moura
022a130b86
feat(tests/playground/patch): path equation syntax
2019-08-08 20:57:54 -07:00
Leonardo de Moura
f546b13b6c
fix(library/init/lean/syntax): setTailInfo, getHeadInfo and getTailInfo
2019-08-08 20:55:29 -07:00
Leonardo de Moura
9937855d89
feat(library/init/lean/parser/transform): add removeParen
2019-08-08 20:35:00 -07:00
Leonardo de Moura
98b0167e27
chore(library/init/lean/parser/parser): fix typo
2019-08-08 20:34:33 -07:00
Leonardo de Moura
d8f295d980
feat(library/init/lean): helper functions for transforming Syntax objects
2019-08-08 20:11:57 -07:00
Leonardo de Moura
a2956f5bd6
feat(library/init/lean/syntax): add mrewriteBottomUp and rewriteBottomUp
2019-08-08 18:58:43 -07:00
Leonardo de Moura
c6795996f6
feat(library/init/lean/parser/term): allow match syntax to be used in def
2019-08-08 18:53:51 -07:00
Leonardo de Moura
849311af00
test(tests/playground/patch): do-nothing transformer
2019-08-08 10:47:19 -07:00
Leonardo de Moura
10a8822ac5
fix(library/init/lean/parser/module): use updateLeading
2019-08-08 10:45:15 -07:00
Leonardo de Moura
74c46d2b35
fix(library/init/lean/parser/parser): symbolNoWs was not creating an atom
2019-08-08 10:41:40 -07:00
Leonardo de Moura
7a89d45391
feat(script): add helper script for patching lean files
2019-08-08 10:20:32 -07:00
Leonardo de Moura
6b0eb79d37
feat(library/init/lean/parser/module): add convenient parseFile function for writing syntax "patching" tools
2019-08-08 09:42:57 -07:00