Commit graph

36377 commits

Author SHA1 Message Date
Leonardo de Moura
b0f0536018 fix: improve error message for overloaded notation 2020-09-12 08:05:37 -07:00
Leonardo de Moura
a784005729 chore: move more tests to new frontend 2020-09-12 07:54:12 -07:00
Leonardo de Moura
09244c73f4 fix: lval resolution 2020-09-12 07:45:36 -07:00
Leonardo de Moura
cc520d422c fix: ensure no unassigned mvars at #eval 2020-09-12 07:18:43 -07:00
Leonardo de Moura
48ffe674d7 chore: update stage0 2020-09-11 17:36:37 -07:00
Leonardo de Moura
f242a958fc chore: move more tests to new frontend 2020-09-11 17:36:37 -07:00
Leonardo de Moura
a8de3c5115 fix: isDefEq configuration in the elaborator 2020-09-11 17:36:28 -07:00
Leonardo de Moura
bbc3bec53b chore: move more tests to new frontend 2020-09-11 16:28:57 -07:00
Leonardo de Moura
c93f48cc9f fix: missing field params 2020-09-11 16:26:52 -07:00
Leonardo de Moura
bf703c9cab fix: bug at inductive datatype resulting universe inference 2020-09-11 16:07:22 -07:00
Leonardo de Moura
b02cda0408 chore: move more tests to new frontend 2020-09-11 15:31:14 -07:00
Leonardo de Moura
9cd88807dd feat: add support for quoted literals in patterns 2020-09-11 15:16:54 -07:00
Leonardo de Moura
2c2a357f28 chore: remove disabled test 2020-09-11 15:05:00 -07:00
Leonardo de Moura
151012cb39 feat: remove emptyc elaboration hack
@Kha I removed the hack. We know get a nice error message.
2020-09-11 14:41:44 -07:00
Leonardo de Moura
b85d3d60b8 fix: bug at ambiguous error message
We were saving the incorrect metavariable context (and environment)/
2020-09-11 14:40:34 -07:00
Leonardo de Moura
ff9b562e66 chore: move test 2020-09-11 14:40:21 -07:00
Leonardo de Moura
b025c1c623 chore: remove HasEmptyc workarounds 2020-09-11 14:28:42 -07:00
Leonardo de Moura
7b5db8648d chore: update stage0 2020-09-11 14:16:54 -07:00
Leonardo de Moura
cc6104b369 fix: bug in the old frontend
It had to be fixed because we have code that needs to be compiled with
the old frontend, and the hacks we used to workaround this issue are
incompatible with the new frontend.
2020-09-11 14:12:03 -07:00
Leonardo de Moura
e9f7fb45af chore: add coercion for new frontend 2020-09-11 14:00:16 -07:00
Leonardo de Moura
7950413526 feat: improve choice nodes + postpone 2020-09-11 12:45:38 -07:00
Leonardo de Moura
457e48cfe4 chore: add private 2020-09-11 11:23:07 -07:00
Leonardo de Moura
81987e59e7 fix: expected type propagation issue 2020-09-11 11:03:59 -07:00
Leonardo de Moura
1731962ea9 feat: elaborate emptyC notation
@Kha this is a little bit ugly. As in Lean3, the notation `{ }` is
overloaded. It can be `HasEmptyc.emptyc` or the empty structure.
Moreover, if we have an instance `HasEmptyc A` for a structure `A`,
then `{ }` is notation for `HasEmptyc.emptyc`. I am not very happy
about this, but it seems users use this feature. It is even used in
our own Lean4 code base :)

BTW, I will try a different alternative later.
First, move the notation `{ }` as a proper parser for `emptyc`.
Then, make sure the elaborator throws an error when
`{ }` is ambiguous. That is, `{}` can be elaborated as the empty
structure `A` and there is an `HasEmptyc A` instance.
Example:
```
structure A :=
(x : Nat := 0)

instance : HasEmptyc A :=
⟨{ x := 10 }⟩
```

The main issue here is that the support for choice+postpone is
currently broken.
2020-09-11 10:42:39 -07:00
Leonardo de Moura
32eabf2ef1 chore: remove old elaborator that is not needed anymore 2020-09-11 10:28:00 -07:00
Leonardo de Moura
4ddd4c4657 chore: move more tests to new frontend 2020-09-11 10:28:00 -07:00
Leonardo de Moura
290cd5cf0f chore: delete disabled tests 2020-09-11 08:38:12 -07:00
Leonardo de Moura
5db5cf7734 fix: do not lift (<- action) nested in quotations 2020-09-11 08:06:20 -07:00
Leonardo de Moura
fff61bc6a5 chore: update stage0 2020-09-11 07:49:24 -07:00
Leonardo de Moura
54e006dc53 chore: move test to new frontend 2020-09-11 07:47:19 -07:00
Leonardo de Moura
2978d7af32 fix: error message 2020-09-11 07:32:30 -07:00
Leonardo de Moura
6cf652606a chore: use new frontend 2020-09-10 19:34:05 -07:00
Leonardo de Moura
a8df621683 fix: bug at elabEvalUnsafe
It was forgetting the the updates performed by `MetaHasEval`.
Wow, I wasted a lot of time on this bug.
2020-09-10 19:33:52 -07:00
Leonardo de Moura
13d067d619 fix: forallTelescopeReducing => forallTelescope
It impacts `mkInhabitantFor`
2020-09-10 18:06:29 -07:00
Leonardo de Moura
e4a3b434d7 chore: moving tests to new frontend
@Kha The transition has begun :)
I found and fixed a few bugs, but it is going well so far.
2020-09-10 18:00:34 -07:00
Leonardo de Moura
a5c99b7601 fix: bug at getInstances 2020-09-10 17:49:17 -07:00
Leonardo de Moura
f28def6c5e feat: add Meta.ppExpr 2020-09-10 17:27:14 -07:00
Leonardo de Moura
c3d91e4228 chore: new keywords 2020-09-10 15:18:32 -07:00
Leonardo de Moura
f871c7b552 feat: trace! macro in the new frontend 2020-09-10 15:18:20 -07:00
Leonardo de Moura
264ce93bc8 chore: simplify elabEval
`TermElab` is now on top of `IO`
2020-09-10 15:03:45 -07:00
Leonardo de Moura
40777c203b feat: add MonadEnv helper methods 2020-09-10 14:58:22 -07:00
Leonardo de Moura
22bdab67ff feat: expand sorry 2020-09-10 14:58:14 -07:00
Leonardo de Moura
ba4fdce508 feat: expand helper macros 2020-09-10 14:25:07 -07:00
Leonardo de Moura
450b87811b chore: update stage0 2020-09-10 13:33:34 -07:00
Leonardo de Moura
d77dc5efb8 feat: add helper syntax 2020-09-10 13:31:45 -07:00
Leonardo de Moura
61bd10997a feat: add coercions for the new frontend 2020-09-10 13:24:13 -07:00
Leonardo de Moura
6b7088e71a fix: too restrictive condition 2020-09-10 11:20:09 -07:00
Leonardo de Moura
232fe8cadd doc: document parser trick 2020-09-10 11:20:09 -07:00
Leonardo de Moura
20152c1192 chore: change by precedence
@Kha it now uses the same precedence of `fun`.
The main motivation is to allow us to write `@by { ... }` instead of
`@(by { ... })`.

BTW, I am considering disabling implicit lambdas for `by ...` expressions.
It is automatically "intro"ducing the implicit variables without
giving an opportunity for users to pick their names.
2020-09-10 11:17:42 -07:00
Leonardo de Moura
2214d81e84 test: add match with proofs example 2020-09-09 16:59:45 -07:00