lean4-htt/tests
Leonardo de Moura f2339268b1 fix: adjust code to new match-compiler
In the new frontend,
```lean
@[macroInline] def or : Bool → Bool → Bool
  | true,  _ => true
  | false, b => b
```
is compiled as
```lean
def or (x y : Bool) : Bool :=
  or.match_1 _ x y (fun _ => true) (fun b => b)
```
Thus, the `[macroInline]` attribute does not guarantee that `y` is
evalutated only when `x` is `false`. The new definition does.

This issue was not exposed before because the compiler has an
optimization that float let-decls when they are used in a single
branch.

@Kha We have talked about removing `macroInline`, and defining
functions such as `or` as
```lean
@[inline] def or (x : Bool) (y : Unit -> Bool) : Bool :=
  match x with
  | true  => true
  | false => y ()
```
and define `x || y` as notation for `or x (fun _ => y)`.
I think this is the way to go for polymorphic operators such as `<|>`,
but I am not sure about `or`. New users will probably be puzzled by
it. In particular when they are writing proofs.
2020-12-08 13:46:00 -08:00
..
bench refactor: heterogeneous operators 2020-12-01 14:02:46 -08:00
compiler feat: force users to use discard when action result is not being bound and it is not PUnit 2020-12-08 06:14:48 -08:00
elabissues chore: avoid Has prefix in type classes 2020-10-27 18:29:19 -07:00
ir chore(tests): fix do syntax in tests 2019-06-30 13:04:34 +02:00
lean fix: adjust code to new match-compiler 2020-12-08 13:46:00 -08:00
playground test: add nondet example 2020-10-29 16:33:40 -07:00
plugin feat: run linters in the new frontend 2020-10-23 14:04:28 -07:00
.gitignore chore: move bin/ and .oleans into build directory 2020-05-14 14:47:54 +02:00
common.sh test: ignore \r when diffing 2020-09-15 09:32:00 -07:00