Commit graph

46 commits

Author SHA1 Message Date
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
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
06a767089c fix: do not use `mkAppM id #[e]``
If `e` has type `forall {A : Type}, B`, ``mkAppM `id #[e]`` fails
since it will try to synthesize the implicit argument `A : Type`.
We can avoid this issue by using
1- ``mkAppOptM `id #[none, some e]``, or
2- `mkId e`
2020-07-27 15:24:06 -07:00
Leonardo de Moura
14ab8344b6 fix: elaborate default value for parent field using parent field type 2020-07-27 15:19:06 -07:00
Leonardo de Moura
732dfed8b5 fix: id marker for auxiliary _default declarations
The "marker" is used to delimit parameters and the actual default
value (see new test).
2020-07-24 15:59:45 -07:00
Leonardo de Moura
857013634d fix: auxiliary _default declaration name for parent default field values set in substructures 2020-07-24 15:54:55 -07:00
Leonardo de Moura
2442794cf1 fix: auxiliary _default declaration binder information 2020-07-24 12:12:23 -07:00
Leonardo de Moura
6d3f79eb5c feat: zeta-expand auxiliary let-declarations and mark to_default as reducible 2020-07-24 11:51:50 -07:00
Leonardo de Moura
6678773b10 feat: add auxiliary _default declarations 2020-07-24 11:11:38 -07:00
Leonardo de Moura
78af3d5cba feat: add instances to parent classes 2020-07-24 10:05:19 -07:00
Leonardo de Moura
8b16c973cd feat: apply attributes 2020-07-24 08:49:08 -07:00
Leonardo de Moura
53406bbc36 feat: add auxiliary constructions 2020-07-24 08:48:22 -07:00
Leonardo de Moura
be06ce5fec chore: update TODO list 2020-07-23 16:45:51 -07:00
Leonardo de Moura
ca2e82f39b feat: add projections 2020-07-23 16:42:34 -07:00
Leonardo de Moura
db53d0aa7e fix: validate visibility modifiers 2020-07-23 15:13:55 -07:00
Leonardo de Moura
07cb21c609 fix: subobject fields 2020-07-23 13:38:56 -07:00
Leonardo de Moura
9c230dd18e feat: add structure declaration 2020-07-23 13:32:15 -07:00
Leonardo de Moura
ca096305b2 feat: make structure constructor 2020-07-23 12:57:06 -07:00
Leonardo de Moura
3ec925ec64 chore: cleanup 2020-07-22 17:36:38 -07:00
Leonardo de Moura
ff6807f561 feat: collect used level parameters 2020-07-22 17:31:55 -07:00
Leonardo de Moura
d506e726f1 feat: structure resulting universe 2020-07-22 14:52:23 -07:00
Leonardo de Moura
9bfb144efd feat: convert unassigned universe metavariables into new parameters 2020-07-22 14:25:52 -07:00
Leonardo de Moura
be4d65e936 fix: must collect occurrences in the types 2020-07-21 16:59:28 -07:00
Leonardo de Moura
628be67e66 feat: remove unused scope variables 2020-07-21 16:59:21 -07:00
Leonardo de Moura
a703610347 chore: reject private fields for now
See comment at `src/Lean/Structure.lean`
2020-07-21 16:57:36 -07:00
Leonardo de Moura
801acd3e62 feat: elaborate fields 2020-07-21 16:57:36 -07:00
Leonardo de Moura
27c3e23c17 fix: type is optional in explicit fields
Reason: default value overriding notation.
2020-07-21 16:57:36 -07:00
Leonardo de Moura
19fc369875 feat: throw error at field names starting with '_' 2020-07-21 16:57:36 -07:00
Leonardo de Moura
1267b4908f feat: elaborate parents and subfields 2020-07-20 16:14:36 -07:00
Leonardo de Moura
21980658a5 fix: fieldBinders 2020-07-20 10:32:11 -07:00
Leonardo de Moura
ad485484a5 chore: minor 2020-07-17 17:15:33 -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