Commit graph

2411 commits

Author SHA1 Message Date
Sebastian Ullrich
51e408590f chore: do not copy whitespace in Syntax synth helpers 2021-01-20 16:48:50 +01:00
Sebastian Ullrich
8ad061e328 feat: leanpkg: change print-path to print-paths that also emit LEAN_SRC_PATH (unused as of yet) 2021-01-19 19:06:01 +01:00
Sebastian Ullrich
e662992533 feat: IO.removeFile 2021-01-19 19:06:01 +01:00
Sebastian Ullrich
d7733ba662 feat: use leanpkg print-path for worker initialization 2021-01-19 19:06:01 +01:00
Leonardo de Moura
0a6d83127d chore: cleanup 2021-01-18 11:46:13 -08:00
Wojciech Nawrocki
af04c66e22 chore: comment style in Init.String.Basic 2021-01-15 13:29:22 -08:00
Wojciech Nawrocki
f3ab908888 fix: substring APIs 2021-01-15 13:29:22 -08:00
Andrew Kent
4f6bb1feb6
feat: add Float.ofInt 2021-01-15 15:45:28 +01:00
Leonardo de Moura
4752c56fe8 feat: improve range of missing cases: ... error message
@Kha I added the helper combinator `withHeadRefOnly x`. I executes `x`
using the head token of the current `ref` as the new `ref`.
2021-01-14 14:48:53 -08:00
Leonardo de Moura
791388400b feat: improve do error messages
cc @Kha @Vtec234
2021-01-14 14:18:56 -08:00
Christian Pehle
225fae9dc2
feat: add shiftLeft and shiftRight for UInt16 and UInt8
The same operations are implemented for UInt32, UInt64 and USize
already.
2021-01-14 15:30:35 +01:00
Leonardo de Moura
bfc1a16c02 chore: adjust instance param order 2021-01-13 18:31:41 -08:00
Leonardo de Moura
e2773113a9 feat: add Float.neg and casts 2021-01-13 10:26:45 -08:00
Leonardo de Moura
f6e5b13591 feat: "implement" sorry using panic 2021-01-13 09:43:25 -08:00
Leonardo de Moura
873634be7e feat: hierarchical InfoTree 2021-01-09 14:10:11 -08:00
Leonardo de Moura
244b72befd feat: simpArrow 2021-01-01 17:15:15 -08:00
Leonardo de Moura
e742dd1348 feat: allow user to set Simp.Config at simp 2021-01-01 15:12:18 -08:00
Leonardo de Moura
ce09e795b9 feat: finalizeProof at rewrite step 2021-01-01 11:33:34 -08:00
Leonardo de Moura
4a06057410 feat: simp 2020-12-31 15:44:18 -08:00
Leonardo de Moura
34f6f8ef5d feat: pre/post simp lemmas 2020-12-30 13:46:14 -08:00
Sebastian Ullrich
4a262fbc5b fix: remove auto-cancellation of IO tasks
Chained tasks were never auto-canceled, so let's be explicit everywhere
2020-12-30 17:03:09 +01:00
Leonardo de Moura
eba3983658 feat: use binrel! gadget to define >, <, ... notations
It has better support for applying coercions.
2020-12-29 16:53:10 -08:00
Sebastian Ullrich
6e33020da4 feat: version information API 2020-12-29 14:42:48 -08:00
Leonardo de Moura
d0b8dc128b chore: annotate instance 2020-12-28 17:57:52 -08:00
Leonardo de Moura
539c43e153 fix: typo
closes #238
2020-12-28 15:55:25 -08:00
Sebastian Ullrich
4a22854b1e chore: make server tests fixable 2020-12-27 15:05:29 +01:00
Sebastian Ullrich
1f563695bb feat: From/ToJson derive handlers 2020-12-26 19:38:24 +01:00
Leonardo de Moura
4450b8567d fix: sigma notation precedence 2020-12-26 09:35:40 -08:00
Leonardo de Moura
7f9466a7ce chore: use soft line breaks at if-then-else formatters
and remove `priority` leftover.
2020-12-24 08:35:43 -08:00
Leonardo de Moura
3655b1d9d0 chore: remove old if-then-else parsers 2020-12-24 08:25:14 -08:00
Leonardo de Moura
c9b42af537 chore: (prepare to) rename if-then-else parsers
We also add formatting directives to the new if-then-else parsers.
2020-12-24 08:20:07 -08:00
Leonardo de Moura
ccefe970dc feat: store endPos at Log.lean 2020-12-23 19:09:41 -08:00
Wojciech Nawrocki
3fca58ea8c feat: IO.FS.Handle.size 2020-12-23 20:00:36 +01:00
Sebastian Ullrich
3cdcdac921 feat: infer worker path 2020-12-23 20:00:36 +01:00
Marc Huisinga
088c3347cd feat: adjust file worker for new IO features 2020-12-23 20:00:36 +01:00
Leonardo de Moura
839017fdae feat: add macro tactical solve 2020-12-22 14:36:20 -08:00
Leonardo de Moura
9a1116d918 chore: remove <or>, first subsumes it 2020-12-22 14:10:08 -08:00
Leonardo de Moura
832c7412d6 feat: add first tactical
@Kha It has a few advantages over `<or>` (`<|>`).
- It is not an infix operator.
- It takes tactic sequences instead of tactics as arguments

