Commit graph

153 commits

Author SHA1 Message Date
Leonardo de Moura
7111eb4d79 chore: move to new frontend 2020-10-21 13:30:43 -07:00
Leonardo de Moura
192d45d867 chore: fix tests 2020-10-20 16:15:30 -07:00
Leonardo de Moura
2899e09754 chore: fix test 2020-10-14 13:23:25 -07:00
Leonardo de Moura
dc670bfd5d fix: handle optParam at consumeImplicits
`consumeImplicits` is used during LVal resolution.
2020-10-11 15:26:10 -07:00
Leonardo de Moura
adc33da468 chore: $. and · 2020-10-11 15:08:12 -07:00
Leonardo de Moura
89eebc9534 fix: use resolveGlobalConstNoOverload at init attribute handler 2020-10-10 11:37:37 -07:00
Leonardo de Moura
63edecf106 feat: expand initialize macro 2020-10-10 08:23:49 -07:00
Leonardo de Moura
f80345a6d4 chore: move tests to new frontend 2020-10-10 07:41:04 -07:00
Leonardo de Moura
5a40d9eb13 feat: add Subarray 2020-10-09 16:06:24 -07:00
Leonardo de Moura
ac07999e95 chore: cleanup do expander, and make sure it can handle the "easy" doLetArrows 2020-10-07 17:00:07 -07:00
Sebastian Ullrich
c3ebb6ad1f fix: Format.group ignored preceding content on line 2020-10-07 09:43:05 +02:00
Leonardo de Moura
0447966b72 chore: adjust elaborator to new syntax 2020-10-06 06:53:12 -07:00
Leonardo de Moura
a84b3ac8de chore: fix old elabDo and test 2020-10-03 08:36:22 -07:00
Leonardo de Moura
40640b85bd fix: doSeqBracketed parser
It was failing to parse
```
def f2 (x : Nat) : IO Nat := do {
  let y := 1;
  if x > 0 then
    y := y + 1;
  IO.println y
}
```

cc @Kha
2020-10-02 15:05:22 -07:00
Leonardo de Moura
65834b95ff chore: fix test 2020-09-28 17:11:00 -07:00
Leonardo de Moura
7f2c5ffd9a chore: fix test 2020-09-28 17:10:57 -07:00
Leonardo de Moura
a0a724ddbd fix: tests and elabDo 2020-09-26 19:12:01 -07:00
Leonardo de Moura
6892a957d6 feat: trailing ; in indented "do" sequences
cc @Kha
2020-09-26 16:08:30 -07:00
Leonardo de Moura
13ded3f964 chore: use doElem category 2020-09-26 12:51:24 -07:00
Leonardo de Moura
98f7e9b3e4 chore: naming convention 2020-09-24 19:22:24 -07:00
Sebastian Ullrich
77cbaa752c fix: Task: make reference and -j0 semantics eager, simplify 2020-09-14 17:57:33 +02:00
Leonardo de Moura
250dc3e3a9 fix: adjust expanders and elaborators to new matchAlts node 2020-09-04 18:59:28 -07:00
Sebastian Ullrich
c88784ef9d refactor: consistent io_result_mk* naming
/cc @leodemoura
2020-08-31 11:08:57 +02:00
Sebastian Ullrich
eb5a171764 feat: adjust semantics to new syntax 2020-08-19 09:56:23 -07:00
Leonardo de Moura
3342ba08d2 feat: implement let elaborators without using match_syntax
@Kha I had to do this because of the `ident` vs `Term.id` recurrent
issue. `match_syntax` fails if a `Term.id` is used at `Term.letIdDecl`
where an `ident` is expected.
We should try to remove `Term.id` in the future.
2020-08-17 09:27:54 -07:00
Leonardo de Moura
d1d91b3a50 chore: fix test 2020-08-10 11:19:05 -07:00
Leonardo de Moura
e59735bde9 chore: fix test
@Kha the tests `Reparen.lean` and `Reformat.lean` are still
broken. Could you please take a look?
They broke because I changed the `match` syntax at 3ce794c58.
2020-08-10 10:20:57 -07:00
Sebastian Ullrich
a0b0dbd0ac fix: formatStx 2020-08-06 09:27:12 -07:00
Sebastian Ullrich
c8b6020bb3 test: do not ignore whitespace in diff
It doesn't look like we were relying on it much
2020-08-06 09:26:48 -07:00
Leonardo de Moura
cbb14673ef chore: move RBTree and RBMap to Std 2020-06-25 13:26:16 -07:00
Leonardo de Moura
657879fcaa chore: fix tests 2020-06-25 11:58:49 -07:00
Leonardo de Moura
77e1260ed2 chore: simplify checkPrec 2020-06-10 14:34:58 -07:00
Leonardo de Moura
9a349a913a chore: remove sortApp
@Kha Note that `checkRBPGreater` comment and name were incorrect. It
was actually checking whether the RBP <= lower
2020-06-03 15:18:16 -07:00
Leonardo de Moura
17b6957f6c chore: fix tests 2020-05-26 15:05:01 -07:00
Leonardo de Moura
9c0bd9dd41 chore: fix tests 2020-05-26 15:05:00 -07:00
Sebastian Ullrich
c50cd2527c fix: include headers in test 2020-05-23 12:39:49 +02:00
Leonardo de Moura
a2e339e868 chore: fix test 2020-05-22 14:47:39 -07:00
Leonardo de Moura
ee0fb1bfd8 chore: fix test
@Kha

I was having several errors of the form
```
224: /Users/leonardodemoura/projects/lean4/build/release/stage0.5/bin/../include/lean/runtime/exception.h:23:13: error: exception specification of overriding function is more lax than base version
224:     virtual ~throwable() noexcept;
224:             ^
224: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/exception:102:13: note: overridden virtual function is here
224:     virtual ~exception() _NOEXCEPT;
224:             ^
224: In file included from myfuns.cpp:1:
```

As far as I can tell, the error ocurrs because my compiler uses an old
C++ standard if the option `-std` is not used.
I guess `-std=c++11` would also works, but I decided to use the same
standard we used to compile Lean.
2020-05-22 09:33:46 -07:00
Sebastian Ullrich
36e040ecfa test: reimplement compiler/foreign on top of leanmake 2020-05-22 09:22:26 -07:00
Leonardo de Moura
a01552d361 chore: fix some tests
Two of them are still broken due to a bug in the new elaborator.
2020-05-21 09:50:20 -07:00
Leonardo de Moura
bd58048449 chore: { <source> with ... } syntax 2020-05-20 15:08:43 -07: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
Leonardo de Moura
ebc0663b3f chore: fix tests 2020-05-12 15:02:03 -07: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
Leonardo de Moura
5437ce9106 chore: workaround bugs exposed by previous commit 2020-04-23 11:32:39 -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
Leonardo de Moura
2a1d9a0285 test: simple demo mixing C/C++ and Lean
@dselsam @kha
I did not have to create a new shared library.
The main limitation of this approach is that the new `extern`
functions are only available in compile code. That is, we cannot use
them with `#eval`.
2020-04-06 16:16:49 -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