Commit graph

22060 commits

Author SHA1 Message Date
Sebastian Ullrich
912d24a3ee fix: disambiguate fun syntax alternatives to help the pretty printer 2020-10-27 16:48:31 +01:00
Sebastian Ullrich
20ed65605b fix: don't parenthesize juxtaposed tactics 2020-10-27 14:09:33 +01:00
Sebastian Ullrich
84692acd0e fix: do not introduce parentheses implied by indentation 2020-10-27 14:09:33 +01:00
Sebastian Ullrich
c0e117daa4 fix: Option.ToMessageData 2020-10-27 14:09:33 +01:00
Sebastian Ullrich
5f67c359bc chore: simplify formatter token separation logic 2020-10-27 14:09:33 +01:00
Sebastian Ullrich
73323a7500 fix: remove obsolete workaround confusing the formatter
We don't generate antiquotations for `tparser!` anymore
2020-10-27 14:09:33 +01:00
Sebastian Ullrich
33c861a80e fix: parenthesizer: really make sure a trailing parser is of the same category as the continuation 2020-10-27 14:09:33 +01:00
Sebastian Ullrich
eb125c52f1 fix: never pretty-print whitespace before checkNoWsBefore 2020-10-27 14:09:33 +01:00
Sebastian Ullrich
43c875fd7a fix: tactic block indentation 2020-10-27 14:09:33 +01:00
Leonardo de Moura
c979d81934 refactor: add polymorphic methods for updating/querying reducibility status 2020-10-26 17:07:28 -07:00
Leonardo de Moura
bddc826648 chore: remove unnecessary liftMs 2020-10-26 16:27:45 -07:00
Leonardo de Moura
7bf6dd53c4 chore: update stage0 2020-10-26 16:11:16 -07:00
Leonardo de Moura
79609938a8 feat: allow universe constraints to be postponed longer
Before this commit, each `isDefEq u v` invocation would fail if there
were pending universe level constraints. This commit, moves the
postponed universe constraints back to the `MetaM` state.
It also adds the combinator
```lean
withoutPostponingUniverseConstraints x
```
which executes `x` and throws an error if there are pending universe
constraints. We use the combinator at `elabApp` and `elabBinders`.
Without this commit, we would fail to elaborate simple terms such as
```lean
  Functor.map Prod.fst (x s)
```
because after elaborating `Prod.fst` and trying to ensure its type
match the expected one, we would be stuck at the universe constraint:
```
  u =?= max u ?v
```

Another benefit of the new approach is better error messages. Instead
of getting a mysterious type mismatch constraint, we get a list of
universe contraints the system is stuck at.

cc @Kha
2020-10-26 15:50:05 -07:00
Leonardo de Moura
5481999560 chore: cleanup 2020-10-26 14:25:38 -07:00
Leonardo de Moura
91d51d06e0 chore: cleanup 2020-10-26 14:00:13 -07:00
Leonardo de Moura
40f99327e9 fix: missing withMainMVarContext 2020-10-26 11:35:54 -07:00
Leonardo de Moura
c55a65fe00 chore: cleanup 2020-10-26 10:58:56 -07:00
Leonardo de Moura
7e244686e9 chore: remove old notation 2020-10-26 09:16:51 -07:00
Leonardo de Moura
93662fd92d chore: update stage0 2020-10-26 09:12:13 -07:00
Leonardo de Moura
16f7bef88f chore: remove old frontend leftovers 2020-10-26 09:08:07 -07:00
Leonardo de Moura
95841490bb chore: update stage0 2020-10-26 09:03:40 -07:00
Leonardo de Moura
deb283a415 chore: remove support for Lean3 scopes 2020-10-26 08:20:33 -07:00
Leonardo de Moura
e1c3c55027 chore: update stage0 2020-10-26 08:11:36 -07:00
Leonardo de Moura
bad6233389 chore: remove legacy support for modification objects 2020-10-26 08:10:51 -07:00
Leonardo de Moura
289ba6583c chore: remove dead code 2020-10-26 07:58:15 -07:00
Leonardo de Moura
b4e8862716 chore: cleanup 2020-10-26 07:54:11 -07:00
Leonardo de Moura
cffa3b0039 chore: cleanup 2020-10-26 07:42:08 -07:00
Leonardo de Moura
e4b478ee6a chore: remove support for quotations in the old frontend 2020-10-26 07:35:26 -07:00
Leonardo de Moura
7a24fe73ca chore: remove dead code 2020-10-25 20:49:30 -07:00
Sebastian Ullrich
b856553b4f chore: fix benchmark 2020-10-25 21:55:50 +01:00
Leonardo de Moura
b1b5460c4b chore: update stage0 2020-10-25 10:23:03 -07:00
Leonardo de Moura
4838fb5c16 chore: remove source code for old frontend, equation compiler and tactics 2020-10-25 10:22:06 -07:00
Leonardo de Moura
94bc5ed7a3 chore: remove old frontend, equation compiler and tactics from build 2020-10-25 10:20:30 -07:00
Leonardo de Moura
e28b337a2c chore: remove old frontend support from lean.cpp
We also remove the option `-n` (for new frontend)
2020-10-25 10:16:52 -07:00
Leonardo de Moura
2be41ad0ad chore: update stage0 2020-10-25 10:00:43 -07:00
Leonardo de Moura
b80eab722b chore: avoid hack at --deps 2020-10-25 10:00:05 -07:00
Leonardo de Moura
e3a982b0fa chore: move update stage0 2020-10-25 09:54:08 -07:00
Leonardo de Moura
13c2a8ff51 chore: remove #lang lean4 header 2020-10-25 09:54:07 -07:00
Leonardo de Moura
e67076ada8 chore: update stage0 2020-10-25 09:54:05 -07:00
Leonardo de Moura
98d0892910 chore: update test output
@Kha the test `Reformat.lean` is "almost" working. It produces some
reasonable output, but we get parser errors. I didn't investigate.
I am updated the test output just to make sure we don't get a failure
in the CI.
2020-10-25 09:54:05 -07:00
Leonardo de Moura
f89d34e0dc chore: cleanup 2020-10-25 09:53:52 -07:00
Leonardo de Moura
8c6f536367 chore: avoid fun | ... => notation
@Kha the pretty printer fails when we use the `fun+match` macro. Example:
```
fun
 | PSum.inl a => 1 + sizeof a
 | PSum.inr b => 1 + sizeof b
```
The test `Reparen.lean` fails without this commit. Here is the error message
```
error: no known parenthesizer for kind 'Lean.Parser.Term.matchAlts'
```
2020-10-25 09:36:44 -07:00
Leonardo de Moura
eccf62946a chore: update stage0 2020-10-25 09:20:07 -07:00
Leonardo de Moura
db9e390b4d chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
Leonardo de Moura
24a6ee1810 chore: use new frontend by default 2020-10-25 09:12:19 -07:00
Leonardo de Moura
fa101444b4 chore: fix tests 2020-10-25 09:11:13 -07:00
Leonardo de Moura
0554c75f48 chore: update stage0 2020-10-25 08:56:29 -07:00
Leonardo de Moura
1d338c4fc4 chore: move Core.lean to new frontend 2020-10-25 08:54:37 -07:00
Leonardo de Moura
5a130c6393 chore: update stage0 2020-10-25 05:50:58 -07:00
Leonardo de Moura
575db3bb3b fix: improve structure/inductive commands universe level inference and validation
chore: cleanup
2020-10-25 05:46:51 -07:00