Commit graph

27 commits

Author SHA1 Message Date
Leonardo de Moura
fd7727cf81 feat: helper functions for updating SourceInfo 2020-02-13 16:22:28 -08:00
Leonardo de Moura
8525584a78 refactor: naming consistency ensure List and Array have similar find* methods
`find?`     -> takes predicate
`findSome?` -> takes a function (A -> Option B)
2020-01-26 15:13:05 -08:00
Leonardo de Moura
6d5de9f965 feat: handle raw identifiers as binders in fun
@Kha I am adding this kind of feature to improve the user experience.
For example, the macro
```
syntax "[" ident "↦" term "]" : term
macro_rules
| `([$x ↦ $v]) => `(fun $x => $v)
```
is accepted and looks perfectly reasonable.
However, before this commit, we would get a nasty error when
elaborating
```lean
check [x ↦ x + 1]
```
2020-01-25 14:55:21 -08:00
Leonardo de Moura
1ff7950a77 feat: use truncateTrailing at error messages 2020-01-22 16:19:07 -08:00
Leonardo de Moura
5193ce45e4 refactor: move Syntax helper functions to LeanInit 2020-01-22 12:58:06 -08:00
Leonardo de Moura
e57d3431ee refactor: move basic Syntax API to LeanInit
We want to make them available for `macro`-building
2020-01-19 14:44:03 -08:00
Sebastian Ullrich
9790b2b390 fix: hygienic mkTermId for constants 2020-01-19 08:28:49 -08:00
Leonardo de Moura
42fc213573 fix: report unsolved goals at end 2020-01-18 11:34:57 -08:00
Leonardo de Moura
2eafb70585 chore: add auxiliary functions and simplify Quotation 2020-01-17 16:00:39 -08:00
Leonardo de Moura
99aca85ac7 refactor: move declarations used at macro command to LeanInit 2020-01-15 20:53:23 -08:00
Sebastian Ullrich
82078fba84 chore: make Syntax.reprint output without source info more readable 2020-01-12 10:32:27 -08:00
Leonardo de Moura
82a36fbfe2 feat: declare_syntax_cat without importing Init.Lean
cc @Kha
2020-01-11 09:02:50 -08:00
Leonardo de Moura
8484aa08f3 feat: decodeCharLit 2020-01-08 10:50:47 -08:00
Leonardo de Moura
f2958f1f6c feat: decodeStrLit 2020-01-08 10:47:33 -08:00
Leonardo de Moura
7c7e76defb fix: missing repr 2020-01-08 08:32:14 -08:00
Leonardo de Moura
0137500c83 fix: missing decodeStrLit and decodeCharLit
They are just placeholders.
2020-01-08 08:28:22 -08:00
Leonardo de Moura
9d25a45074 feat: elaborate character literals 2020-01-01 14:37:40 -08:00
Sebastian Ullrich
1a7cd0e54d feat: support ident antiquotations (inside term parsers, for now) 2019-12-30 08:24:29 -08:00
Leonardo de Moura
0880332761 feat: add maxDepth option to formatStx 2019-12-22 08:48:08 -08:00
Sebastian Ullrich
6a2dbad53f feat: match_syntax support in the old parser 2019-12-17 12:16:34 -08:00
Leonardo de Moura
8165abb125 chore: naming convention 2019-12-12 06:29:13 -08:00
Leonardo de Moura
524a34ba29 fix: List notation elaborator 2019-12-11 10:33:57 -08:00
Leonardo de Moura
49b7660d38 feat: elabApp skeleton 2019-12-10 10:21:14 -08:00
Leonardo de Moura
fddeecaaa6 feat: elaborate binders 2019-12-08 17:59:11 -08:00
Leonardo de Moura
92958e8d66 refactor: remove Syntax.other
We are going to use synthetic metavariables for postponing elaboration.
2019-12-06 09:23:44 -08:00
Leonardo de Moura
f15af1df0a chore: move Lean auxiliary datatypes to src/Init/Lean/Data 2019-12-04 17:00:13 -08:00
Leonardo de Moura
c445199747 chore: library/Init ==> src/Init
cc @Kha @dselsam @cipher1024
2019-11-22 06:06:05 -08:00
Renamed from library/Init/Lean/Syntax.lean (Browse further)