diff options
Diffstat (limited to 'docs/users_guide/8.12.1-notes.rst')
-rw-r--r-- | docs/users_guide/8.12.1-notes.rst | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/users_guide/8.12.1-notes.rst b/docs/users_guide/8.12.1-notes.rst index deb29310ff..aa602b4f7c 100644 --- a/docs/users_guide/8.12.1-notes.rst +++ b/docs/users_guide/8.12.1-notes.rst @@ -150,6 +150,22 @@ Language data U a where MkU :: (Show a => U a) +* GHC more strictly enforces the rule that the type in the top of an instance + declaration is not permitted to contain nested ``forall``\ s or contexts, as + documented in :ref:`formal-instance-syntax`. For example, the following + examples, which previous versions of GHC would accept, are now rejected: + + instance (forall a. C a) where ... + instance (Show a => C a) where ... + + In addition, GHC now enforces the rule that the types in ``deriving`` clauses + and ``via`` types (for instances derived with :extension:`DerivingVia`) + cannot contain nested ``forall``\ s or contexts. For example, the following + examples, which previous versions of GHC would accept, are now rejected: :: + + data T = MkT deriving (C1, (forall x. C2 x)) + deriving via (forall x. V x) instance C (S x) + * A new language extension :extension:`QualifiedDo` is implemented, allowing to qualify a do block to control which operations to use for desugaring do syntax. :: |