Commit graph

4177 commits

Author SHA1 Message Date
Leonardo de Moura
983579c0cf feat: enable leadingIdentAsSymbol for tactic category 2020-01-13 16:20:34 -08:00
Simon Hudon
dd6e95c718 fix: lowercase error messages 2020-01-12 11:05:48 -08:00
Sebastian Ullrich
2e5f62d44f test: parser/macro macros 2020-01-12 10:32:27 -08:00
Leonardo de Moura
64ef03d736 chore: lowercase error messages
@cipher1024 We use lowercase error messages in Lean. I know other
systems capitalize, but we need consistency.
2020-01-12 08:21:26 -08:00
Simon Hudon
6d8927da10 fix: little details 2020-01-12 08:02:48 -08:00
Simon Hudon
92c8773137 feat: file IO using handles 2020-01-12 08:02:48 -08:00
Leonardo de Moura
c358d688c6 chore: fix tests 2020-01-11 15:20:37 -08:00
Leonardo de Moura
f83678f19b chore: fix test 2020-01-11 13:55:31 -08:00
Leonardo de Moura
6762f8ea9a test: old frontend exports at new frontend
We can now "see" exports made in the old frontend in the new one.

cc @dselsam @kha
2020-01-11 13:50:18 -08:00
Leonardo de Moura
246e0a5532 fix: propagate type before synthesizeSyntheticMVars 2020-01-11 12:01:12 -08:00
Leonardo de Moura
82a36fbfe2 feat: declare_syntax_cat without importing Init.Lean
cc @Kha
2020-01-11 09:02:50 -08:00
Leonardo de Moura
95ed5bd468 chore: fix test 2020-01-10 21:26:09 -08:00
Leonardo de Moura
e817257922 feat: elaborate declare_syntax_cat
TODO: `registerParserCategory` uses `registerAttribute` which relies
on the environment having a declaration of type `AttributeImpl`.
This is bad since forces users to import `Init.Lean`.

@Kha The key problem is that we cannot serialize `AttributeImpl`.
I will try to address this issue tomorrow. I am considering different
workarounds.
2020-01-10 21:10:02 -08:00
Leonardo de Moura
f73ff914eb feat: extensible elaboration functions
@kha `termParserAttr.lean` has a small example
2020-01-10 15:05:14 -08:00
Leonardo de Moura
f60c8c6249 test: add kabstract tests 2020-01-10 13:30:50 -08:00
Leonardo de Moura
f8c7d6ca6b feat: elaborate optParam 2020-01-10 09:32:01 -08:00
Leonardo de Moura
733ea89000 feat: improve application type mismatch error message 2020-01-09 16:41:27 -08:00
Leonardo de Moura
693d7dcf62 test: add class projection test 2020-01-09 16:25:12 -08:00
Leonardo de Moura
bba9cdd8ff feat: improve support for nat literals 2020-01-09 15:36:46 -08:00
Leonardo de Moura
3d1ee3f408 fix: add isNewAnswer predicate
reactivate `typeclass_coerce.lean` test
2020-01-09 13:37:21 -08:00
Leonardo de Moura
c49e43f69f chore: reactivate typeclass test 2020-01-09 11:47:48 -08:00
Leonardo de Moura
bc393a750d chore: reactivate typeclass test
I had to split the test because `new_frontend` command consumes the
rest of the file.
2020-01-09 11:46:10 -08:00
Leonardo de Moura
178e411031 chore: reactivate typeclass_append 2020-01-09 11:40:34 -08:00
Leonardo de Moura
21e2d3b80f chore: reactivate typeclass_diamond.lean 2020-01-09 10:49:01 -08:00
Leonardo de Moura
ebd20432b6 fix: isDefEqOffset 2020-01-09 10:47:02 -08:00
Leonardo de Moura
2a8e179a64 feat: add #synth command to new frontend 2020-01-09 09:54:45 -08:00
Leonardo de Moura
65370e9322 chore: restore disabled tests 2020-01-08 21:24:01 -08:00
Leonardo de Moura
760f8aa013 chore: fix tests 2020-01-08 21:09:17 -08:00
Leonardo de Moura
3403520d89 test: add parser test at tests/lean/run 2020-01-08 21:09:17 -08:00
Leonardo de Moura
680ac55506 test: repro for constant compilation issue 2020-01-08 15:17:07 -08:00
Leonardo de Moura
9ebf21f2d5 fix: elabConstant 2020-01-08 15:06:18 -08:00
Leonardo de Moura
187897d90d fix: bug at expandOptType 2020-01-07 17:14:49 -08:00
Leonardo de Moura
3de7d6d5c3 fix: remove mvarTypeNotWellFormedInSmallerLCtx
We use `check` recursively instead of `isWellFormed`.

@kha This was the last bug for the repro
```
```
This example works now, but I am sure there are many other bugs.
2020-01-07 16:56:10 -08:00
Leonardo de Moura
2ce2610c0a feat: add compileDecl
cc @kha
2020-01-07 16:38:41 -08:00
Leonardo de Moura
4b08b1eea3 fix: ?m t =?= ?n 2020-01-07 16:05:17 -08:00
Leonardo de Moura
a99523b4b3 feat: add set_option ppOld false option for disabling ppOld
The old pretty printer often sucks.
2020-01-07 13:20:54 -08:00
Leonardo de Moura
4b37c5ad04 test: add new_frontend command test 2020-01-06 21:02:25 -08:00
Leonardo de Moura
24f1479758 chore: remove workaround 2020-01-06 16:44:08 -08:00
Leonardo de Moura
20c0a63908 feat: add support for optParam 2020-01-06 16:41:48 -08:00
Leonardo de Moura
bccaaa7af0 fix: bug at lit_type binding
cc @kha
2020-01-06 15:44:38 -08:00
Leonardo de Moura
865ef32e91 feat: add parser! and tparser! elaborators
@Kha It is not convenient to use because
1- Coercions have not been implemented
2- Autoparams have not been implemented
3- There is bug the `Expr.lit` type checker
4- The new frontend uses a different mechanism for `export`. So,
`export`s in imported files compiled with the old frontend do not work.

I am working on these issues.
2020-01-06 15:10:35 -08:00
Leonardo de Moura
6c474a1eb6 test: add tests/lean/newfrontend
cc @Kha
2020-01-06 14:07:22 -08:00
Leonardo de Moura
911e9535b9 feat: elabDefLike 2020-01-06 12:10:08 -08:00
Sebastian Ullrich
bece6f7a32 feat: command quotations 2020-01-06 10:09:26 -08:00
Leonardo de Moura
5be180910f test: add applyAttributes test 2020-01-05 16:27:22 -08:00
Leonardo de Moura
0231841984 feat: applyAttributes 2020-01-05 16:22:46 -08:00
Leonardo de Moura
c233225153 feat: add mkForallUsedOnly
This commit also fixes a bug at `mkBinding` for unused let-decls
2020-01-05 11:53:39 -08:00
Leonardo de Moura
bc7455e04e refactor: CommandElabM and FrontendM in IO 2020-01-03 18:15:45 -08:00
Leonardo de Moura
e949a052ba feat: elaborate where 2020-01-02 15:01:26 -08:00
Leonardo de Moura
16aff9a182 feat: elaborate have 2020-01-02 14:16:20 -08:00