diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2019-04-18 12:53:56 -0700 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-04-19 23:50:29 -0400 |
commit | 99dd5d6b8365ecc8748651395c503b2c0b82490e (patch) | |
tree | eac883813baa2f1e53f54e3727c6f428987c7544 /testsuite/tests/haddock | |
parent | e7280c93ef8f0685bbd63552b5b72c029907687e (diff) | |
download | haskell-99dd5d6b8365ecc8748651395c503b2c0b82490e.tar.gz |
Haddock: support strict GADT args with docs
Rather than massaging the output of the parser to re-arrange docs and
bangs, it is simpler to patch the two places in which the strictness
info is needed (to accept that the `HsBangTy` may be inside an
`HsDocTy`).
Fixes #16585.
Diffstat (limited to 'testsuite/tests/haddock')
5 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T15206.hs b/testsuite/tests/haddock/should_compile_flag_haddock/T15206.hs new file mode 100644 index 0000000000..3d9b9fc220 --- /dev/null +++ b/testsuite/tests/haddock/should_compile_flag_haddock/T15206.hs @@ -0,0 +1,4 @@ +module T15206 where +data Point = Point -- ^ a 2D point + !Int -- ^ x coord + !Int -- ^ y coord diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T15206.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/T15206.stderr new file mode 100644 index 0000000000..8a12344e36 --- /dev/null +++ b/testsuite/tests/haddock/should_compile_flag_haddock/T15206.stderr @@ -0,0 +1,6 @@ + +==================== Parser ==================== +module T15206 where +data Point = " a 2D point" Point !Int " x coord" !Int " y coord" + + diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T16585.hs b/testsuite/tests/haddock/should_compile_flag_haddock/T16585.hs new file mode 100644 index 0000000000..2132c0edb2 --- /dev/null +++ b/testsuite/tests/haddock/should_compile_flag_haddock/T16585.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE GADTs #-} +module T16585 where +data F a where + X :: !Int -- ^ comment + -> F Int + diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T16585.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/T16585.stderr new file mode 100644 index 0000000000..9bf18f0f9b --- /dev/null +++ b/testsuite/tests/haddock/should_compile_flag_haddock/T16585.stderr @@ -0,0 +1,6 @@ + +==================== Parser ==================== +module T16585 where +data F a where X :: !Int " comment" -> F Int + + diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/all.T b/testsuite/tests/haddock/should_compile_flag_haddock/all.T index 5450fcbe7f..72c913a42c 100644 --- a/testsuite/tests/haddock/should_compile_flag_haddock/all.T +++ b/testsuite/tests/haddock/should_compile_flag_haddock/all.T @@ -51,3 +51,5 @@ test('haddockA033', normal, compile, ['-haddock -ddump-parsed']) test('haddockA034', normal, compile, ['-haddock -ddump-parsed']) test('T10398', normal, compile, ['-haddock -ddump-parsed']) test('T11768', normal, compile, ['-haddock -ddump-parsed']) +test('T15206', normal, compile, ['-haddock -ddump-parsed']) +test('T16585', normal, compile, ['-haddock -ddump-parsed']) |