Commit graph

26011 commits

Author SHA1 Message Date
Leonardo de Moura
fac2849e50 feat: forIn for PersistentArray 2020-10-20 09:33:50 -07:00
Leonardo de Moura
702ceb7a3f fix: return optional result
cc @Kha
2020-10-20 09:33:50 -07:00
Sebastian Ullrich
e8cf086641 fix: synthesize pretty printers early 2020-10-20 09:50:54 +02:00
Sebastian Ullrich
4bb07c1d47 chore: update stage0 2020-10-20 09:47:48 +02:00
Sebastian Ullrich
490c482af2 fix: allow [runParserAttributeHooks] on imported declarations, add non-builtin variant 2020-10-20 09:39:50 +02:00
Sebastian Ullrich
73065860f3 fix: refuse to generate code for imported parsers to avoid duplicate declarations 2020-10-20 09:38:44 +02:00
Leonardo de Moura
9f6821d685 chore: update stage0 2020-10-19 15:44:53 -07:00
Leonardo de Moura
69dfb23805 chore: move to new frontend 2020-10-19 15:43:32 -07:00
Leonardo de Moura
86ab4d4029 chore: move to new frontend 2020-10-19 15:38:47 -07:00
Leonardo de Moura
29cb4e993b chore: export lean_is_io_unit_regular_init_fn and lean_is_io_unit_builtin_init_fn 2020-10-19 15:27:33 -07:00
Leonardo de Moura
ef63ade07c chore: update stage0 2020-10-19 15:18:57 -07:00
Leonardo de Moura
1495f403a1 chore: use builtin_initialize instead of initialize at src/Lean 2020-10-19 15:17:02 -07:00
Leonardo de Moura
761648087c chore: update stage0 2020-10-19 15:11:01 -07:00
Leonardo de Moura
bed3dd61f0 feat: expand builtin_initialize 2020-10-19 15:09:46 -07:00
Leonardo de Moura
82dc155f0f chore: add builtin_initialize keyword 2020-10-19 15:09:17 -07:00
Leonardo de Moura
351044336b chore: update stage0 2020-10-19 15:03:55 -07:00
Leonardo de Moura
52e676af83 feat: add builtin_initialize command 2020-10-19 15:02:42 -07:00
Leonardo de Moura
ef18b0ab49 chore: use [builtinInit] 2020-10-19 14:58:38 -07:00
Leonardo de Moura
3cb0dfd38c chore: update stage0 2020-10-19 14:52:04 -07:00
Leonardo de Moura
84a0cd1f59 feat: add [builtinInit] attribute 2020-10-19 14:51:23 -07:00
Leonardo de Moura
213035bffc chore: update stage0 2020-10-19 14:31:55 -07:00
Leonardo de Moura
c7efb1d37d fix: do notation else if
The following `do` block
```lean
if c_1 then
  action_1
else
  if cond_2 then
    action_2
  action_3
```
was being being parsed as
```lean
if c_1 then
  action_1
else if cond_2 then
  action_2
action_3
```

cc @Kha
2020-10-19 14:29:31 -07:00
Leonardo de Moura
e4b2614f5b chore: move to new frontend 2020-10-19 13:21:15 -07:00
Leonardo de Moura
d9daa68d54 chore: move to new frontend 2020-10-19 13:14:14 -07:00
Leonardo de Moura
97be6fa3a5 chore: move to new frontend 2020-10-19 12:43:00 -07:00
Leonardo de Moura
9995eb7ece chore: move to new frontend 2020-10-19 12:22:26 -07:00
Leonardo de Moura
c3897fff31 chore: move to new frontend 2020-10-19 12:15:48 -07:00
Leonardo de Moura
ab047cc4d1 chore: remove unnecessary file 2020-10-19 12:12:03 -07:00
Leonardo de Moura
a13569ab0f chore: move to new frontend 2020-10-19 12:04:50 -07:00
Leonardo de Moura
9778eca9b2 chore: move to new frontend 2020-10-19 11:50:42 -07:00
Leonardo de Moura
7f5ef0c30b chore: move to new frontend 2020-10-19 11:38:00 -07:00
Leonardo de Moura
a1828d5ef4 chore: update stage0 2020-10-19 11:34:06 -07:00
Leonardo de Moura
437f4670ed fix: expand doIf notation before lifting nested methods 2020-10-19 11:32:51 -07:00
Leonardo de Moura
c05f73577a fix: expand doElem macros *before* lifting nested methods 2020-10-19 11:26:14 -07:00
Leonardo de Moura
89ee45ef75 chore: update stage0 2020-10-19 10:26:02 -07:00
Leonardo de Moura
e54a207986 refactor: provide Options to lean_eval_const
add `ImportM` monad for `addImportedFn`

cc @Kha
2020-10-19 10:21:38 -07:00
Leonardo de Moura
17836a3a6f chore: add instance for new frontend
The new frontend uses discrimination trees to filter candidates.
2020-10-19 06:37:23 -07:00
Leonardo de Moura
d3946e49f4 chore: move to new frontend 2020-10-19 06:13:11 -07:00
Leonardo de Moura
9abe45ae4f chore: move to new frontend 2020-10-19 06:03:09 -07:00
Leonardo de Moura
1ad779607e chore: update stage0 2020-10-18 18:07:08 -07:00
Leonardo de Moura
7bfa39ae45 fix: for .. in .. do notation and universe constraints
We use `MProd` instead of `Prod` to group values when expanding the
`do` notation. `MProd` is a universe monomorphic product.
The motivation is to generate simpler universe constraints in code
that was not written by the user but generated by the `do` macro.
Note that we are not really restricting the macro power since the
`HasBind.bind` combinator already forces values computed by monadic
actions to be in the same universe.

The new test cannot be compiled without this modication.
2020-10-18 18:05:00 -07:00
Leonardo de Moura
8136572617 fix: Level metavar formatter 2020-10-18 17:56:47 -07:00
Leonardo de Moura
9d36d91b84 chore: add Elab.command trace class 2020-10-18 16:35:08 -07:00
Leonardo de Moura
5402ea88a2 feat: add withNestedTraces 2020-10-18 16:31:01 -07:00
Leonardo de Moura
7fa43216f5 chore: argument name 2020-10-18 16:19:44 -07:00
Leonardo de Moura
3b8c4ada75 chore: fix tests 2020-10-18 12:27:46 -07:00
Leonardo de Moura
bc072eceea chore: document temporary workaround 2020-10-18 12:22:20 -07:00
Leonardo de Moura
a9d2620a6c feat: add ToMessageData (Option ...) instance 2020-10-18 11:53:43 -07:00
Leonardo de Moura
285658cead fix: Elab.postpone trace message 2020-10-18 11:52:47 -07:00
Leonardo de Moura
40ed0de071 chore: use traceCtx to indent traces in recursive applications 2020-10-18 11:13:59 -07:00