Leonardo de Moura
06ad52575a
feat: force users to use discard when action result is not being bound and it is not PUnit
...
After this commit, we have to use an explicit `discard` in code such as
```
def g (x : Nat) : IO Nat := ...
def f (x : Nat) : IO Unit := do
discard <| g x -- type error without the `discard`
IO.println x
```
Motivation: prevent users from making mistakes such as
```
def f (xs : Array Nat) : IO Unit := do
xs.set! 0 1
IO.println xs
```
when they meant to write
```
def f (xs : Array Nat) : IO Unit := do
let xs := xs.set! 0 1
IO.println xs
```
2020-12-08 06:14:48 -08:00
Leonardo de Moura
898a08a0c1
chore: avoid Has prefix in type classes
...
closes #203
2020-10-27 18:29:19 -07:00
Leonardo de Moura
10c32fcf94
chore: HasToString => ToString
2020-10-27 16:11:48 -07:00
Leonardo de Moura
db9e390b4d
chore: remove new_frontend from tests
2020-10-25 09:16:38 -07:00
Leonardo de Moura
a0a724ddbd
fix: tests and elabDo
2020-09-26 19:12:01 -07:00
Leonardo de Moura
54e006dc53
chore: move test to new frontend
2020-09-11 07:47:19 -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
0714716477
fix: file and import names, tests and stage0
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2019-10-04 17:04:02 -07:00
Sebastian Ullrich
3ed67138d5
chore(*): update equation syntax in files and old parser
...
for f in ../../**/*.lean; do echo $f; ./patch.lean.out $f > tmp && cat tmp > $f; done
2019-08-09 11:11:34 +02:00
Leonardo de Moura
b0d0cf973d
chore(tests): fix tests
2019-07-25 17:44:25 -07:00
Leonardo de Moura
40943f84f3
chore(tests): fix tests
2019-07-17 10:46:35 -07:00
Sebastian Ullrich
c299e6c0e6
chore(tests): fix do syntax in tests
2019-06-30 13:04:34 +02:00
Leonardo de Moura
7bb015c6b3
chore(tests/lean): fix more tests
2019-03-21 15:11:05 -07:00
Sebastian Ullrich
f34d37c371
chore(tests): port tests, fix at least compiler tests
2019-03-21 15:11:05 -07:00
Leonardo de Moura
9e305a5f26
chore(library): remove return, we should use pure
2018-09-12 16:51:11 -07:00
Sebastian Ullrich
adfc8c9e62
chore(tests/lean/run/deriv): fix test
2018-08-23 10:38:59 -07:00
Sebastian Ullrich
9db688f4c2
fix(library/{vm/vm_io,init/io}): fix bugs and tests
2018-08-21 08:43:09 -07:00
Sebastian Ullrich
37e5f03351
refactor(library/system/io): move into init
2018-08-21 08:43:09 -07:00
Leonardo de Moura
d57c2df9c1
test(tests/lean/run/deriv): add benchmark
2018-04-12 16:43:11 -07:00