lean4-htt/tests/lean/run/optParam.lean
Leonardo de Moura 5ac7b1232a chore: add workarounds
@Kha It seems the recent parser modifications created some unexpected
problems. I didn't investigate them. I am "lost" in the elaborator and
dependent pattern matching land.

1) We can't write anymore
```
f [1, 2, 3] |>.run' 0 = Except.ok ()
```
We have to use parentheses and the error message is weird :(
```
(f [1, 2, 3] |>.run' 0) = Except.ok ()
```

2) I had to add comments to `macro.lean`, I didn't find a workaround
for one of the rules. BTW, I had to add a bunch of `:term` for fixing
the other rules, and the error messages were counterintuitive.
2021-03-23 18:35:27 -07:00

17 lines
327 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def p (x : Nat := 0) : Nat × Nat :=
(x, x)
theorem ex1 : p.1 = 0 :=
rfl
theorem ex2 : (p (x := 1) |>.2) = 1 :=
rfl
def c {α : Type} [Inhabited α] : α × α :=
(arbitrary, arbitrary)
theorem ex3 {α} [Inhabited α] : c.1 = arbitrary (α := α) :=
rfl
theorem ex4 {α} [Inhabited α] : c.2 = arbitrary (α := α) :=
rfl