Commit graph

23 commits

Author SHA1 Message Date
Leonardo de Moura
5ba9aad7a3 refactor: eliminate ref plumbing 2020-08-13 10:37:53 -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
795b5d600a feat: add expandFields 2020-07-17 11:10:34 -07:00
Leonardo de Moura
d2f26e142d chore: naming 2020-07-17 09:18:20 -07:00
Leonardo de Moura
bf88a35888 feat: add views for structure command 2020-07-16 16:35:00 -07:00
Leonardo de Moura
ebe66fdbc9 feat: add Elab/Structure.lean 2020-07-16 10:47:40 -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
6f402a081c fix: register class for class inductive 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
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
48c6c7c871 feat: report unused universe parameters 2020-07-14 16:40:56 -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
2bf10b3d2c feat: add inferMod field to CtorView 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
Leonardo de Moura
667f2ed601 feat: resolve inductive and ctor names 2020-07-13 16:22:48 -07:00
Leonardo de Moura
2949586244 feat: add local declarations for mutually inductive datatypes 2020-07-11 08:01:36 -07:00
Leonardo de Moura
36c971546c feat: add elabMutualInductive 2020-06-26 15:41:09 -07:00
Leonardo de Moura
1ad5b5984a feat: add Inductive.lean 2020-06-26 12:44:13 -07:00
Leonardo de Moura
249bda16c0 chore: remove prelude commands from Lean package 2020-06-25 11:21:17 -07:00
Leonardo de Moura
4ccc3fef52 chore: move Init.Lean files to Lean package 2020-05-26 15:04:35 -07:00
Renamed from src/Init/Lean/Elab/Declaration.lean (Browse further)