lean4-htt/tests/lean/run/missingExplicitWithForwardNamedDep.lean
Kyle Miller 0db6daa8f1
feat: actual implementation for #5283 (#5512)
I did a bad git rebase before merging #5283, which reverted it to an
earlier version. This PR has the actual implementation of RFC #5397.
2024-09-29 01:22:12 +00:00

33 lines
860 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.

class Foo (α : Type) (β : Type) where
val : Nat
a : α
b : β
/-- info: Foo.val (α β : Type) [self : Foo α β] : Nat -/
#guard_msgs in #check Foo.val
def valOf [s : Foo α β] : Nat :=
s.val
/-- info: 10 -/
#guard_msgs in #eval valOf (s := { val := 10, a := true, b := false : Foo Bool Bool })
def valOf2 (α β : Type) [s : Foo α β] : Nat :=
s.val
/-- info: valOf2 Bool Bool : Nat -/
#guard_msgs in #check valOf2 (s := { val := 10, a := true, b := false : Foo Bool Bool })
def f (x y z : Nat) := x + y + z
/-- info: fun x y => f x y 10 : Nat → Nat → Nat -/
#guard_msgs in
#check f (z := 10)
def g {α : Type} (a b : α) := b
/-- info: fun a => g a 10 : Nat → Nat -/
#guard_msgs in #check g (b := 10)
def h (α : Type) (a b : α) := b
/-- info: fun a => h Bool a true : Bool → Bool -/
#guard_msgs in #check h (b := true)