Commit graph

124 commits

Author SHA1 Message Date
Leonardo de Moura
f1c7665a93 feat: validate patterns, and collect pattern variables 2020-08-11 18:19:29 -07:00
Leonardo de Moura
60ebecba15 chore: throw error if namedPattern notation is used in a non pattern 2020-08-11 18:17:57 -07:00
Leonardo de Moura
167b56c3a7 fix: error message 2020-08-11 13:36:42 -07:00
Leonardo de Moura
c66cb01a4b feat: listLit and arrayLit as macros
Motivation: avoid special support at `Match.lean`.
2020-08-11 13:03:36 -07:00
Leonardo de Moura
d0e07d5608 feat: expand h:t discriminants in match-expressions 2020-08-11 10:43:47 -07:00
Leonardo de Moura
193f8236df feat: elaborate match discriminants 2020-08-11 09:21:54 -07:00
Leonardo de Moura
f646622bfc feat: add MatchAltView 2020-08-10 17:30:33 -07:00
Leonardo de Moura
dd5c21bf6f feat: eagerly expand macros occurring in patterns 2020-08-10 17:15:26 -07:00
Leonardo de Moura
61f8b4ef07 feat: add support for maximum recursion depth checks at MacroM 2020-08-10 16:50:12 -07:00
Leonardo de Moura
fe5927927a feat: elaborate match type 2020-08-10 13:53:08 -07:00
Leonardo de Moura
f974521783 fix: missing node 2020-08-10 11:15:44 -07:00
Leonardo de Moura
7342cab0e5 feat: add (ref : Syntax) to Meta.Exception.tactic
cc @Kha
2020-08-06 10:14:32 -07:00
Leonardo de Moura
1eff4be172 feat: use Meta.Example.other ref : Syntax if it contains position information 2020-08-06 10:06:24 -07:00
Leonardo de Moura
f934a86646 feat: add (ref : Syntax) to Meta.Exception.other
@Kha The Syntax is here just to provide possition information. The
goal is to improve error message location information in code such as `DepElim`.
2020-08-06 09:40:16 -07:00
Sebastian Ullrich
3f6de2af06 refactor: simplify processing of antiquotations in pretty-printer 2020-08-06 09:27:12 -07:00
Sebastian Ullrich
c43e6624f9 fix: Lean.Elab.Command with new parser 2020-08-06 09:27:12 -07:00
Leonardo de Moura
fe0d298657 fix: mkAuxDefinition was not correctly handling delayed metavar assignments 2020-07-31 15:38:38 -07:00
Leonardo de Moura
b23e59d509 feat: allow #eval to update Environment
See new `MetaHasEval`.

cc @Kha
2020-07-30 16:48:31 -07:00
Leonardo de Moura
e234b9c671 feat: elaborate #print command
Basic `#print` command for helping us to test new frontend
2020-07-28 16:24:16 -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
52353539c1 fix: track NameGenerator at CommandElabM
@Kha This was a super nasty bug. We did not notice it before because
most commands invoke `liftTermElabM` at most once. This is not true for
the new `structure` command. The bug manifested itself while I was
testing the new command. However, the issue was due to accidental
reuse of fresh variable Ids :)
2020-07-27 14:31:43 -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
0118de09b9 chore: add mkAuxDefinition 2020-07-24 10:45:32 -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
e4865f5aad fix: resolveGlobalName for atomic references to private names 2020-07-23 14:58:19 -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
fe5a0026cd fix: levelMVarToParam consider Expr assignment 2020-07-22 14:01:32 -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