Commit 4672e2eb authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

relnotes: Add mention of QuantifiedConstraints

parent e4c41ec2
......@@ -28,6 +28,19 @@ Full details
- Use of quantified type variables in constraints is now allowed via the
:extension:`QuantifiedConstraints` language extension. This long-awaited feature
enables users to encode significantly more precision in their types. For instance,
the common ``MonadTrans`` typeclass could now make the expectation that an
applied transformer is must be a ``Monad`` ::
class (forall a. Monad m => Monad (t m)) => MonadTrans t where {- ... -}
Additionally, quantification can enable terminating instance resolution
where this previously was not possible. See :ref:`quantified-constraints` for
- A new :extension:`DerivingVia` language extension has been added which allows
the use of the ``via`` deriving strategy. For instance: ::
......@@ -9707,9 +9707,18 @@ contexts and superclasses, but to do so you must use
:extension:`UndecidableInstances` to signal that you don't mind if the type
checker fails to terminate.
.. _quantified-constraints:
Quantified constraints
.. extension:: QuantifiedConstraints
:shortdesc: Allow ``forall`` quantifiers in constraints.
:since: 8.6.1
Allow constraints to quantify over types.
The extension :extension:`QuantifiedConstraints` introduces **quantified constraints**,
which give a new level of expressiveness in constraints. For example, consider ::
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment