Commit graph

3234 commits

Author SHA1 Message Date
Sebastian Ullrich
16026e9edd perf: restore monad instance specialization hack 2021-08-12 21:09:09 +02:00
Leonardo de Moura
a6b6d61b39 chore: simplify mkProjStx? 2021-08-12 09:50:43 -07:00
Leonardo de Moura
da03262937 fix: check redundant sources at structure instance notation 2021-08-12 09:16:30 -07:00
Sebastian Ullrich
9c15f94be3 perf: do not use parsers from the current stage inside quotations by default 2021-08-12 07:51:50 -07:00
Sebastian Ullrich
20accf5105 feat: revise macro parameter syntax 2021-08-12 07:48:42 -07:00
Leonardo de Moura
c68882ca67 feat: structure instance notation with multiple sources
closes #462
closes #463
2021-08-12 06:18:47 -07:00
Leonardo de Moura
a02a490a10 feat: add mkProjStx? 2021-08-12 05:41:00 -07:00
Leonardo de Moura
2dfde4637f fix: index out of bounds 2021-08-12 05:39:19 -07:00
Leonardo de Moura
accf198a88 feat: add ExplicitSourceInfo 2021-08-12 04:29:19 -07:00
Leonardo de Moura
c591902547 refactor: add structure to Source.explicit 2021-08-12 04:10:47 -07:00
Leonardo de Moura
45e4dc26e1 refactor: simplify Source.explicit 2021-08-12 03:40:30 -07:00
Daniel Selsam
5952a857cd feat: pp.analyze improve heuristics for fun binders 2021-08-12 09:37:57 +02:00
Daniel Selsam
638d0ca8ed feat: pp.instances and pp.instanceTypes 2021-08-12 09:33:30 +02:00
Leonardo de Moura
67103f54a9 chore: add TODOs for multiple sources 2021-08-11 19:28:49 -07:00
Leonardo de Moura
74bd537465 fix: generation of to* field names 2021-08-11 17:25:02 -07:00
Leonardo de Moura
d78101f00d chore: remove mutual recursion workaround
It was a leftover hack for the old frontend.
2021-08-11 16:57:53 -07:00
Leonardo de Moura
4abbb3d74c chore: cleanup 2021-08-11 16:05:07 -07:00
Leonardo de Moura
f1738ce2a0 feat: add macro for expanding field abbrev notation
The new macro allows us to use the field abbrev notation in patterns
too. See new test.
2021-08-11 16:02:50 -07:00
Leonardo de Moura
09c2b668e6 feat: allow multiple sources in the structure instance parser
This commit also fixes some macros, and make sure the elaborator still
works, but it does not support multiple sources yet.
2021-08-11 13:07:56 -07:00
Daniel Selsam
efb3f528a6 fix: handle MData-wrapped app fns consistently in delaborator
Fixes #625
2021-08-11 18:53:32 +02:00
Sebastian Ullrich
3b43ab47f1 fix: formatter: check for comment tokens
Fixes #624
2021-08-11 17:37:18 +02:00
Leonardo de Moura
d471f8df60 fix: fixes #621 2021-08-10 21:15:35 -07:00
Leonardo de Moura
39ce3044ec feat: emit warning message when failed to copy default value 2021-08-10 20:56:20 -07:00
Leonardo de Moura
61b3e6bcb8 fix: reduce projections of expanded structures at copyDefaultValue? 2021-08-10 20:50:59 -07:00
Leonardo de Moura
63ad42ba47 refactor: move and generalize reduceProj? 2021-08-10 20:21:04 -07:00
Leonardo de Moura
0623bb3860 feat: update fieldMap with composite field 2021-08-10 20:04:41 -07:00
Leonardo de Moura
ae03f15c92 test: default value set at copied structure 2021-08-10 19:00:34 -07:00
Leonardo de Moura
3b1285bee8 feat: process overriden default values in copied parents 2021-08-10 18:55:12 -07:00
Leonardo de Moura
295cae8afd feat: copy field default values
Only basic examples are working. We still have many TODOs
2021-08-10 16:53:10 -07:00
Leonardo de Moura
47b8fa15f1 fix: propagate visibility annotation 2021-08-10 15:34:07 -07:00
Leonardo de Moura
16ea00586d fix: fixes #620 2021-08-10 15:06:06 -07:00
Leonardo de Moura
972f00b0ff fix: pending metavariable issue
It fixes issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/let.20overload
2021-08-10 14:52:53 -07:00
Leonardo de Moura
7cec20582b feat: add instance Alternative (MonadCacheT α β m) 2021-08-10 14:28:04 -07:00
Leonardo de Moura
9cd729265e fix: missing instantiateMVars 2021-08-10 10:04:16 -07:00
Leonardo de Moura
9fe1cd1026 chore: modify default value for option structureDiamondWarning
We still have some TODO items, but structure diamond support is
already useful in practice.
2021-08-10 09:24:53 -07:00
Leonardo de Moura
50deae9b8b feat: copy binderInfo and inferMod from original field 2021-08-10 09:12:58 -07:00
Leonardo de Moura
bc26a9b527 feat: improve copyNewFieldsFrom 2021-08-10 09:08:35 -07:00
Leonardo de Moura
af1cecc641 feat: better error message 2021-08-10 07:46:15 -07:00
Leonardo de Moura
9e5998baf0 feat: register instance/reducible attribute for structuer diamond coercions 2021-08-10 07:16:59 -07:00
Leonardo de Moura
0f184a8c93 fix: binder annotation for class diamond coercions 2021-08-10 06:59:28 -07:00
Sebastian Ullrich
0b3e548672 fix: syntax tree returned by syntax elaborator 2021-08-10 12:02:04 +02:00
Leonardo de Moura
bccad8edb1 feat: add coercion to parent structure whose fields having been copied 2021-08-09 19:01:08 -07:00
Leonardo de Moura
97664de3ee fix: diamonds with dependent fields 2021-08-09 19:01:08 -07:00
Leonardo de Moura
e8403f89b0 fix: ensure field names are atomic 2021-08-09 19:01:08 -07:00
Leonardo de Moura
6f318ddde3 feat: save binderInfo and inferMod ad registerStructure 2021-08-09 19:01:08 -07:00
Leonardo de Moura
5ef72057e9 feat: save additional information at StructureFieldInfo 2021-08-09 19:01:08 -07:00
Leonardo de Moura
f67501a890 chore: cleanup 2021-08-09 19:01:08 -07:00
Leonardo de Moura
3f3e5d9dcb fix: private field + default value bug 2021-08-09 19:01:08 -07:00
Leonardo de Moura
3896c44b55 chore: fix incorrect comment
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2021-08-09 19:01:08 -07:00
Leonardo de Moura
fdce7a99e1 feat: structure diamonds basic support
See TODO in the new comments.
2021-08-09 19:01:08 -07:00