-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: make it possible to use dot notation in m!
strings
#5857
Conversation
This default instance makes it possible to write things like `m!"the constant is {.ofConstName n}"`.
Mathlib CI status (docs):
|
Is that only when the type of (Maybe include the answers in the description so that they make it to the release notes.) |
@nomeata It affects For |
Ok, sounds reasonable and matches the expectation that interpolatoin behaves like an implicit |
This default instance makes it possible to write things like
m!"the constant is {.ofConstName n}"
.Breaking change: This weakly causes terms to have a type of
MessageData
if their type is otherwise unknown. For example:m!"... {x} ..."
can causex
to have typeMessageData
, causing thelet
definition ofx
to fail to elaborate. Fix: givex
an explicit type.m!
strings may need a type ascription. For example, if the type ofi
is unknown at the time the arithmetic expression is elaborated, thenm!"... {i + 1} ..."
can fail saying that it cannot find anHAdd Nat Nat MessageData
instance. Two fixes: either ensure that the type ofi
is known, or add a type ascription to guide theMessageData
coercion, likem!"... {(i + 1 : Nat)} ..."
.