Commit graph

10 commits

Author SHA1 Message Date
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
Wojciech Nawrocki
b1e6edefde fix: redirect child I/O to null on Process.Stdio.null
And don't use errno for Win32 API errors.
2020-11-27 13:17:32 -08:00
Leonardo de Moura
db9e390b4d chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
Sebastian Ullrich
16c71e6a26 fix: IO.Process.output 2020-09-29 08:01:10 -07:00
Leonardo de Moura
a0a724ddbd fix: tests and elabDo 2020-09-26 19:12:01 -07:00
Leonardo de Moura
32e26799ed chore: move more tests to new frontend 2020-09-13 13:28:12 -07:00
Sebastian Ullrich
8ed4d1d7e4 test: test process exit code 2020-08-30 14:28:56 -07:00
Sebastian Ullrich
8b79e0f28c test: robustly fix test on Windows 2020-08-30 14:28:56 -07:00
Sebastian Ullrich
cc909e20e1 fix: handle SIGPIPE 2020-08-30 14:28:56 -07:00
Sebastian Ullrich
9f40e46043 feat: basic process API 2020-08-30 14:28:56 -07:00