Skip to content

Commit

Permalink
feat: make it possible to use dot notation in m! strings
Browse files Browse the repository at this point in the history
This default instance makes it possible to write things like `m!"the constant is {.ofConstName n}"`.
  • Loading branch information
kmill committed Oct 27, 2024
1 parent 193b6f2 commit 173fab4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Lean/Message.lean
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ instance : ToMessageData Syntax := ⟨MessageData.ofSyntax⟩
instance : ToMessageData (TSyntax k) := ⟨(MessageData.ofSyntax ·)⟩
instance : ToMessageData Format := ⟨MessageData.ofFormat⟩
instance : ToMessageData MVarId := ⟨MessageData.ofGoal⟩
@[default_instance]
instance : ToMessageData MessageData := ⟨id⟩
instance [ToMessageData α] : ToMessageData (List α) := ⟨fun as => MessageData.ofList <| as.map toMessageData⟩
instance [ToMessageData α] : ToMessageData (Array α) := ⟨fun as => toMessageData as.toList⟩
Expand Down

0 comments on commit 173fab4

Please sign in to comment.