diff options
| -rw-r--r-- | docs/users_guide/exts/deriving_via.rst | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/users_guide/exts/deriving_via.rst b/docs/users_guide/exts/deriving_via.rst index cc590987ea..26ff719780 100644 --- a/docs/users_guide/exts/deriving_via.rst +++ b/docs/users_guide/exts/deriving_via.rst @@ -13,9 +13,11 @@ Deriving via :since: 8.6.1 This allows ``deriving`` a class instance for a type by specifying -another type of equal runtime representation (such that there exists a -``Coercible`` instance between the two: see :ref:`coercible`) that is -already an instance of the that class. +another type that is already an instance of that class. +This only makes sense if the methods have identical runtime representations, +in the sense that coerce (see The ``Coercible`` constraint) can convert +the existing implementation into the desired implementation. +The generated code will be rejected with a type error otherwise. :extension:`DerivingVia` is indicated by the use of the ``via`` deriving strategy. ``via`` requires specifying another type (the ``via`` type) |
