lean4-htt/tests/lean/funInfoBug.lean
2021-01-11 07:08:17 -08:00

13 lines
349 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.

import Std.Data.AssocList
def l : List (Prod Nat Nat) := [(1, 1), (2, 2)]
#eval l -- works
def Std.AssocList.ToList : AssocList α β → List (α × β)
| AssocList.nil => []
| AssocList.cons k v t => (k, v) :: ToList t
instance [Repr α] [Repr β] : Repr (Std.AssocList α β) where
reprPrec f _ := repr f.ToList
#reduce (l.toAssocList)