This PR adds improves the "invalid named argument" error message in function applications and match patterns by providing clickable hints with valid argument names. In so doing, it also fixes an issue where this error message would erroneously flag valid match-pattern argument names.
22 lines
436 B
Text
22 lines
436 B
Text
|
|
def ex1 (xs : List Nat) : Nat :=
|
|
xs.foldl (b := 0) fun sum x => sum + x
|
|
|
|
def f (a : Nat) (flag := true) : Nat :=
|
|
a + if flag then 1 else 0
|
|
|
|
def g (a : Nat) : Nat :=
|
|
f a (flg := false)
|
|
|
|
|
|
def T : Nat → Type
|
|
| 0 => (x : Nat) → Bool
|
|
| _ + 1 => (y : Nat) → Bool
|
|
|
|
def h : (n : Nat) → T n
|
|
| 0 => fun x => x == 0
|
|
| n + 1 => fun y => y == n
|
|
|
|
example := h (n := 0) (k := 7)
|
|
example := h (n := 31) (k := 7)
|
|
example := h (k := 7)
|