Sebastian Ullrich
5d260c396f
fix: macOS build
2020-05-14 14:47:54 +02:00
Sebastian Ullrich
5f1a052998
feat: replace --make with -o flag that takes an explicit .olean target file name
2020-05-14 14:47:54 +02:00
Sebastian Ullrich
872d5fc7ba
feat: stop compiling Lean code as C++, remove --cpp option
...
Since we don't use static initializers, really the only difference between using `clang` and `clang++` is the default
inclusion of the C++ standard library.
2020-05-14 14:45:33 +02:00
Sebastian Ullrich
053d4bab1c
chore: factor out and unify common test behavior; retrieve lean from PATH
...
`./test_single.sh foo.lean yes` is now `./test_single.sh -i foo.lean`
2020-05-14 14:38:52 +02:00
Sebastian Ullrich
bc40796729
chore: remove fail/ tests
...
Checking for *any* failure is never a good idea. Use `$f.expected.ret` instead.
2020-05-14 14:38:52 +02:00
Sebastian Ullrich
a5382f45ff
chore: stop normalizing the input path in error messages
2020-05-14 14:38:52 +02:00
Sebastian Ullrich
76a97ea4fc
feat: infer module name from cwd instead of LEAN_PATH, also make build system less specific to Init/
2020-05-14 14:38:52 +02:00
Sebastian Ullrich
be79820a47
feat: add IO.currentDir
2020-05-14 14:38:52 +02:00
Leonardo de Moura
72aeab24eb
chore: adjust new frontend
2020-05-12 15:07:06 -07:00
Leonardo de Moura
50990b99d6
chore: remove unnecessary annotations
2020-05-12 15:02:03 -07:00
Leonardo de Moura
ebfa362507
chore: fix HasOfNat
2020-05-12 15:02:03 -07:00
Leonardo de Moura
33a10130cf
chore: fix stdlib
2020-05-12 15:02:03 -07:00
Leonardo de Moura
03403ba3c8
feat: make RelaxedImplicit the default behavior
2020-05-12 15:02:03 -07:00
Leonardo de Moura
e596820f2e
chore: remove () modifier
...
cc @Kha
2020-05-12 15:02:02 -07:00
Sebastian Ullrich
f3976fc53a
chore: parenthesizer: address some comments
2020-05-05 14:43:15 +02:00
Sebastian Ullrich
386c706f3e
feat: basic parenthesizer
2020-05-04 14:28:36 -07:00
Sebastian Ullrich
822897e218
feat: lift MonadTracerAdapters
2020-05-04 14:28:36 -07:00
Sebastian Ullrich
942ed3a6a8
chore: set precedence of universe placeholder
2020-05-04 14:28:36 -07:00
Sebastian Ullrich
6a10e1254e
fix: blockImplicitLambda: ignore parentheses
2020-05-04 14:28:36 -07:00
Sebastian Ullrich
11c3ada877
feat: add [parenthesizer] attribute
2020-05-04 14:28:36 -07:00
Sebastian Ullrich
28350f46d8
feat: prevent Windows error message boxes in all Lean programs
2020-05-04 11:11:11 +02:00
Sebastian Ullrich
5107403d24
feat: detect stack overflows on all platforms and threads
2020-05-04 11:11:11 +02:00
Sebastian Ullrich
e7920bcdb5
chore: remove test special case
2020-05-04 11:11:11 +02:00
Sebastian Ullrich
7899ab3761
feat: report stack overflows as such on Linux
...
Port of the corresponding Rust code (Apache/MIT)
2020-04-30 13:16:42 -07:00
Sebastian Ullrich
ec9f4b579d
chore: improve precision of compilation time profiling
2020-04-24 15:11:36 +02:00
Sebastian Ullrich
24f22f7643
chore: log cumulative #eval execution time
2020-04-24 15:11:36 +02:00
Leonardo de Moura
bc57faff08
fix: ensure compiler representation invariants are preserved
2020-04-23 13:54:14 -07:00
Sebastian Ullrich
8f67db0101
refactor: never implicitly ignore monadic results
...
Also change `do e; f` to desugar to `e *> f` so that it is affected as well
2020-04-23 11:09:59 -07:00
Marc Huisinga
aa4fc12dff
feat: translate and refactor Gabriel Ebner's JSON parser
...
implement the JSON parser from https://github.com/gebner/lean4/tree/server by @gebner using new Lean 4 syntax and fix some minor bugs.
2020-04-15 11:29:18 -07:00
Leonardo de Moura
7322345768
fix: private names
...
@Kha I tried to fix a few issues with private names. The new test
tries to cover them. If you have more, please create an issue.
1- Scoping. A private declaration should shadow one in a previous scope.
2- We should not be able to define the same `private` in the same
module more than once.
```
private def x := 10
private def x := "hello" -- should produce error here
```
3- Dot-notation should work with private declarations in the module
where they were defined.
4- The following should work
```
namespace N
private def x := 10
end N
#check N.x
```
5- The following should **not** work
```
def y := 10
private def y := "hello" -- produce error
private def z := 10
def z := "hello" -- produce error
```
BTW, I am happy to change this behavior. I just mimicked C's
behavior for `static`.
It is not clear whether the following should work or not.
```
namespace N
private def b := 10
end N
open N
#check b
```
2020-04-09 16:28:21 -07:00
Leonardo de Moura
596a3af1a0
feat: check if "has already been declared" at the beginning
2020-04-09 15:29:10 -07:00
Leonardo de Moura
360cebf680
fix: induction tactic must check expected major premise type
...
`whnfUntil` now returns `Option Expr`.
2020-04-09 11:18:02 -07:00
Leonardo de Moura
9a38aca8ec
feat: add evalFailIfSuccess
2020-04-09 11:02:15 -07:00
Leonardo de Moura
539bb4a282
feat: add failIfSuccess tactic parser
2020-04-09 10:55:03 -07:00
Leonardo de Moura
9a5bed0f94
fix: missing ! at whnfUntil
2020-04-09 10:49:20 -07:00
Leonardo de Moura
7a5fcfae8b
feat: add [recursor] attribute to Iff.elim
2020-04-09 10:45:27 -07:00
Leonardo de Moura
40336131bb
feat: do not switch to term mode in the RHS of induction and cases tactics
2020-04-08 17:45:06 -07:00
Daniel Selsam
fd61812b6e
fix: wrong instance order for several instances
2020-04-08 16:55:48 -07:00
Leonardo de Moura
e22af8d1ef
feat: add FloatArray
...
cc @dselsam
2020-04-07 18:05:54 -07:00
Leonardo de Moura
b8ea55c989
feat: expose some transcendental functions from the C library
...
cc @dselsam
2020-04-06 15:22:25 -07:00
Leonardo de Moura
705530b62b
fix: remove DecidableEq for Float
...
We cannot implement `DecidableEq Float` using C equality for
`double`. Reason: the C implementation is not even reflexive.
If we need `DecidableEq Float`, we will need to provide our own
implementation (i.e., a wrapper around the one provided by the
hardware). In this commit, we implement `HasBeq Float` instead.
cc @dselsam
2020-04-06 14:10:18 -07:00
Leonardo de Moura
8e84a8c9ec
feat: Float from big numbers
2020-04-06 14:05:17 -07:00
Sebastian Ullrich
f66039f7f0
feat: generalize Array function universes
2020-04-06 13:48:09 -07:00
Leonardo de Moura
746615d81d
chore: remove ⇒ as alternative for =>
2020-04-06 13:45:22 -07:00
Sebastian Ullrich
e971c8dd7a
feat: support Float in the interpreter
...
/cc @leodemoura @dselsam
2020-04-05 10:50:30 +02:00
Leonardo de Moura
acad6015c4
chore: add new primitives to object.h
2020-04-03 18:26:13 -07:00
Leonardo de Moura
64c3be44f8
fix: lean_unbox_float
2020-04-03 18:23:45 -07:00
Leonardo de Moura
8e952f3c36
chore: style
2020-04-03 17:48:06 -07:00
Leonardo de Moura
485034bbba
fix: bug at ir.cpp
2020-04-03 17:39:28 -07:00
Leonardo de Moura
c236a179f2
feat: enable externs
2020-04-03 17:19:48 -07:00