Commit graph

84 commits

Author SHA1 Message Date
Leonardo de Moura
e74ba14f4c feat: modify structSimpleBinder parser
@Kha It felt odd that we can write
```
   map f x := ...
```
in instances, but we had to write
```
   map (f x) := ...
```
when setting the field default value in a class.
2020-12-23 08:23:14 -08:00
Leonardo de Moura
7720b843bb feat: allow users to use binders when setting default value for parent fields 2020-12-23 08:12:29 -08:00
Leonardo de Moura
9c47cfe001 fix: panic message 2020-12-23 07:24:46 -08:00
Leonardo de Moura
df03130927 feat: improve error message 2020-12-22 17:50:26 -08:00
Leonardo de Moura
8c2cb44ac0 fix: error message produced by lean_mk_projections 2020-12-22 17:40:32 -08:00
Leonardo de Moura
0fa262bb93 feat: add priority to InstanceEntry 2020-12-16 10:40:58 -08:00
Leonardo de Moura
04a07c15b9 chore: use deriving Inhabited 2020-12-13 11:57:59 -08:00
Leonardo de Moura
0bbc2ca884 feat: elaborate optDeriving 2020-12-13 09:05:03 -08:00
Leonardo de Moura
0b8edeeadc chore: use double quoted literals 2020-12-09 17:51:01 -08:00
Leonardo de Moura
ae5aa51712 chore: add explicit discard 2020-12-08 06:18:18 -08:00
Leonardo de Moura
533192c369 feat: implement instanceExtension using ScopedEnvExtension 2020-12-05 16:04:37 -08:00
Leonardo de Moura
89961a608e fix: missing withDeclName 2020-11-29 16:22:11 -08:00
Leonardo de Moura
e562959682 feat: add support for auto bound implicits to the structure command 2020-11-29 14:39:51 -08:00
Leonardo de Moura
0869f38de4 chore: update structure, class, inductive 2020-11-27 15:09:30 -08:00
Leonardo de Moura
d6f778bec4 refactor: arbitrary without explicit arguments
@Kha I was tired of writing `arbitrary _` :)
There 0 places in the stdlib where the type needs to be provided.
If in the future we need to specify the type we can use
`arbitrary (α := <type>)`
2020-11-25 09:07:38 -08:00
Leonardo de Moura
5585f9823f chore: cleaner structure/class syntax
@Kha I implemented the syntax for structure/class that we discussed this morning.
It is much cleaner. See new tests at `struct2.lean`.
I updated the documentation to use it.
2020-11-24 13:07:43 -08:00
Leonardo de Moura
cb9574b086 chore: test unboundImplicitLocals and cleanup 2020-11-22 10:33:28 -08:00
Leonardo de Moura
c305c2691f chore: use := 2020-11-19 07:22:31 -08:00
Leonardo de Moura
f17e226638 chore: naming convention
Example: `mkNameStr` => `Name.mkStr`

cc @Kha
2020-11-11 10:08:55 -08: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
13c2a8ff51 chore: remove #lang lean4 header 2020-10-25 09:54:07 -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
Leonardo de Moura
c4b9cc509c fix: collect used universe levels in structure resulting type 2020-10-25 03:41:09 -07:00
Leonardo de Moura
3f0cc1d2ec fix: library/constructions primitives crash at kernel_exception 2020-10-24 18:52:01 -07:00
Leonardo de Moura
609c54c57d fix: allow structures to be in Prop 2020-10-24 16:57:57 -07:00
Leonardo de Moura
2041277cae fix: field default value with implicit type 2020-10-22 07:02:40 -07:00
Leonardo de Moura
6ca1768957 fix: optional := in the structure command 2020-10-22 04:39:20 -07:00
Leonardo de Moura
82ee2e361b chore: cleanup 2020-10-21 18:43:47 -07:00
Leonardo de Moura
f36f7592e6 chore: move to new frontend 2020-10-15 16:18:42 -07:00
Leonardo de Moura
7c6b10012b chore: add helper function 2020-10-11 19:58:07 -07:00
Leonardo de Moura
b0564a32b9 feat: add AttrM
We are going to use `AttrM` to implement solution 2 described at https://github.com/leanprover/lean4/issues/175
2020-09-21 16:44:20 -07:00
Leonardo de Moura
d33f7c7885 feat: attribute command 2020-09-20 09:11:36 -07:00
Leonardo de Moura
c93f48cc9f fix: missing field params 2020-09-11 16:26:52 -07:00
Leonardo de Moura
f34fd3e6b4 refactor: move Closure.lean to Meta
We will need to improve the support for let-decls. We will use
the new `trackZeta`.
2020-09-03 11:54:08 -07:00
Leonardo de Moura
9ffd1b1672 feat: filter unused variables in mutually recursive definitions 2020-09-02 17:02:35 -07:00
Leonardo de Moura
b9d50d2adf refactor: expandDeclId 2020-09-01 13:12:36 -07:00
Leonardo de Moura
5e5b75af61 chore: remove withDeclId 2020-09-01 13:04:08 -07:00
Leonardo de Moura
6f1975aef5 feat: report errors for unassigned metavariables
We were not reporting unassigned metavariables due to
1- `_`
2- Named holes (e.g., `?x`)
3- Implicit arguments
2020-08-27 15:03:41 -07:00
Leonardo de Moura
bb3c8a2105 refactor: polymorphic applyAttributes 2020-08-27 10:46:33 -07:00
Leonardo de Moura
813a964767 refactor: move polymorphic Meta methods back to Meta namespace 2020-08-25 14:57:58 -07:00
Leonardo de Moura
e5b7daf9c2 refactor: make AppBuilder methods polymorphic 2020-08-24 18:23:34 -07:00
Leonardo de Moura
49f5e4db20 refactor: cleanup 2020-08-24 17:47:27 -07:00
Leonardo de Moura
eaed6ba6a3 refactor: polymorphic MetaM combinators 2020-08-24 17:03:54 -07:00
Leonardo de Moura
ac565de96c refactor: add MonadMetaM class 2020-08-24 12:17:47 -07:00
Leonardo de Moura
4f14fe3b79 refactor: polymorphic withRef 2020-08-24 12:17:47 -07:00
Leonardo de Moura
5ffbada3df feat: add Lean.MonadEnv, Lean.MonadError, and Lean.MonadOptions
This is the first set of polymorphic methods. I will add more later,
and keep reducing code duplication.

cc @Kha
2020-08-22 16:00:43 -07:00
Leonardo de Moura
0cda65057e fix: addCtorFields 2020-08-17 17:25:42 -07:00
Leonardo de Moura
07dd5c9daf fix: withFields 2020-08-17 17:12:59 -07:00
Leonardo de Moura
2295c315aa feat: add elabTermEnsuringType
This commit also fixes a match-expression error location issue.
2020-08-15 13:49:10 -07:00
Leonardo de Moura
5ba9aad7a3 refactor: eliminate ref plumbing 2020-08-13 10:37:53 -07:00