lean4-htt/tests/lean/run/coeIssue3.lean
Leonardo de Moura e4a3b434d7 chore: moving tests to new frontend
@Kha The transition has begun :)
I found and fixed a few bugs, but it is going well so far.
2020-09-10 18:00:34 -07:00

23 lines
512 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.

new_frontend
structure Var : Type := (name : String)
instance Var.nameCoe : Coe String Var := ⟨Var.mk⟩
structure A : Type := (u : Unit)
structure B : Type := (u : Unit)
def a : A := A.mk ()
def b : B := B.mk ()
def Foo.chalk : A → List Var → Unit := fun _ _ => ()
def Bar.chalk : B → Unit := fun _ => ()
instance listCoe {α β} [Coe α β] : Coe (List α) (List β) :=
⟨fun as => as.map fun a => coe a⟩
open Foo
open Bar
#check Foo.chalk a ["foo"] -- works
#check chalk a ["foo"] -- works