For example, we can write
```
  first
    | apply h1; assumption
    | exact y; exact h3; assumption
```
or
```
first apply h1; assumption | exact y; exact h3; assumption
```
instead of
```
(apply h1; assumption) <|> (exact y; exact h3; assumption)
```
2020-12-22 14:10:07 -08:00
Leonardo de Moura
56e2ff81b8 chore: ensure all term parsers have precedence >= min 2020-12-22 14:10:07 -08:00
Leonardo de Moura
69d83ecb86 chore: make sure term and tactic parsers have disjoint infix operators 2020-12-22 14:10:07 -08:00
Leonardo de Moura
7b813622c6 chore: increase precedence of |>, <|, $ parsers
@Kha Now, all parsers defined by `Init/Std/Lean` packages have
precedence >= `min` and <= `max`.
The only exception is `<|>` since it is an infix operator sharead with
the tactic DSL.
BTW, the meaning of `f $ a <|> b` changed with this commit.
It was `f (a <|> b)`, and now is `(f a) <|> b`. The problem is that
the precedence of the `$` parser is now greater than the `<|>` parser.

I will try another experiment where I make sure we do not "reuse"
term infix operators in the tactic DSL.
2020-12-22 14:10:07 -08:00
Leonardo de Moura
18aee9de30 fix: precedence issues at tactic DSL 2020-12-22 14:10:06 -08:00
Leonardo de Moura
f34bf82e0f chore: move tactic parsers introMatch and match to Lean/Parser/Tactic 2020-12-22 07:11:06 -08:00
Leonardo de Moura
836fd46d90 feat: add OfNat instance for Fin 2020-12-21 16:38:53 -08:00
Leonardo de Moura
7723953188 chore: use instance (priority := <prio>) 2020-12-21 10:17:54 -08:00
Leonardo de Moura
c43e77d1a5 chore: fix Notation.lean 2020-12-21 09:47:11 -08:00
Sebastian Ullrich
cf73233dd2 refactor: use quotations & implicit token positions from getRef to clean up a bit 2020-12-21 17:32:36 +01:00
Sebastian Ullrich
cf7f60b470 feat: attach getRef position to symbols from quotations
/cc @leodemoura
2020-12-21 16:24:39 +01:00
Sebastian Ullrich
eeb0cad29e feat: if let
/cc @leodemoura
2020-12-20 16:46:03 +01:00
Leonardo de Moura
339a4cf740 chore: remove defaultInstance for ToString 2020-12-19 19:10:42 -08:00