diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-07-23 11:40:37 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-07-23 11:41:00 +0200 |
commit | d784bdeb62a6b11831c5235a97449ff2a86dcc52 (patch) | |
tree | 900feb016df2bc8197ef6a467e6260dbd4d932f2 /testsuite/tests/haddock | |
parent | 985127510685c3e7ed462260bd69d2e6557430f4 (diff) | |
download | haskell-d784bdeb62a6b11831c5235a97449ff2a86dcc52.tar.gz |
Lexer: support consecutive references to Haddock chunks (#10398)
Reviewers: austin, bgamari, Fuuzetsu
Reviewed By: bgamari
Subscribers: thomie, bgamari
Differential Revision: https://phabricator.haskell.org/D1025
GHC Trac Issues: #10398
Diffstat (limited to 'testsuite/tests/haddock')
3 files changed, 39 insertions, 0 deletions
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T10398.hs b/testsuite/tests/haddock/should_compile_flag_haddock/T10398.hs new file mode 100644 index 0000000000..bbd498cfad --- /dev/null +++ b/testsuite/tests/haddock/should_compile_flag_haddock/T10398.hs @@ -0,0 +1,25 @@ +module Foo +( + -- The reference to chunk2 should show up in the -ddump-parsed output. + -- $chunk1 + -- $chunk2 + foo, + -- $chunk3 + bar +) +where + +{- $chunk1 +This is chunk 1. +-} + +{- $chunk2 +This is chunk 2. +-} + +{- $chunk3 +This is chunk 3. +-} + +foo = 3 +bar = 7 diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T10398.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/T10398.stderr new file mode 100644 index 0000000000..4a51fcd55d --- /dev/null +++ b/testsuite/tests/haddock/should_compile_flag_haddock/T10398.stderr @@ -0,0 +1,13 @@ + +==================== Parser ==================== +module Foo ( + <IEDocNamed: chunk1>, <IEDocNamed: chunk2>, foo, + <IEDocNamed: chunk3>, bar + ) where +<document comment> +<document comment> +<document comment> +foo = 3 +bar = 7 + + diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/all.T b/testsuite/tests/haddock/should_compile_flag_haddock/all.T index 61b6c6c1e0..d803e9dd61 100644 --- a/testsuite/tests/haddock/should_compile_flag_haddock/all.T +++ b/testsuite/tests/haddock/should_compile_flag_haddock/all.T @@ -31,3 +31,4 @@ 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('T10398', normal, compile, ['-haddock -ddump-parsed']) |