feat: add Repr Name

This commit is contained in:
Leonardo de Moura 2020-12-18 14:32:49 -08:00
parent d22c5cb1b0
commit 68701b86e4

View file

@ -49,7 +49,11 @@ def toStringWithSep (sep : String) : Name → String
protected def toString : Name → String :=
toStringWithSep "."
instance : ToString Name := ⟨Name.toString⟩
instance : ToString Name where
toString n := n.toString
instance : Repr Name where
reprPrec n _ := Std.Format.text "`" ++ n.toString
def capitalize : Name → Name
| Name.str p s _ => Name.mkStr p s.capitalize