You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uniformize semantics of :> in class after deprecation phase of #16230
This ends the deprecation phases of
#16230 and
#15802
that introduced :: instead of :> for subclasses in Class declarations.
Now :> means coercion in all record declarations (including typeclasses).
This command has no effect when used on a typeclass.
335
334
336
-
.. _warn-future-coercion-class-field:
337
-
338
-
.. warn:: A coercion will be introduced instead of an instance in future versions when using ':>' in 'Class' declarations. Replace ':>' with '::' (or use '#[global] Existing Instance field.' for compatibility with Coq < 8.17).
339
-
340
-
In future versions, :g:`:>` in the :n:`@record_definition` or
341
-
:n:`@constructor` will declare a :ref:`coercion<coercions>`, as
342
-
it does for other :cmd:`Record` commands. To eliminate the warning, use
343
-
:g:`::` instead.
344
-
345
335
.. warn:: Ignored instance declaration for “@ident”: “@term” is not a class
346
336
347
-
Using the ``::`` (or deprecated ``:>``) syntax in the :n:`@record_definition`
337
+
Using the ``::`` syntax in the :n:`@record_definition`
348
338
or :n:`@constructor` with a right-hand-side that
349
339
is not itself a Class has no effect (apart from emitting this warning).
strbrk "A coercion will be introduced instead of an instance in future versions when using ':>' in 'Class' declarations. "
671
-
++ strbrk "Replace ':>' with '::' (or use '#[global] Existing Instance field.' for compatibility with Coq < 8.18). Beware that the default locality for '::' is #[export], as opposed to #[global] for ':>' currently."
672
-
++ strbrk (if definitional then" Add an explicit #[global] attribute if you need to keep the current behavior. For example: \"Class foo := #[global] baz :: bar.\""
673
-
else" Add an explicit #[global] attribute to the field if you need to keep the current behavior. For example: \"Class foo := { #[global] field :: bar }.\""))
674
-
675
656
letcheck_proj_flagskindrf=
676
657
letopenVernacexprin
677
658
let pf_coercion, pf_reversible =
678
659
match rf.rf_coercion with
679
-
(* replace "kind_class kind = NotClass" with true after deprecation phase *)
0 commit comments