summaryrefslogtreecommitdiff
path: root/docs/users_guide/8.8.1-notes.rst
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2018-10-04 09:17:55 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2018-10-04 09:17:55 -0400
commitbd7898537768f936d05c0c83eef1cd9b00933347 (patch)
treedb16292d6c32f6ef04ff829178cacc6709d00a6d /docs/users_guide/8.8.1-notes.rst
parentfc2ff6dd7496a33bf68165b28f37f40b7d647418 (diff)
downloadhaskell-bd7898537768f936d05c0c83eef1cd9b00933347.tar.gz
Parse the (!) type operator and allow type operators in existential context
Summary: Improve the way `(!)`, `(~)`, and other type operators are handled in the parser, fixing two issues at once: 1. `(!)` can now be used as a type operator that respects fixity and precedence (#15457) 2. Existential context of a data constructor no longer needs parentheses (#15675) In addition to that, with this patch it is now trivial to adjust precedence of the `{-# UNPACK #-}` pragma, as suggested in https://ghc.haskell.org/trac/ghc/ticket/14761#comment:7 There was a small change to API Annotations. Before this patch, `(~)` was a strange special case that produced an annotation unlike any other type operator. After this patch, when `(~)` or `(!)` are used to specify strictness they produce AnnTilde and AnnBang annotations respectively, and when they are used as type operators, they produce no annotations. Test Plan: Validate Reviewers: simonpj, bgamari, alanz, RyanGlScott Reviewed By: RyanGlScott Subscribers: RyanGlScott, rwbarton, mpickering, carter GHC Trac Issues: #15457, #15675 Differential Revision: https://phabricator.haskell.org/D5180
Diffstat (limited to 'docs/users_guide/8.8.1-notes.rst')
-rw-r--r--docs/users_guide/8.8.1-notes.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/users_guide/8.8.1-notes.rst b/docs/users_guide/8.8.1-notes.rst
index e3a8d3ea22..00e532c6d1 100644
--- a/docs/users_guide/8.8.1-notes.rst
+++ b/docs/users_guide/8.8.1-notes.rst
@@ -40,6 +40,16 @@ Language
terminating value of type ``Void``. Accordingly, GHC will not warn about
``K2`` (whereas previous versions of GHC would).
+- ``(!)`` is now a valid type operator: ::
+
+ type family a ! b
+
+- An existential context no longer requires parenthesization: ::
+
+ class a + b
+ data D1 = forall a b. (a + b) => D1 a b
+ data D2 = forall a b. a + b => D2 a b -- now allowed
+
Compiler
~~~~~~~~