Commit graph

5470 commits

Author SHA1 Message Date
Sebastian Ullrich
9c6ff0baac chore: certainly this one is the right fix 2020-08-29 12:56:37 +02:00
Sebastian Ullrich
0b727a6d78 chore: fix stdlib benchmark once more... 2020-08-29 10:40:21 +02:00
Leonardo de Moura
99f3296828 refactor: simplify Util/Trace.lean 2020-08-28 17:36:44 -07:00
Leonardo de Moura
e0d39e6a7d feat: use whnf at subst 2020-08-28 15:56:28 -07:00
Leonardo de Moura
2287c7e7b3 feat: elaborate #print axioms command 2020-08-28 13:08:42 -07:00
Leonardo de Moura
50470c328f test: nativeRefl! abuse example 2020-08-28 12:09:25 -07:00
Sebastian Ullrich
110ae4b571 feat: replace OS-specific stream redirection with pure-Lean Stream redirection
This avoids the temporary files workaround on macOS and Windows, and makes sure
we can process a `#eval` command and write messages to stdout at the same time.
2020-08-28 10:04:32 -07:00
Sebastian Ullrich
efa119bc94 feat: make std streams Streams 2020-08-28 10:04:32 -07:00
Sebastian Ullrich
dbebff3a2d feat: ByteArray.copySlice 2020-08-28 10:04:32 -07:00
Sebastian Ullrich
1b0ffbb74d feat: make std IO streams settable
Co-authored-by: Simon Hudon <simon.hudon@gmail.com>
2020-08-28 10:04:32 -07:00
Leonardo de Moura
54f95421c8 test: Lean2 obtain is just a macro 2020-08-28 09:37:29 -07:00
Leonardo de Moura
62177069fd fix: induction tactic 2020-08-28 09:18:22 -07:00
Leonardo de Moura
0b7a7f7b90 feat: better support for _ in match tactic 2020-08-27 18:18:49 -07:00
Leonardo de Moura
76bda91ff8 feat: add evalMatch for tactics 2020-08-27 18:05:06 -07:00
Leonardo de Moura
6f1975aef5 feat: report errors for unassigned metavariables
We were not reporting unassigned metavariables due to
1- `_`
2- Named holes (e.g., `?x`)
3- Implicit arguments
2020-08-27 15:03:41 -07:00
Leonardo de Moura
09a375b540 feat: reject _ where function is expected
It should behave like Lean3.
2020-08-26 18:48:05 -07:00
Leonardo de Moura
4934a2d522 chore: remove workaround 2020-08-26 16:24:20 -07:00
Leonardo de Moura
011d8c02c8 test: letrec error messages 2020-08-26 15:30:19 -07:00
Leonardo de Moura
5a7bf86a42 test: add test for buggy compiler step
Bug was fixed at da928f8c0
2020-08-26 08:34:35 -07:00
Sebastian Ullrich
2c1b0e3114 chore: remove hanging stdlib bench test from CI 2020-08-26 11:34:43 +02:00
Leonardo de Moura
321719b300 feat: add MonadFinally 2020-08-25 17:58:35 -07:00
Leonardo de Moura
813a964767 refactor: move polymorphic Meta methods back to Meta namespace 2020-08-25 14:57:58 -07:00
Leonardo de Moura
7888919aa9 test: MonadControl 2020-08-25 13:54:41 -07:00
Leonardo de Moura
b095f0652a fix: tryLiftAndCoe 2020-08-25 13:54:41 -07:00
Leonardo de Moura
e5b7daf9c2 refactor: make AppBuilder methods polymorphic 2020-08-24 18:23:34 -07:00
Leonardo de Moura
14f973d5a0 chore: fix tests 2020-08-24 17:59:11 -07:00
Leonardo de Moura
fab100abb4 chore: fix tests 2020-08-24 12:17:47 -07:00
Sebastian Ullrich
defc7f766e chore: try to fix benchmark once more... 2020-08-24 17:49:55 +02:00
Sebastian Ullrich
9106417693 chore: fix speedcenter test, perf stat runner not supporting multiline cmds 2020-08-24 16:30:50 +02:00
Sebastian Ullrich
015903f055 chore: speedcenter: benchmark actual, parallel stdlib build 2020-08-24 13:43:44 +02:00
Leonardo de Moura
060f7f0f04 chore: fix tests 2020-08-23 19:58:41 -07:00
Leonardo de Moura
77b9445544 feat: real ST monad
@Kha: the new `ST` (and `EST`) are escapable like the Haskell ST monad.
It makes `StateRefT` much more useful because we can now run it from pure
code.
2020-08-23 12:15:32 -07:00
Leonardo de Moura
5ffbada3df feat: add Lean.MonadEnv, Lean.MonadError, and Lean.MonadOptions
This is the first set of polymorphic methods. I will add more later,
and keep reducing code duplication.

cc @Kha
2020-08-22 16:00:43 -07:00
Leonardo de Moura
5cc173788e chore: remove ECoreM 2020-08-21 17:29:13 -07:00
Leonardo de Moura
f46c5d01b1 feat: uniform Exceptions 2020-08-21 17:02:21 -07:00
Leonardo de Moura
32a55d5b9c refactor: remove special support for IO errors
They are now just regular errors.
2020-08-21 11:55:58 -07:00
Leonardo de Moura
916b395d1b chore: cleanup 2020-08-21 09:29:09 -07:00
Sebastian Ullrich
55b043cabe chore: update cross benchsuite 2020-08-21 16:05:40 +02:00
Sebastian Ullrich
786d90ac80 refactor: move parenthesizer and formatter into CoreM
/cc @leodemoura
2020-08-21 14:23:58 +02:00
Sebastian Ullrich
2a1d9b392f fix: test 2020-08-21 10:31:56 +02:00
Leonardo de Moura
d519a5d526 chore: use MetaM.toIO 2020-08-20 19:20:11 -07:00
Leonardo de Moura
cafb200296 chore: fix some tests 2020-08-20 19:13:47 -07:00
Leonardo de Moura
d6b96b4d8b chore: fix some tests 2020-08-20 18:36:29 -07:00
Leonardo de Moura
44f5182f76 chore: fix tests
We have removed `MetaIO`. We use use `CoreM` instead.
2020-08-20 15:56:29 -07:00
Sebastian Ullrich
ea266e48ab feat: unicodeSymbol.formatter: prefer symbol used in syntax tree 2020-08-20 18:57:08 +02:00
Sebastian Ullrich
2295749488 test: formatter no longer needs Lean.Parser imported 2020-08-20 15:55:41 +02:00
Leonardo de Moura
eec12232e3 chore: fix test
We would need to add the following instance to fix this example
```lean
instance ExceptT.monadIO {σ} (m : Type → Type) [Monad m] [MonadIO m] : MonadIO (ExceptT σ m) := {}
```
However, this instance may create problems for polymorphic functions on
`MonadIO m`. If `m` is of the form  `ExcepT Except1 ... EIO Exception2`,
then `finally` and `catch` is catching `Except1`. This is particularly
bad for code that uses `finally`.

Right now, we are not using monad stacks with multiple `ExceptT`s for
performance reasons, but we should have a solution for users.
2020-08-19 14:55:56 -07:00
Leonardo de Moura
75e6b5b379 fix: missing instance 2020-08-19 12:28:22 -07:00
Leonardo de Moura
61d1846334 feat: add adaptTheReader 2020-08-19 10:23:11 -07:00
Leonardo de Moura
e28f68936d feat: add MonadReaderOf 2020-08-19 10:14:36 -07:00