summaryrefslogtreecommitdiff
path: root/testsuite/tests/haddock
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2015-07-23 11:42:07 +0200
committerBen Gamari <ben@smart-cactus.org>2015-07-23 11:42:46 +0200
commit76e2341afdc050549067a18cac41373f64daf4c2 (patch)
tree6df84605bf2ca7ed2d629958c2a47b4bb4463fcd /testsuite/tests/haddock
parentd2b4df157532adf014789ae9b2496f88369e43ea (diff)
downloadhaskell-76e2341afdc050549067a18cac41373f64daf4c2.tar.gz
Accept next-docstrings on GADT constructors.
Accept next docstrings (`-- | Docstring`) on GADT constructors. I have confirmed that this adds no shift/reduce conflicts. Test Plan: haddockA034 Reviewers: austin, simonpj, simonmar Reviewed By: simonmar Subscribers: Fuuzetsu, simonmar, thomie, mpickering, edsko Differential Revision: https://phabricator.haskell.org/D1086
Diffstat (limited to 'testsuite/tests/haddock')
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/all.T1
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.hs8
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.stderr5
3 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/all.T b/testsuite/tests/haddock/should_compile_flag_haddock/all.T
index d803e9dd61..a0d1d7c07d 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/all.T
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/all.T
@@ -31,4 +31,5 @@ test('haddockA030', normal, compile, ['-haddock -ddump-parsed'])
test('haddockA031', normal, compile, ['-haddock -ddump-parsed -XExistentialQuantification'])
test('haddockA032', normal, compile, ['-haddock -ddump-parsed'])
test('haddockA033', normal, compile, ['-haddock -ddump-parsed'])
+test('haddockA034', normal, compile, ['-haddock -ddump-parsed'])
test('T10398', normal, compile, ['-haddock -ddump-parsed'])
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.hs b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.hs
new file mode 100644
index 0000000000..195d76c34a
--- /dev/null
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE GADTs #-}
+
+module Hi where
+
+-- | This is a GADT.
+data Hi where
+ -- | This is a GADT constructor.
+ Hi :: () -> Hi
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.stderr
new file mode 100644
index 0000000000..f743393349
--- /dev/null
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.stderr
@@ -0,0 +1,5 @@
+
+==================== Parser ====================
+module Hi where
+<document comment>
+data Hi where This is a GADT constructor. Hi :: () -> Hi