Commit graph

1854 commits

Author SHA1 Message Date
Leonardo de Moura
91f0e29285 feat: parallel for 2020-12-19 20:01:04 -08:00
Leonardo de Moura
0911936502 feat: parallel for notation 2020-12-19 19:26:53 -08:00
Sebastian Ullrich
efc2b79aba feat: as patterns in syntax match
@leodemoura no problem using the new architecture :)
2020-12-19 22:03:37 +01:00
Sebastian Ullrich
5b06e1011f fix: completely refactor syntax match handling, introduce "undecided" patterns to resolve complex cases 2020-12-19 22:03:37 +01:00
Leonardo de Moura
bbcd2247f2 feat: extend valid set of valid auto bound names
@Kha The motivation was Andrew's example :)
Users often use `u₁`, `u1`, `u₂`, ... to name universe variables.
2020-12-19 12:36:19 -08:00
Leonardo de Moura
498dae8fab chore: add trace messages 2020-12-19 12:26:37 -08:00
Leonardo de Moura
d22c5cb1b0 feat: add deriving Repr 2020-12-18 14:19:43 -08:00
Leonardo de Moura
6890b43366 refactor: generalize Deriving.Util auxiliary methods 2020-12-18 11:43:37 -08:00
Leonardo de Moura
5f6e66a53f refactor: Repr
Modifications:
- Result type is `Format`
- It takes the context precedence like Haskell `Show`
2020-12-18 11:21:30 -08:00
Leonardo de Moura
15335efae2 refactor: move Format to Init package
We are going to use it to define `Repr` class.
2020-12-18 11:21:30 -08:00
Sebastian Ullrich
94cfff5118 refactor: simplify syntax match logic 2020-12-18 17:05:20 +01:00
Leonardo de Moura
995e11b64e chore: cleanup 2020-12-17 18:05:53 -08:00
Leonardo de Moura
67bcff3bc8 chore: use deriving DecidableEq 2020-12-17 17:48:23 -08:00
Leonardo de Moura
dee3c2c8d8 feat: improve deriving DecidableEq 2020-12-17 17:30:23 -08:00
Leonardo de Moura
6133e5de43 chore: make sure subst is a "noop" if there is nothing to substitute 2020-12-17 17:30:23 -08:00
Leonardo de Moura
9736ea55f5 chore: cleanup 2020-12-17 17:30:23 -08:00
Leonardo de Moura
c428e4feaa fix: bug at injection 2020-12-17 17:30:23 -08:00
Leonardo de Moura
87b6385bea feat: add deriving DecidableEq 2020-12-17 17:30:23 -08:00
Leonardo de Moura
9a8de1774c chore: minor cleanup 2020-12-17 17:30:23 -08:00
Leonardo de Moura
c7ae8354fd feat: improve type mismatch error messages
Use heuristic to automatically annotate terms with `pp.explicit`.
2020-12-17 07:11:52 -08:00
Sebastian Ullrich
4380d4a9da feat: parser: store options & pass to evalConst 2020-12-16 23:15:58 +01:00
Leonardo de Moura
7c865e7bd9 feat: sort instances by priority 2020-12-16 10:45:27 -08:00
Leonardo de Moura
0fa262bb93 feat: add priority to InstanceEntry 2020-12-16 10:40:58 -08:00
Sebastian Ullrich
29c2023410 fix: adapt to new matchAlt syntax 2020-12-16 18:52:56 +01:00
Sebastian Ullrich
4812f2aa64 chore: restore correct position for match errors 2020-12-16 18:27:05 +01:00
Sebastian Ullrich
f9dcbbddc4 refactor: remove optional leading pipe from match, use many1Indent instead of sepBy1 2020-12-16 18:27:05 +01:00
Sebastian Ullrich
d22d639fcb refactor: rename "antiquot scope" ~> "antiquot splice" 2020-12-16 17:44:20 +01:00
Leonardo de Moura
97642bd000 fix: prio issue 2020-12-16 07:44:48 -08:00
Leonardo de Moura
a008816102 chore: remove workaround 2020-12-16 07:34:40 -08:00
Leonardo de Moura
3d5082dde3 feat: simplify Attr.simple parser 2020-12-16 07:29:18 -08:00
Leonardo de Moura
7b67cd2c4a chore: fix priorities 2020-12-16 07:11:02 -08:00
Leonardo de Moura
e3540a5d8f chore: remove high builtin parser
It doesn't allow us to use `high` at `Prelude.lean` because
the macro expander for it is only defined at `Notation.lean`
2020-12-16 06:42:52 -08:00
Leonardo de Moura
16747d3986 chore: remove attrParam syntax category 2020-12-15 21:47:24 -08:00
Leonardo de Moura
31e1851b21 fix: priority 2020-12-15 21:10:02 -08:00
Leonardo de Moura
901e58b131 fix: priority 2020-12-15 20:57:00 -08:00
Leonardo de Moura
b981b0d2b3 chore: missing case 2020-12-15 20:29:42 -08:00
Leonardo de Moura
ed87480093 refactor: move to attr syntax category 2020-12-15 20:22:04 -08:00
Leonardo de Moura
095a27c197 feat: add missing attribute parsers 2020-12-15 20:18:26 -08:00
Leonardo de Moura
eeac7fb9f4 feat: declare builtin attr parsers for builtin attributes
@Kha I believe this is the minimal set for covering the attributes we
have right now. The parser `simple` covers most of them, and the
dispatch is performed using the identifier.
Otherwise, the dispatch will be based on the node kind.
The `simple` parser is a bit hackish, but it is quite covenient for
simple attributes that do not require complex parameters.
2020-12-15 17:20:28 -08:00
Leonardo de Moura
6100ed9283 feat: add LeadingIdentBehavior type
Different strategies for handling the leading identifier in the
`Pratt` parser loop.
2020-12-15 16:45:14 -08:00
Leonardo de Moura
9e3b3b2495 refactor: move attribute related parsers to separate file 2020-12-15 16:13:11 -08:00
Leonardo de Moura
c9f766af5a feat: we don't want attribute names as keywords 2020-12-15 15:59:48 -08:00
Leonardo de Moura
f4db2f5971 fix: workaround for old frontend 2020-12-15 15:49:45 -08:00
Leonardo de Moura
3ee6aec466 feat: add attr parser category 2020-12-15 15:44:46 -08:00
Leonardo de Moura
195ec0705e feat: expand macros in attributes eagerly
The `AttrM` monad does not have sufficient information for expanding
macros. So, we expand them eagerly before we invoke the attributer
handlers implemented using `AttrM`.

cc @Kha
2020-12-15 15:11:19 -08:00
Leonardo de Moura
7bc630a54d chore: remove old frontend leftover 2020-12-15 14:58:40 -08:00
Leonardo de Moura
066cae26fb chore: cleanup 2020-12-15 13:51:03 -08:00
Leonardo de Moura
6985223a55 chore: switch to attrParam 2020-12-14 17:52:28 -08:00
Leonardo de Moura
69e8385f8d refactor: move prioParser to Term.lean 2020-12-14 17:33:38 -08:00
Leonardo de Moura
0004196977 feat: add attrParam builtin parsers 2020-12-14 17:27:28 -08:00