summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorHE, Tao <sighingnow@gmail.com>2018-02-12 19:55:41 -0500
committerBen Gamari <ben@smart-cactus.org>2018-02-13 17:49:43 -0500
commit8936ab69d18669bab3ca4edf40458f88ae5903f0 (patch)
treef793c1a8f115a0956386a78f355d30836805272e /docs
parent0c9777b787d072f9f57e0cdfe44e2e2d48217077 (diff)
downloadhaskell-8936ab69d18669bab3ca4edf40458f88ae5903f0.tar.gz
Raise parse error for `data T where`.
Empty GADTs data declarations can't be identified in type checker. This patch adds additional checks in parser and raise a parse error when encounter empty GADTs declarations but extension `GADTs` is not enabled. Only empty declarations are checked in parser to avoid affecting existing error messages related to missing GADTs extension. This patch should fix issue 8258. Signed-off-by: HE, Tao <sighingnow@gmail.com> Test Plan: make test TEST="T8258 T8258NoGADTs" Reviewers: bgamari, mpickering, alanz, RyanGlScott Reviewed By: bgamari, RyanGlScott Subscribers: adamse, RyanGlScott, rwbarton, thomie, mpickering, carter GHC Trac Issues: #8258 Differential Revision: https://phabricator.haskell.org/D4350
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/8.6.1-notes.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/users_guide/8.6.1-notes.rst b/docs/users_guide/8.6.1-notes.rst
index e844ab6b2a..8f7e961b4f 100644
--- a/docs/users_guide/8.6.1-notes.rst
+++ b/docs/users_guide/8.6.1-notes.rst
@@ -22,6 +22,14 @@ Full details
Language
~~~~~~~~
+- Data declarations with empty ``where`` clauses are no longer valid without the
+ extension :extension:`GADTSyntax` enabled. For instance, consider the
+ following, ::
+
+ data T where
+
+ The grammar is invalid in Haskell2010. Previously it could be compiled successfully
+ without ``GADTs``. As of GHC 8.6.1, this is a parse error.
Compiler
~~~~~~~~