Sebastian Ullrich
a0f825f67f
refactor: move Lean.PrettyPrinter.Parenthesizer in between Lean.Parser.Parser and Lean.Parser.Extension
2020-08-13 18:44:13 +02:00
Sebastian Ullrich
f7e004b44a
refactor: split Lean.Parser.Parser
2020-08-13 18:44:13 +02:00
Leonardo de Moura
6c234daad7
chore: MonadExceptCore => MonadExceptOf
2020-08-13 09:28:23 -07:00
Wojciech Nawrocki
9c7d91c67f
fix: don't normalize line endings but still diff
2020-08-13 09:21:35 -07:00
Wojciech Nawrocki
55655869b7
feat: default to binary file mode on Windows
2020-08-13 09:21:35 -07:00
Leonardo de Moura
5103040063
chore: fix parameter
2020-08-13 09:19:26 -07:00
Leonardo de Moura
c24ff8fe16
chore: update stage0
2020-08-13 09:19:26 -07:00
Leonardo de Moura
3ad0871dd4
chore: increase class.instance_max_depth
2020-08-13 09:19:26 -07:00
Leonardo de Moura
d7add53229
feat: add MonadExceptCore
2020-08-13 09:19:26 -07:00
Sebastian Ullrich
baadfca817
fix: commit missing file...
2020-08-13 17:39:43 +02:00
Sebastian Ullrich
541d77da8b
refactor: custom implementation for [combinatorParenthesizer], revert KeyedDeclsAttribute changes
...
/cc @leodemoura
2020-08-13 15:32:16 +02:00
Sebastian Ullrich
61a706d8cd
chore: adjust parenthesizer docs
...
/cc @leodemoura
2020-08-13 12:27:25 +02:00
Leonardo de Moura
02b81e263e
chore: update stage0
2020-08-12 20:24:19 -07:00
Leonardo de Moura
bd7a7ed623
refactor: reduce ref plumbing
...
TODO: reduce `ref` plumbing at `CommandElabM`
2020-08-12 20:23:02 -07:00
Leonardo de Moura
e2df2d5a7c
fix: metavariable type scope
2020-08-12 17:43:55 -07:00
Leonardo de Moura
a23b640cbc
fix: equality orientation
2020-08-12 17:15:07 -07:00
Leonardo de Moura
f40811e0c1
feat: convert patternVars into LocalDecl
2020-08-12 17:13:25 -07:00
Leonardo de Moura
f924b481c2
chore: simplify mkElim interface
2020-08-12 16:34:43 -07:00
Leonardo de Moura
2e3587872c
feat: add withSynthesize
2020-08-12 16:18:22 -07:00
Leonardo de Moura
f955552d5b
feat: elaborate .(t)
2020-08-12 14:07:43 -07:00
Leonardo de Moura
fcf4df2f5c
fix: do not use named holes for representing _ in patterns
2020-08-12 13:58:27 -07:00
Leonardo de Moura
174acc82e4
chore: update stage0
2020-08-12 10:45:46 -07:00
Leonardo de Moura
f487b88024
feat: register auxiliary Syntax node kind
2020-08-12 10:45:07 -07:00
Leonardo de Moura
0e0754346b
chore: fix method name
2020-08-12 10:43:26 -07:00
Leonardo de Moura
57533726f6
feat: add mkFreshExprMVarWithId
2020-08-12 10:35:38 -07:00
Leonardo de Moura
f600c67bb4
chore: update stage0
2020-08-12 10:24:35 -07:00
Leonardo de Moura
d07796293b
feat: elaborate patterns
...
This is just the first step. I still need to convert them into `DepElim.Pattern`.
2020-08-12 10:22:38 -07:00
Leonardo de Moura
31bbc6ee6d
feat: add primitive for registering syntax node kinds that are not associated with any parser
...
@Kha I added this feature to implement match expressions. The idea is
to be able to create a temporary `Syntax` node using an internal kind that has
no parser associated with it. That is, users cannot create them.
However, we can still associate an elaboration function to this kind.
Without this feature, I would have to create some "arbitrary parser"
for representing this temporary `Syntax` node.
2020-08-12 10:21:37 -07:00
Sebastian Ullrich
1972e04302
test: parenthesizer no longer dependent on importing Lean
2020-08-12 09:15:59 -07:00
Sebastian Ullrich
aefe710caf
feat: close the loop
2020-08-12 09:15:59 -07:00
Sebastian Ullrich
6492fb5d80
chore: update stage0
2020-08-12 09:15:59 -07:00
Sebastian Ullrich
f4e59070c4
feat: support interpreting parenthesizers from ParserDescr
2020-08-12 09:15:59 -07:00
Sebastian Ullrich
1f4cc130b7
feat: precompile parenthesizers instead of interpreting them
2020-08-12 09:15:59 -07:00
Sebastian Ullrich
34e496d606
chore: add stage 1.5 (yes, really)
2020-08-12 09:15:59 -07:00
Sebastian Ullrich
05cb45ca9c
refactor: simplify mkCategoryAntiquotParser
2020-08-12 09:15:59 -07:00
Sebastian Ullrich
91de25ab02
chore: update stage0
2020-08-12 09:15:59 -07:00
Sebastian Ullrich
60e548bf7b
feat: add [combinatorParenthesizer] attribute
2020-08-12 09:15:59 -07:00
Sebastian Ullrich
b2714d36ef
fix: String: take/drop characters, not bytes
2020-08-11 18:24:47 -07:00
Leonardo de Moura
f1c7665a93
feat: validate patterns, and collect pattern variables
2020-08-11 18:19:29 -07:00
Leonardo de Moura
60ebecba15
chore: throw error if namedPattern notation is used in a non pattern
2020-08-11 18:17:57 -07:00
Leonardo de Moura
5a09883cc7
chore: add namedPattern
2020-08-11 15:04:09 -07:00
Leonardo de Moura
167b56c3a7
fix: error message
2020-08-11 13:36:42 -07:00
Leonardo de Moura
c66cb01a4b
feat: listLit and arrayLit as macros
...
Motivation: avoid special support at `Match.lean`.
2020-08-11 13:03:36 -07:00
Leonardo de Moura
d0e07d5608
feat: expand h:t discriminants in match-expressions
2020-08-11 10:43:47 -07:00
Leonardo de Moura
193f8236df
feat: elaborate match discriminants
2020-08-11 09:21:54 -07:00
Leonardo de Moura
f646622bfc
feat: add MatchAltView
2020-08-10 17:30:33 -07:00
Leonardo de Moura
dd5c21bf6f
feat: eagerly expand macros occurring in patterns
2020-08-10 17:15:26 -07:00
Leonardo de Moura
61f8b4ef07
feat: add support for maximum recursion depth checks at MacroM
2020-08-10 16:50:12 -07:00
Leonardo de Moura
fe5927927a
feat: elaborate match type
2020-08-10 13:53:08 -07:00
Leonardo de Moura
25fd5d0a9a
fix: ambiguity at match
...
```lean
match x : t with
| ...
```
Two possible intepretations for `x : t`:
1- The discriminant `t` where `x` is the name for the equality proofs `t = ...` in each alternative.
2- The discriminant `x` with a expected type `t` (aka motive) for the match.
This commit resolves the ambiguity by forcing no space before `:` in
the first interpretation.
cc @Kha
2020-08-10 13:47:09 -07:00