Commit graph

677 commits

Author SHA1 Message Date
Leonardo de Moura
09de67780f chore: prepare for #1090 2022-04-01 09:35:06 -07:00
Leonardo de Moura
3dd0c84c4d chore: enforce naming convetion for tactics 2022-03-30 16:19:05 -07:00
Leonardo de Moura
46ce3013d0 feat: cleanup local context before elaborating match alternatives RHS 2022-03-29 18:52:07 -07:00
Leonardo de Moura
8f4d58893f feat: update match parser
Support for
```
def fib (x : Nat) : Nat :=
  match x with
  | 0 | 1 => 1
  | x+2   => fib (x+1) + fib x
```

TODO: expand `matchAlts`
2022-03-20 13:22:39 -07:00
Leonardo de Moura
3862e7867b refactor: make String.Pos opaque
TODO: this refactoring exposed bugs in `FuzzyMatching` and `Lake`

closes #410
2022-03-20 10:47:13 -07:00
Leonardo de Moura
1c99fe92ac feat: add dotIdent parser
see #944
2022-03-10 16:04:41 -08:00
Leonardo de Moura
5d2420b1c9 chore: add auxiliary notation for ForIn' 2022-03-03 19:10:24 -08:00
Leonardo de Moura
92937b3aba feat: add for h : x in xs do ... notation
The idea is to have `h : x \in xs`.
This commit just adds the parser.
2022-03-03 18:27:40 -08:00
Sebastian Ullrich
c9713b1b69 fix: setExpectedFn 2022-03-02 16:28:53 +01:00
Leonardo de Moura
c67ee9fdf4 feat: add pp annotation for match parser 2022-02-14 15:46:52 -08:00
Leonardo de Moura
42c80c7483 feat: remove whitespace sensitivity at match discriminants 2022-02-14 15:37:40 -08:00
Leonardo de Moura
93b5b74b36 feat: modify notation for providing motive in "match" expressions 2022-02-14 15:36:14 -08:00
Leonardo de Moura
12e2a79170 chore: fix codebase after removing auto pure 2022-02-03 18:08:14 -08:00
Leonardo de Moura
5f74cd4968 feat: add let pat := val | elseCase do-notation 2022-02-03 15:55:03 -08:00
Sebastian Ullrich
ce58ded16f fix: syntax match of literals
Fixes #801
2022-01-29 08:40:03 -08:00
Leonardo de Moura
cf3b8d4eb4 chore: cleanup
Make the code style more uniform.
We still have a lot of leftovers from the old frontend.
2022-01-26 09:18:17 -08:00
Leonardo de Moura
2c690926cf feat: update namedPattern parser 2022-01-17 16:49:20 -08:00
Leonardo de Moura
bac91b9b5b chore: remove arbitrary 2022-01-15 12:14:27 -08:00
Leonardo de Moura
9de58c66eb chore: add default_or_ofNonempty% 2022-01-15 11:50:39 -08:00
Leonardo de Moura
0a726a755f feat: add helper parser arbitrary_or_ofNonempty% 2022-01-14 17:11:55 -08:00
Sebastian Ullrich
a0e8c6183b fix: parser should create choice node even on error 2022-01-14 09:18:57 +01:00
Leonardo de Moura
addcbc6fa3 feat: process termination_by syntax 2022-01-12 16:15:30 -08:00
Leonardo de Moura
a1ab5c0ccb feat: simplify termination_by new syntax
We don't need `using` anymore since we are going to use TC inference.
2022-01-12 08:28:03 -08:00
Leonardo de Moura
f9b79092f6 feat: new termination_by syntax 2022-01-11 15:36:50 -08:00
Leonardo de Moura
ce76ad44ea feat: add terminationByCore parser 2022-01-11 14:44:36 -08:00
Mario Carneiro
5a7c9f2d35 chore: add showRhs definition 2022-01-04 09:28:29 -08:00
Mario Carneiro
9ee0d08cb5 chore: add doc 2022-01-04 09:26:34 -08:00
Mario Carneiro
3716e9a2ed chore: use a different syntax kind for suffices-by
chore: update src/Lean/Parser/Term.lean

Co-authored-by: Gabriel Ebner <gebner@gebner.org>
2022-01-04 09:26:32 -08:00
Gabriel Ebner
72851652f1 fix: spacing in suffices...by 2021-12-23 13:56:22 +01:00
Gabriel Ebner
d6f629860b feat: add ppRealFill and ppRealGroup combinators 2021-12-15 11:42:38 +00:00
Gabriel Ebner
ab3e08190b feat: allow opt-out of grouping in formatter 2021-12-15 11:42:38 +00:00
Gabriel Ebner
b6efece612 fix: missing space after /-- 2021-12-15 11:42:38 +00:00
Gabriel Ebner
f1fc8f2441 fix: space before where/:= in inductive 2021-12-15 11:42:38 +00:00
Gabriel Ebner
3f73442a5a fix: space before infer modifiers 2021-12-15 11:42:38 +00:00
Gabriel Ebner
b176efefca fix: print line before deriving 2021-12-15 11:42:38 +00:00
Gabriel Ebner
5d25df1a69 fix: indenting of match arms in declValEqns 2021-12-15 11:42:38 +00:00
Gabriel Ebner
067c181075 fix: space after @& 2021-12-15 11:42:38 +00:00
Gabriel Ebner
e1b2c945e3 fix: suppress extra spaces in formatter 2021-12-15 11:42:38 +00:00
Gabriel Ebner
2b7ec7f9ef fix: spacing around (← monadic lifts) 2021-12-15 11:42:38 +00:00
Gabriel Ebner
52b36cad1d fix: whitespace around parens in open/export 2021-12-15 11:42:38 +00:00
Gabriel Ebner
f219188c95 fix: indent declaration signatures 2021-12-15 11:42:38 +00:00
Gabriel Ebner
e90bdd00db fix: indent where definitions and add space before 2021-12-15 11:42:38 +00:00
Gabriel Ebner
f5a2562575 fix: indent structure fields 2021-12-15 11:42:38 +00:00
Gabriel Ebner
f1d583c9cf fix: newline in whereDecls 2021-12-15 11:42:38 +00:00
Gabriel Ebner
7e483d3a0a feat: support syntax abbreviations in dynamic quotations 2021-12-15 11:17:58 +00:00
Leonardo de Moura
136fab0723 feat: improve error message for let ... ← ... outside of a do 2021-12-14 08:56:22 -08:00
tydeu
d518ba7f08 feat: use BaseIO more in Init.System.IO 2021-12-14 09:33:52 +01:00
Leonardo de Moura
55db56f80d feat: add noncomputable section parser 2021-12-13 10:35:16 -08:00
Leonardo de Moura
bf3b0c53ad chore: add helper parser 2021-12-12 08:16:42 -08:00
Leonardo de Moura
b6ef65d8fd fix: where structure instance parser
closes #753
2021-12-12 07:52:52 -08:00