Commit graph

26741 commits

Author SHA1 Message Date
Leonardo de Moura
7bffa51d22 fix: missing file 2020-07-17 17:25:15 -07:00
Leonardo de Moura
ad485484a5 chore: minor 2020-07-17 17:15:33 -07:00
Leonardo de Moura
899e11de30 chore: update stage0 2020-07-17 11:22:23 -07:00
Leonardo de Moura
428fb5be3c chore: remove dead field 2020-07-17 11:21:43 -07:00
Leonardo de Moura
795b5d600a feat: add expandFields 2020-07-17 11:10:34 -07:00
Leonardo de Moura
a1fc824336 fix: field syntax 2020-07-17 10:12:43 -07:00
Leonardo de Moura
b5dc185e70 chore: remove private parent structure support from old frontend 2020-07-17 09:21:14 -07:00
Leonardo de Moura
d2f26e142d chore: naming 2020-07-17 09:18:20 -07:00
Leonardo de Moura
ba3f461505 chore: we decided to not support private parent structures, nor named parent structures
These are obscures features in Lean 3 that AFAIK nobody ever used.
2020-07-17 09:09:34 -07:00
Leonardo de Moura
bf88a35888 feat: add views for structure command 2020-07-16 16:35:00 -07:00
Leonardo de Moura
8a80887fb0 fix: structure command syntax 2020-07-16 16:00:31 -07:00
Leonardo de Moura
59eb3cac77 chore: update stage0 2020-07-16 15:12:47 -07:00
Leonardo de Moura
1e862b83c5 chore: remove support for old structure command 2020-07-16 15:11:11 -07:00
Leonardo de Moura
cdd6e48315 fix: do not assume the prefix of a projection function name is the structure name 2020-07-16 11:10:20 -07:00
Leonardo de Moura
ebe66fdbc9 feat: add Elab/Structure.lean 2020-07-16 10:47:40 -07:00
Leonardo de Moura
c421151e61 feat: allow users to annotate structure constructor and projections with declaration modifiers (e.g., private, protected, doc string, ...) 2020-07-16 10:27:06 -07:00
Leonardo de Moura
b247d4901c feat: allow commands such as variable and universe in the preamble of a mutual command block 2020-07-16 09:55:51 -07:00
Leonardo de Moura
443cdf5778 chore: update stage0 2020-07-15 16:32:23 -07:00
Leonardo de Moura
6f402a081c fix: register class for class inductive 2020-07-15 16:32:23 -07:00
Leonardo de Moura
232eefcef9 feat: add auxiliary constructions for inductive types 2020-07-15 16:32:23 -07:00
Leonardo de Moura
8fd25ec326 feat: export "constructions"
@Kha Maybe one day I will reimplement them in Lean. Note that they do
not depend on the old type_context.
2020-07-15 16:32:23 -07:00
Leonardo de Moura
8a2dd414ff feat: inductive command
cc @Kha
2020-07-15 16:32:23 -07:00
Leonardo de Moura
98d8520158 feat: infer binder annotations for constructor parameters 2020-07-15 16:32:23 -07:00
Leonardo de Moura
9876f91cf7 chore: cleanup 2020-07-15 16:32:23 -07:00
Leonardo de Moura
ab2ea30a19 feat: replace fvars with consts 2020-07-15 16:32:23 -07:00
Leonardo de Moura
4fbef3b6ed feat: collect and sort used level params 2020-07-15 16:32:23 -07:00
Leonardo de Moura
fbf59e0799 fix: register levelNames defined in the inductive command 2020-07-15 16:32:22 -07:00
Leonardo de Moura
26a35e3ab1 feat: updateResultingUniverse 2020-07-15 16:32:22 -07:00
Leonardo de Moura
5ff8ad3b88 feat: add Level.replace and Expr.replaceLevel 2020-07-15 16:32:22 -07:00
Leonardo de Moura
94154113b5 feat: remove unused variables 2020-07-15 16:32:22 -07:00
Leonardo de Moura
fbf2d5d300 fix: do not print as arrow if binder_info is not the default one 2020-07-15 16:32:22 -07:00
Leonardo de Moura
4745519b54 feat: add Lean.Elab.CollectFVars 2020-07-15 16:32:22 -07:00
Sebastian Ullrich
b7f6f37079 chore: remove unreliable cache metrics 2020-07-15 17:16:04 +02:00
Leonardo de Moura
02de582941 feat: inductive datatype resulting universe inference 2020-07-14 17:18:58 -07:00
Leonardo de Moura
19b281e11e fix: universe parameter generation 2020-07-14 17:15:15 -07:00
Leonardo de Moura
10fec63568 fix: missing resulting mctx 2020-07-14 16:50:08 -07:00
Leonardo de Moura
64bcb71b7a chore: fix test 2020-07-14 16:44:02 -07:00
Leonardo de Moura
48c6c7c871 feat: report unused universe parameters 2020-07-14 16:40:56 -07:00
Leonardo de Moura
19595a0d03 fix: resolve pending universe metavars 2020-07-14 10:23:20 -07:00
Leonardo de Moura
455361d7d7 chore: update comment 2020-07-13 16:22:49 -07:00
Leonardo de Moura
d4ae4da222 feat: check given constructor resulting type 2020-07-13 16:22:49 -07:00
Leonardo de Moura
920343d36b fix: unspecified constructor resulting type is not allowed inductive families 2020-07-13 16:22:49 -07:00
Leonardo de Moura
9960ca01f0 feat: reject protected constructors in a private inductive datatype
In a private inductive datatype, all constructors are private.
2020-07-13 16:22:49 -07:00
Leonardo de Moura
2744ae96bb feat: check unsafe annotations in mutually inductive datatype declarations 2020-07-13 16:22:49 -07:00
Leonardo de Moura
2bf10b3d2c feat: add inferMod field to CtorView 2020-07-13 16:22:49 -07:00
Leonardo de Moura
2cc2e71a53 feat: elaborate constructors 2020-07-13 16:22:49 -07:00
Leonardo de Moura
77ad630c80 test: inductive command 2020-07-13 16:22:49 -07:00
Leonardo de Moura
3fc6d8ce61 chore: improve constructor syntax
I think
```
inductive Foo
| private mk : Foo -> Foo
```
looks better than
```
inductive Foo
private | mk : Foo -> Foo
```

cc @Kha
2020-07-13 16:22:48 -07:00
Leonardo de Moura
d5f64f52a9 feat: add CtorView and modifier validation for inductive and constructors 2020-07-13 16:22:48 -07:00
Leonardo de Moura
6e12987dd9 feat: add declModifiers to constructor declarations
The goal is to allow users to attach doc strings and
`private/protected` to constructor declarations.

TODO: reject non applicable modifiers such as `unsafe` and `partial`.

cc @Kha
2020-07-13 16:22:48 -07:00